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){ ?>
'; $thankyouicon3 = ' '; ?>
get_product(); if ( $product && $product instanceof WC_Product ) { $thumbnail = $product->get_image(array( 80, 80)); // Get the product thumbnail (from product object) if ($product->get_image_id() > 0 ){ $item_image = '
'.$thumbnail.'
'; }else{ $item_image = '
' . esc_attr__( 'Product image', 'ips-order-cart' ) . '
'; } $download_limit = $product->get_download_limit(); $download_expiry_limit = $product->get_download_expiry(); $downloads_remaining = ( $download_limit == -1 ) ? __( 'Unlimited', 'ips-order-cart' ) : $product->get_downloads_remaining(); $download_expiry = ( $download_expiry_limit == -1 ) ? __( 'Never', 'ips-order-cart' ) : $product->get_download_expiry(); }else{ $item_image = '
' . esc_attr__( 'Product image', 'ips-order-cart' ) . '
'; $remaining = "0"; } if ( $product && $product->is_downloadable() ) { $downloads = $product->get_downloads(); ?>
$item ) { $product = $item->get_product(); // Get the WC Product object (from order item) if ( $product && $product instanceof WC_Product ) { $thumbnail = $product->get_image(array( 80, 80)); // Get the product thumbnail (from product object) if ( function_exists('wc_gzd_get_gzd_product') ) { // Die Funktion wc_gzd_get_gzd_product existiert if ( wc_gzd_get_gzd_product( $product )->get_delivery_time_html() ) { // Die get_delivery_time_html-Methode des Produkts existiert $delivery_time = wp_kses_post( wc_gzd_get_product( $product )->get_delivery_time_html() ); } else { // Die get_delivery_time_html-Methode des Produkts existiert nicht oder gibt keinen Wert zurück $delivery_time = __( 'Delivery time:', 'ips-order-cart' ); } } else { // Die Funktion wc_gzd_get_gzd_product existiert nicht $delivery_time = __( 'Delivery time:', 'ips-order-cart' ); } $ordercount = $order_items; if ($product->get_image_id() > 0 ){ $item_image = '
'.$thumbnail.'
'; $details_description = $item->get_name() ; $details_quantity = $item->get_quantity() ; $item_subtotal = $item->get_subtotal(); //Netto $item_tax = $item->get_subtotal_tax(); $item_subtotal2 = wc_price($item_subtotal+$item_tax); }else{ $item_image = '
' . esc_attr__( 'Product image', 'ips-order-cart' ) . '
'; $details_description = $item->get_name() !== null ? $item->get_name() : ''; $details_quantity = $item->get_quantity() !== null ? $item->get_quantity() : ''; $item_subtotal = $item->get_subtotal() !== null ? $item->get_subtotal() : ''; //Netto $item_tax = $item->get_subtotal_tax() !== null ? $item->get_subtotal_tax() : ''; $item_subtotal2 = wc_price($item_subtotal+$item_tax); } }else{ // $ordercount = $order->get_items(); $details_description = $item->get_name() ; $details_quantity = $item->get_quantity() ; $item_subtotal = $item->get_subtotal(); //Netto $item_tax = $item->get_subtotal_tax(); $item_subtotal2 = wc_price($item_subtotal+$item_tax); $item_image = '
' . esc_attr__( 'Product image', 'ips-order-cart' ) . '
'; $delivery_time = __( 'Delivery time:', 'ips-order-cart' ); } ?>
0) ? true : false; ?>
$tax ) { $taxcheck = $tax->label; //echo $taxcheck; //if (strpos($taxcheck, 'MwSt. 19 % DE') !== false) { $tax_rate_id = $tax->rate_id; $tax_label = $tax->label; $tax_amount = $tax->amount; $tax_f_amount = $tax->formatted_amount; $compound = $tax->is_compound; // echo '' . $tax_label . ': ' . $tax_f_amount . ''; // } echo "
"; echo "
"; /* translators: %s: Tax label. */ echo "
" . esc_html( sprintf( __( 'Includes %s', 'ips-order-cart' ), $tax_label ) ) . '
'; /*