PluginProbe
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 4.0.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v4.0.0
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 All 85 releases
← All changes | plugin.php +22 -22 2.3.04.0.0 View file →
@@ -3,8 +3,9 @@
3 3 namespace ShopEngine;
4 4
5 5 use ShopEngine\Compatibility\Conflicts\Manifest as Conflict_Manifest;
6 6 use ShopEngine\Core\Builders\Base;
7 +use ShopEngine\Compatibility\Migrations\LangMigration;
7 8 use ShopEngine\Core\Query_Modifier;
8 9 use ShopEngine\Core\Template_Cpt;
9 10 use ShopEngine\Libs\License\License_Route;
10 11 use ShopEngine\Libs\Rating\Rating;
@@ -74,12 +75,14 @@
74 75
75 76 if($error) {
76 77 return;
77 78 }
78 -
79 +
79 80 add_filter("plugin_action_links_shopengine/shopengine.php", function ($links) {
81 + $free = esc_html__("Go To Shopengine","shopengine");
82 + $pro = esc_html__("Go To ShopenginePro","shopengine");
80 83
81 - $custom_links[] = '<a href="'.admin_url('edit.php?post_type=shopengine-template#getting-started').'" target="_blank">' . esc_html__('Settings', 'shopengine') . '</a>';
84 + $custom_links[] = '<a title="' . $free . '" href="'.admin_url('edit.php?post_type=shopengine-template#getting-started').'" target="_blank">' . esc_html__('Settings', 'shopengine') . '</a>';
82 85
83 86 foreach ($custom_links as $custom_link):
84 87 array_unshift($links, $custom_link);
85 88 endforeach;
@@ -84,9 +87,9 @@
84 87 array_unshift($links, $custom_link);
85 88 endforeach;
86 89
87 90 if (!is_plugin_active('shopengine-pro/shopengine-pro.php')) {
88 - $links[] = '<a href="https://wpmet.com/plugin/shopengine/pricing/" style="color:#FCB214;font-weight:700" target="_blank">' . esc_html__('Go Pro', 'shopengine') . '</a>';
91 + $links[] = '<a title="' . $pro . '" href="https://wpmet.com/plugin/shopengine/pricing/" style="color:#FCB214;font-weight:700" target="_blank" rel="noopener">' . esc_html__('Go Pro', 'shopengine') . '</a>';
89 92 }
90 93 return $links;
91 94 });
92 95
@@ -104,16 +107,17 @@
104 107 add_action('admin_init', function () {
105 108 if(class_exists('ShopEngine_Pro')) {
106 109 new Updater();
107 110 }
111 + new \ShopEngine\Compatibility\Migrations\Direct_Checkout;
108 112 });
109 113
110 114
111 115 add_action('wp_loaded', function () {
112 -
116 + //phpcs:ignore WordPress.Security.NonceVerification.Recommended --It's a fronted user part, not possible to verify nonce here
113 117 if(isset($_REQUEST['preview']) && $_REQUEST['preview'] == 'true' && !empty($_REQUEST['preview_id'])) {
114 118
115 - $pid = (int)$_REQUEST['preview_id'];
119 + $pid = (int)$_REQUEST['preview_id']; //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- It's a fronted user part, not possible to verify nonce here
116 120
117 121 $po = get_post($pid);
118 122
119 123 if($po->post_type === Template_Cpt::TYPE) {
@@ -129,14 +133,20 @@
129 133 'preview_nonce' => wp_create_nonce('template_preview_' . $pid),
130 134 'change_template' => '1',
131 135 ];
132 136
133 - $url = \ShopEngine\Utils\Helper::add_to_url($template['url'], $param);
137 + $tem_url = (get_post_meta($pid, 'shopengine_template__post_meta__type' , true) == 'order') ? $po->guid : $template['url'];
138 + $url = \ShopEngine\Utils\Helper::add_to_url($tem_url, $param);
134 139
135 140 wp_safe_redirect($url);
136 141 exit;
137 142 }
138 143 }
144 +
145 + /**
146 + * migrate data
147 + */
148 + LangMigration::instance()->init();
139 149 });
140 150
141 151 // avoid themes for loading woocommerce functions
142 152 $avoid_themes = ['avada', 'avada child'];
@@ -180,8 +190,10 @@
180 190 ->set_first_appear_day( 7 )
181 191 ->set_condition( true )
182 192 ->call();
183 193
194 + \ShopEngine\Core\MultiLanguage\Language::instance()->init();
195 +
184 196 \ShopEngine\Core\Settings\Base::instance()->init();
185 197
186 198 new Libs\Select_Api\Base();
187 199
@@ -198,9 +210,9 @@
198 210 add_action('get_header', [$this, 'shopengine_track_product_views']);
199 211
200 212 // database migrations
201 213 // (new \ShopEngine\Compatibility\Migrations\Migration())->init();
202 - (new \ShopEngine\Compatibility\Migrations\Temp_Migration())->init();
214 + // (new \ShopEngine\Compatibility\Migrations\Temp_Migration())->init();
203 215
204 216
205 217 // call service providers
206 218
@@ -214,10 +226,8 @@
214 226 }
215 227
216 228 }
217 229
218 -
219 -
220 230 add_filter('script_loader_tag', [$this, 'filter_load_type'], 99, 3);
221 231 }
222 232
223 233
@@ -250,9 +260,9 @@
250 260 $cookie_name = "shopengine_recent_viewed_product";
251 261
252 262 if(isset($_COOKIE[$cookie_name])) {
253 263
254 - $cookie_ids = $_COOKIE[$cookie_name];
264 + $cookie_ids = sanitize_text_field(wp_unslash($_COOKIE[$cookie_name]));
255 265 $product_ids = explode(',', $cookie_ids);
256 266
257 267 if(!is_array($product_ids)) {
258 268 $product_ids = [$product_ids];
@@ -288,12 +298,10 @@
288 298 * Include public function
289 299 *
290 300 * @since 1.0.0
291 301 */
292 - public function js_css_public() {
293 - wp_enqueue_style('shopengine-icon', \ShopEngine::plugin_url() . 'assets/css/shopengine-icon.css', false, \ShopEngine::version());
294 - wp_enqueue_style('shopengine-simple-scrollbar-css', \ShopEngine::plugin_url() . 'assets/css/simple-scrollbar.css', false, \ShopEngine::version());
295 - wp_enqueue_style('shopengine-public-css', \ShopEngine::plugin_url() . 'assets/css/public-style.css', false, \ShopEngine::version());
302 + public function js_css_public() {
303 + wp_register_style('shopengine-public', \ShopEngine::plugin_url() . 'assets/css/shopengine-public.css', false, \ShopEngine::version());
296 304
297 305 // Modal Stylesheet
298 306 wp_register_style('shopengine-modal-styles', \ShopEngine::plugin_url() . 'assets/css/shopengine-modal.css', false, \ShopEngine::version());
299 307
@@ -342,12 +350,8 @@
342 350
343 351
344 352 public function missing_woocommerce() {
345 353
346 - if(isset($_GET['activate'])) {
347 - unset($_GET['activate']);
348 - }
349 -
350 354 if(file_exists(WP_PLUGIN_DIR . '/woocommerce/woocommerce.php')) {
351 355
352 356 $btn['label'] = esc_html__('Activate WooCommerce', 'shopengine');
353 357 $btn['url'] = wp_nonce_url('plugins.php?action=activate&plugin=woocommerce/woocommerce.php&plugin_status=all&paged=1', 'activate-plugin_woocommerce/woocommerce.php');
@@ -370,12 +374,8 @@
370 374 }
371 375
372 376
373 377 public function missing_elementor() {
374 -
375 - if(isset($_GET['activate'])) {
376 - unset($_GET['activate']);
377 - }
378 378
379 379 if(file_exists(WP_PLUGIN_DIR . '/elementor/elementor.php')) {
380 380
381 381 $btn['label'] = esc_html__('Activate Elementor', 'shopengine');