PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home2/medicu/.trash/cartflows-pro.2/modules/thankyou/ |
| Server: Linux tista.bd.svlogins.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 IP: 103.159.37.114 |
| Dir : /home2/medicu/.trash/cartflows-pro.2/modules/thankyou/class-cartflows-pro-thankyou.php |
<?php
/**
* CartFlows ThankYou
*
* @package CartFlows
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'CARTFLOWS_PRO_THANKYOU_DIR', CARTFLOWS_PRO_DIR . 'modules/thankyou/' );
/**
* Initialization
*
* @since 1.0.0
*/
class Cartflows_Pro_Thankyou {
/**
* Member Variable
*
* @var instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
add_action( 'woocommerce_after_order_details', array( $this, 'display_child_orders' ), 20 );
}
/**
* Display child orders at thank you page after order details.
*
* @param object $parent_order order object.
*/
public function display_child_orders( $parent_order ) {
if ( ! $parent_order instanceof WC_Order ) {
return;
}
$child_orders = $parent_order->get_meta( '_cartflows_offer_child_orders' );
if ( ! empty( $child_orders ) ) {
foreach ( $child_orders as $child_id => $child_data ) {
$order_id = $child_id;
include CARTFLOWS_PRO_THANKYOU_DIR . 'template/child-order-details.php';
}
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Cartflows_Pro_Thankyou::get_instance();