PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
← All changes | includes/elementor/class.php +12 -2 1.7.22.7.0 View file →
@@ -213,11 +213,21 @@
213 213 *
214 214 * @return array
215 215 */
216 216 public function get_localize_data() {
217 + $needs_shipping = '';
218 +
219 + if ( function_exists( 'WC' ) ) {
220 + $cart = WC()->cart;
221 +
222 + if ( $cart && method_exists( $cart, 'needs_shipping' ) ) {
223 + $needs_shipping = $cart->needs_shipping();
224 + }
225 + }
226 +
217 227 return [
218 228 'nonce' => wp_create_nonce( 'sellkit_elementor' ),
219 - 'wcNeedShipping' => ( function_exists( 'WC' ) ) ? WC()->cart->needs_shipping() : '',
229 + 'wcNeedShipping' => $needs_shipping,
220 230 'url' => [
221 231 'assets' => sellkit()->plugin_url() . 'assets/',
222 232 ],
223 233 ];
@@ -290,9 +300,9 @@
290 300
291 301 /**
292 302 * Enqueue editor scripts.
293 303 *
294 - * @since NEXT
304 + * @since 1.7.4
295 305 */
296 306 public function editor_enqueue_scripts() {
297 307 wp_localize_script(
298 308 'sellkit-editor',