HEX
Server: Apache
System: Linux b5.s-host.com.ua 4.18.0-305.10.2.el7.x86_64 #1 SMP Fri Jul 23 21:00:55 UTC 2021 x86_64
User: unelbhzm (1470)
PHP: 8.0.18
Disabled: NONE
Upload Files
File: /sites/nuofama.com/wp-content/themes/blocksy/inc/components/woocommerce/common/cart.php
<?php

add_action('elementor/widget/before_render_content', function($widget) {
	if (! class_exists('ElementorPro\Modules\Woocommerce\Widgets\Cart')) {
		return;
	}

	if ($widget instanceof ElementorPro\Modules\Woocommerce\Widgets\Cart) {
		global $ct_skip_cart;
		$ct_skip_cart = true;
	}
}, 10 , 1);

add_filter('wc_get_template', function ($template, $template_name, $args, $template_path, $default_path) {
	if ($template_name !== 'cart/cart.php') {
		return $template;
	}

	global $ct_skip_cart;

	if ($ct_skip_cart) {
		$default_path = WC()->plugin_path() . '/templates/';
		return $default_path . $template_name;
	}

	return $template;
}, 10, 5);