PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.3
ShopBuilder – WooCommerce Builder For Elementor v2.5.3
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 +41 -21 2.0.32.5.3 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 }
@@ -388,8 +388,9 @@
388 388 if ( ! $this->is_edit_mode() ) {
389 389 return;
390 390 }
391 391 $ajaxurl = admin_url( 'admin-ajax.php' );
392 +
392 393 if ( in_array( 'sitepress-multilingual-cms/sitepress.php', get_option( 'active_plugins' ) ) ) {
393 394 $ajaxurl = admin_url( 'admin-ajax.php?lang=' . ICL_LANGUAGE_CODE );
394 395 }
395 396 ?>
@@ -405,9 +406,17 @@
405 406 setTimeout(function() {
406 407 rtsbProductPageInit();
407 408 }, 1000);
408 409 <?php if ( rtsb()->has_pro() ) { ?>
409 - rtsbFilters();
410 + var isMasonry = jQuery('.rtsb-elementor-container .rtsb-masonry');
411 +
412 + if(isMasonry.length > 0) {
413 + isMasonry.masonry();
414 + }
415 +
416 + if (typeof rtsbFilters === 'function') {
417 + rtsbFilters();
418 + }
410 419 setTimeout( function (){
411 420 window.rtsbCountdownApply();
412 421 }, 1000 );
413 422 <?php } ?>
@@ -747,10 +756,21 @@
747 756 *
748 757 * @return array
749 758 */
750 759 protected function apply_hooks_before_render() {
751 - if( $this->is_edit_mode() ){
760 + if ( $this->is_edit_mode() ) {
752 761 add_filter( 'wp_calculate_image_srcset_meta', '__return_null' );
753 762 }
754 - }
763 + }
755 764
765 + /**
766 + * If checkout registration is disabled and not logged in,
767 + * the user cannot check out.
768 + *
769 + * @return bool
770 + */
771 + protected function has_checkout_restriction() {
772 + $checkout = WC()->checkout();
773 +
774 + return ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in();
775 + }
756 776 }