PluginProbe
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 4.1.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v4.1.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 +32 -2 4.2.14.1.0 View file →
@@ -112,16 +112,46 @@
112 112 });
113 113
114 114
115 115 add_action('wp_loaded', function () {
116 + //phpcs:ignore WordPress.Security.NonceVerification.Recommended --It's a fronted user part, not possible to verify nonce here
117 + if(isset($_REQUEST['preview']) && $_REQUEST['preview'] == 'true' && !empty($_REQUEST['preview_id'])) {
118 +
119 + $pid = (int)$_REQUEST['preview_id']; //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- It's a fronted user part, not possible to verify nonce here
120 +
121 + $po = get_post($pid);
122 +
123 + if($po->post_type === Template_Cpt::TYPE) {
124 +
125 + $template = \ShopEngine\Core\Builders\Templates::get_registered_template_data($pid);
126 +
127 + if(empty($template) || !isset($template['url'])) {
128 + return;
129 + }
130 +
131 + $param = [
132 + 'shopengine_template_id' => $pid,
133 + 'preview_nonce' => wp_create_nonce('template_preview_' . $pid),
134 + 'change_template' => '1',
135 + ];
136 +
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);
139 +
140 + wp_safe_redirect($url);
141 + exit;
142 + }
143 + }
144 +
116 145 /**
117 146 * migrate data
118 - */
147 + */
119 148 LangMigration::instance()->init();
120 149 });
121 150
122 151 // avoid themes for loading woocommerce functions
123 - $avoid_themes = ['avada', 'avada child', 'woodmart', 'woodmart child'];
152 + $avoid_themes = ['avada', 'avada child'];
153 +
124 154 if(!in_array(strtolower(wp_get_theme()), $avoid_themes)) {
125 155 /**
126 156 * Ensuring woocommerce functions are loaded before theme is modifying those
127 157 *