PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.13
ShopBuilder – WooCommerce Builder For Elementor v2.1.13
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Abstracts/ElementorWidgetBase.php +31 -20 2.0.12.1.13 View file →
@@ -99,9 +99,9 @@
99 99 * @param array $data default data.
100 100 * @param array $args default arg.
101 101 */
102 102 public function __construct( $data = [], $args = null ) {
103 - $this->apply_hooks_before_render();
103 + $this->apply_hooks_before_render();
104 104 parent::__construct( $data, $args );
105 105 $this->rtsb_category = 'rtsb-shopbuilder';
106 106 $this->rtsb_icon = 'rtsb-el-custom rtsb-element icon-' . $this->rtsb_base;
107 107 $this->el_prefix = 'rtsb_el_';
@@ -296,11 +296,11 @@
296 296 }
297 297 if ( isset( $value['mode'] ) && 'responsive' === $value['mode'] ) {
298 298 unset( $value['mode'] );
299 299 $repeater->add_responsive_control( $rf_id, $value );
300 - } else{
301 - $repeater->add_control( $rf_id, $value );
302 - }
300 + } else {
301 + $repeater->add_control( $rf_id, $value );
302 + }
303 303 }
304 304
305 305 $field['fields'] = $repeater->get_controls();
306 306
@@ -358,22 +358,22 @@
358 358 ?>
359 359 <script type="text/javascript">
360 360 // Product Archive Catelog
361 361 (function ($) {
362 - setTimeout( function (){
363 - var cartWrpper = $('body').find('<?php echo esc_attr( $selector ); ?>');
364 - var cartIcon = cartWrpper.attr('data-cart-icon');
365 - var cartButton = cartWrpper.find(
366 - '.product_type_grouped, .add_to_cart_button, .single_add_to_cart_button '
367 - );
368 - if (cartIcon) {
369 - console.log( cartButton.find('svg') )
370 - cartButton.find('i').remove();
371 - cartButton.find('svg').remove();
372 - cartButton.find('img').remove();
373 - cartButton.prepend(cartIcon);
374 - }
375 - }, 2000);
362 + setTimeout( function (){
363 + var cartWrpper = $('body').find('<?php echo esc_attr( $selector ); ?>');
364 + var cartIcon = cartWrpper.attr('data-cart-icon');
365 + var cartButton = cartWrpper.find(
366 + '.product_type_grouped, .add_to_cart_button, .single_add_to_cart_button '
367 + );
368 + if (cartIcon) {
369 + //console.log( cartButton.find('svg') )
370 + cartButton.find('i').remove();
371 + cartButton.find('svg').remove();
372 + cartButton.find('img').remove();
373 + cartButton.prepend(cartIcon);
374 + }
375 + }, 2000);
376 376 })(jQuery);
377 377 </script>
378 378 <?php
379 379 }
@@ -747,10 +747,21 @@
747 747 *
748 748 * @return array
749 749 */
750 750 protected function apply_hooks_before_render() {
751 - if( $this->is_edit_mode() ){
751 + if ( $this->is_edit_mode() ) {
752 752 add_filter( 'wp_calculate_image_srcset_meta', '__return_null' );
753 753 }
754 - }
754 + }
755 755
756 + /**
757 + * If checkout registration is disabled and not logged in,
758 + * the user cannot check out.
759 + *
760 + * @return bool
761 + */
762 + protected function has_checkout_restriction() {
763 + $checkout = WC()->checkout();
764 +
765 + return ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in();
766 + }
756 767 }