enqueue_scripts(); add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts']); $this->init_thankyou_filter(); } // Add Scripts Base Menu Slug public function enqueue_scripts() { if ( ! wp_style_is( 'ipscmi-order-cart-corekit-ui-fw', 'registered' ) ) { wp_register_style( 'ipscmi-order-cart-corekit-ui-fw', trailingslashit( IPSCMI_ORDER_CART_URL ) . 'includes/classes/CoreKit/assets/css/ui/ips-corekit-ui-fw.css', [], IPSCMI_ORDER_CART_VERSION ); } wp_enqueue_style( 'ipscmi-order-cart-corekit-ui-fw' ); wp_enqueue_style( 'ipscmi-order-cart-thankyou', trailingslashit( IPSCMI_ORDER_CART_ASSETS ) . 'css/ips-front-woothankyou-style.css', [ 'ipscmi-order-cart-corekit-ui-fw' ], IPSCMI_ORDER_CART_VERSION ); if ( wp_script_is( 'ipscmi-order-cart-frontend-ips-thankyou-js', 'registered' ) ) { wp_enqueue_script( 'ipscmi-order-cart-frontend-ips-thankyou-js' ); } } // Initialize hooks for the admin page public function init_thankyou_filter() { add_filter( 'the_title', [ $this, 'custom_thankyou_page_title' ], 10, 2 ); add_filter( 'body_class', [ $this, 'add_body_class' ] ); remove_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 ); remove_action( 'woocommerce_view_order', 'woocommerce_order_details_table', 10 ); remove_action( 'woocommerce_thankyou_', 'woocommerce_thankyou_bacs', 10 ); remove_action( 'woocommerce_thankyou_', 'woocommerce_thankyou_cheque', 10 ); remove_action( 'woocommerce_thankyou_', 'woocommerce_thankyou_order_received_text', 10 ); remove_action( 'woocommerce_thankyou_', 'woocommerce_thankyou_paypal', 10 ); add_action( 'ipscmi-order-cart-hook-thankyou-welcome-block', [ $this, 'ips_thankyou_welcome_block' ], 99, 2); add_action( 'ipscmi-order-cart-hook-thankyou-orderstatus-block', [ $this, 'ips_thankyou_orderstatus_block' ], 99, 1); add_action( 'ipscmi-order-cart-hook-thankyou-downloads-block', [ $this, 'ips_thankyou_downloads_block' ], 99, 1); add_action( 'ipscmi-order-cart-hook-thankyou-informationen-simple-block', [ $this, 'ips_thankyou_informationen_simple_block' ], 99, 8); add_action( 'ipscmi-order-cart-hook-thankyou-informationen-download-block', [ $this, 'ips_thankyou_informationen_download_block' ], 99, 7); add_action( 'ipscmi-order-cart-hook-thankyou-prices-block', [ $this, 'ips_thankyou_prices_block' ], 99, 8); add_action( 'ipscmi-order-cart-hook-thankyou-taxes-block', [ $this, 'ips_thankyou_taxes_block' ], 99, 1); add_action( 'ipscmi-order-cart-hook-thankyou-title-block', [ $this, 'ips_thankyou_title_block' ], 99, 1); add_action( 'ipscmi-order-cart-hook-thankyou-orders-block', [ $this, 'ips_thankyou_orders_block' ], 99,1); ThankyouTemplateResolver::instance(); } function custom_thankyou_page_title( $title, $id ) { if ( is_wc_endpoint_url( 'order-received' ) ) { $title = ''; } return $title; } public function add_body_class( array $classes ): array { if ( is_wc_endpoint_url( 'order-received' ) ) { $classes[] = 'ipscmi-order-cart-thankyou-page'; } return $classes; } public function ips_get_template_thankyou( $located, $template_name, $args, $template_path, $default_path ) { if ( 'checkout/thankyou.php' == $template_name || 'thankyou.php' == $template_name) { $located = ThankyouTemplateResolver::template_path(); // $helper = $this->thankyou_phppage(); // echo "Here helper: ".$helper; // $located = IPSCMI_ORDER_CART_DIR . 'ips-react/public/index.html'; // echo "READY ++++++++++++ READY ++++++++++++++++ READY"; } return $located; } /* ********************************************************************************************************************************************************* */ /* ********************************************************************************************************************************************************* */ /* ########################################################## ###################################################################### */ /* ########################################################## TITLE ###################################################################### */ /* ********************************************************** ********************************************************************** */ public function ips_thankyou_title_block($data_title){ ?>