PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 4.9.4
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v4.9.4
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / compatibility / conflicts / manifest.php
shopengine / compatibility / conflicts Last commit date
manifest.php 2 weeks ago theme-hooks.php 2 weeks ago
manifest.php
175 lines
1 <?php
2
3 namespace ShopEngine\Compatibility\Conflicts;
4
5 use ShopEngine\Widgets\Widget_Helper;
6
7 class Manifest {
8
9 public function init() {
10
11 // Check if the WooCommerce Stripe Gateway plugin is active
12 if (is_plugin_active('woocommerce-gateway-stripe/woocommerce-gateway-stripe.php')) {
13 add_filter('wc_stripe_express_checkout_params', [$this, 'fix_stripe_express_checkout_has_block']);
14 }
15
16 add_action('elementor/element/before_section_start', [$this, 'elementor_editor_conflict'], 10, 2);
17 add_action('elementor/element/before_section_start', function ($element) {
18
19 /**
20 * In woodmart theme image with gallery does not work properly. so temporary fix
21 * Hooks tried are -
22 * elementor/editor/before_enqueue_scripts
23 * elementor/element/before_section_start
24 * elementor/element/after_section_end
25 */
26 wp_enqueue_script('wc-flexslider');
27
28 /**
29 * remove unwanted breadcrumb in shop and archive page
30 */
31 remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
32
33 global $is_used_shopengine_template;
34 if($is_used_shopengine_template) {
35 remove_action('woocommerce_before_single_product', 'woocommerce_output_all_notices', 10);
36 }
37 }, 9000, 1);
38
39
40 // Check if the Yith Delivery Date Plugin Is There
41 if(class_exists('\YITH_Delivery_Date_Shipping_Manager')){
42
43 // They added this action specifically after 2.7.0 version so we need to check if we are using 2.7.0 or higher
44 if ( version_compare( WC()->version, '2.7.0', '>=' ) ) {
45
46 $yith_date_manager = \YITH_Delivery_Date_Shipping_Manager::get_instance();
47
48 // Remove the actual action that used by Yith.
49 remove_action( 'woocommerce_checkout_shipping', array( $yith_date_manager, 'print_delivery_from' ), 20 );
50
51 // Invoked their own method to print delivery from
52 add_action( 'woocommerce_after_order_notes', array( $yith_date_manager, 'print_delivery_from' ), 20 );
53 }
54 }
55
56 // Removed the single product layout from Astra Theme
57 if(is_plugin_active('astra-addon/astra-addon.php')) {
58
59 add_action('wp', function() {
60 if (class_exists('ASTRA_Ext_WooCommerce_Markup')) {
61
62 global $wp_filter;
63
64 // Get the instance of the ASTRA_Ext_WooCommerce_Markup class
65 $astra_instance = null;
66 foreach ($wp_filter['wp']->callbacks as $priority => $filters) {
67 foreach ($filters as $filter) {
68 if (is_array($filter['function']) && is_object($filter['function'][0]) && get_class($filter['function'][0]) === 'ASTRA_Ext_WooCommerce_Markup') {
69 $astra_instance = $filter['function'][0];
70 break 2;
71 }
72 }
73 }
74
75 if ($astra_instance) {
76 remove_action('wp', array($astra_instance, 'woo_single_product_layouts'), 99);
77 }
78 }
79 }, 10);
80 }
81
82
83 // Check if the Unlimited Elements for Elementor Pro plugin is active
84 if (is_plugin_active('unlimited-elements-for-elementor-premium/unlimited-elements-pro.php')) {
85
86 add_action('elementor/init', [$this, 'remove_unlimited_elements_background_hooks'], 999);
87
88 }
89
90 }
91
92 /**
93 * Stripe skips mounting Express Checkout when has_block is true, assuming
94 * WC Blocks markup exists. Force it false when ShopEngine rendered instead.
95 */
96 public function fix_stripe_express_checkout_has_block($params) {
97
98 global $is_used_shopengine_template;
99
100 if ($is_used_shopengine_template && (is_cart() || is_checkout())) {
101 $params['has_block'] = false;
102 }
103
104 return $params;
105 }
106
107 // This function will remove the background overlay hooks added by Unlimited Elements for Elementor Pro plugin
108 public function remove_unlimited_elements_background_hooks() {
109 $hooks = array(
110 'elementor/element/section/section_background_overlay/after_section_end',
111 'elementor/element/container/section_background_overlay/after_section_end',
112 );
113
114 global $wp_filter;
115
116 foreach ($hooks as $hook) {
117 if (empty($wp_filter[$hook]) || empty($wp_filter[$hook]->callbacks)) {
118 continue;
119 }
120
121 foreach ($wp_filter[$hook]->callbacks as $priority => $callbacks) {
122 foreach ($callbacks as $callback) {
123 $function = isset($callback['function']) ? $callback['function'] : null;
124
125 if (!is_array($function) || empty($function[0]) || empty($function[1])) {
126 continue;
127 }
128
129 if (!is_object($function[0])) {
130 continue;
131 }
132
133 if (get_class($function[0]) === 'UniteCreatorElementorIntegrate' && $function[1] === 'onSectionStyleControlsAdd') {
134 remove_action($hook, $function, $priority);
135 }
136 }
137 }
138 }
139 }
140
141 public function elementor_editor_conflict($element, $section_id) {
142
143 $in_editor_mode = \Elementor\Plugin::$instance->editor->is_edit_mode();
144
145 if('shopengine-cross-sells' === $element->get_name() && $in_editor_mode) {
146
147 Theme_Hooks::instance()->theme_conflicts_in_elementor_editor_cross_sells();
148
149 } elseif('shopengine-related' === $element->get_name() && $in_editor_mode) {
150
151 Theme_Hooks::instance()->theme_conflicts_in_elementor_editor_related_products();
152
153 } elseif('shopengine-account-dashboard' === $element->get_name() && $in_editor_mode) {
154
155 Theme_Hooks::instance()->theme_conflicts_my_account_page();
156
157 } elseif('shopengine-cart-table' === $element->get_name() && $in_editor_mode) {
158
159 Theme_Hooks::instance()->theme_conflicts_empty_cart_page();
160
161 } elseif('shopengine-archive-products' === $element->get_name() && $in_editor_mode) {
162
163 Theme_Hooks::instance()->theme_conflicts_in_editor__archive_products_widget();
164
165 } elseif('shopengine-product-tabs' === $element->get_name() && $in_editor_mode) {
166
167 Theme_Hooks::instance()->theme_conflicts_in_editor__product_tabs_widget();
168
169 } elseif('shopengine-up-sells' === $element->get_name() && $in_editor_mode) {
170
171 Theme_Hooks::instance()->theme_conflicts_in_elementor_editor_up_sells();
172 }
173 }
174 }
175