cart->cart_contents_count > 0 ) { echo wc_get_checkout_url(); wp_safe_redirect( wc_get_checkout_url() ); exit(); } } // Set default woocommerce empty cart page template. if ( empty( $options['empty_cart_template'] ) || empty( $options['empty_cart_template'][0] ) || ! defined( 'ELEMENTOR_VERSION' ) || WC()->cart->cart_contents_count > 0 ) { return; } $template_id = $options['empty_cart_template'][0]; if ( (int) $template_id <= 0 ) { return; } add_action( 'template_redirect', function() { jupiterx_add_filter( 'jupiterx_layout', 'c' ); sellkit()->load_files( [ 'templates/canvas', ] ); exit; }, 5 ); add_filter( 'the_content', function() use ( $template_id ) { ob_start(); echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template_id, true ); return ob_get_clean(); } ); } } Sellkit_Settings::get_instance();