| @@ -186,9 +186,9 @@ | ||
| 186 | 186 | * |
| 187 | 187 | * @return array |
| 188 | 188 | */ |
| 189 | 189 | public function promo_content() { |
| 190 | - if ( rtsb()->has_pro() ) { | |
| 190 | + if ( rtsb()->has_pro() || $this->widget_exceptions() ) { | |
| 191 | 191 | return []; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | $promo_fields = []; |
| @@ -365,9 +365,9 @@ | ||
| 365 | 365 | var cartButton = cartWrpper.find( |
| 366 | 366 | '.product_type_grouped, .add_to_cart_button, .single_add_to_cart_button ' |
| 367 | 367 | ); |
| 368 | 368 | if (cartIcon) { |
| 369 | - console.log( cartButton.find('svg') ) | |
| 369 | + //console.log( cartButton.find('svg') ) | |
| 370 | 370 | cartButton.find('i').remove(); |
| 371 | 371 | cartButton.find('svg').remove(); |
| 372 | 372 | cartButton.find('img').remove(); |
| 373 | 373 | cartButton.prepend(cartIcon); |
| @@ -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,18 @@ | ||
| 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 | + } | |
| 419 | + | |
| 410 | 420 | setTimeout( function (){ |
| 411 | 421 | window.rtsbCountdownApply(); |
| 412 | 422 | }, 1000 ); |
| 413 | 423 | <?php } ?> |
| @@ -744,9 +754,9 @@ | ||
| 744 | 754 | |
| 745 | 755 | /** |
| 746 | 756 | * Elementor controls marge all settings |
| 747 | 757 | * |
| 748 | - * @return array | |
| 758 | + * @return void | |
| 749 | 759 | */ |
| 750 | 760 | protected function apply_hooks_before_render() { |
| 751 | 761 | if ( $this->is_edit_mode() ) { |
| 752 | 762 | add_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); |
| @@ -762,6 +772,21 @@ | ||
| 762 | 772 | protected function has_checkout_restriction() { |
| 763 | 773 | $checkout = WC()->checkout(); |
| 764 | 774 | |
| 765 | 775 | return ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in(); |
| 776 | + } | |
| 777 | + | |
| 778 | + /** | |
| 779 | + * Widget Exceptions. | |
| 780 | + * | |
| 781 | + * @return bool | |
| 782 | + */ | |
| 783 | + private function widget_exceptions() { | |
| 784 | + $exceptions = [ | |
| 785 | + 'rtsb-product-filters', | |
| 786 | + 'rtsb-wishlist', | |
| 787 | + 'rtsb-product-breadcrumbs', | |
| 788 | + ]; | |
| 789 | + | |
| 790 | + return in_array( $this->rtsb_base, $exceptions, true ); | |
| 766 | 791 | } |
| 767 | 792 | } |