PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
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/Modules/Badges/BadgesFrontEnd.php +0 -16 3.4.23.2.6 View file →
@@ -367,16 +367,8 @@
367 367 if ( ! apply_filters( 'rtsb/module/badges/show', true ) ) {
368 368 return;
369 369 }
370 370
371 - // Ensure badge data is prepared for the current product. On the normal front end
372 - // `the_post` / `rtsb_before_product_template_render` populate it, but those don't
373 - // fire for the Product Badges Elementor widget (or Elementor editor), leaving
374 - // `all_badges` empty. Cached per product id, so this is idempotent and cheap.
375 - if ( empty( $this->all_badges ) ) {
376 - $this->wc_setup_product_badge_data();
377 - }
378 -
379 371 $group_classes = [ 'rtsb-group-custom-position' ];
380 372
381 373 $group_position = ( $this->options['group_badge_position'] ?? 'top-left' );
382 374 // group_badge_position.
@@ -397,12 +389,8 @@
397 389 public function badges_position() {
398 390 // Single Page Badges Position.
399 391 $product_hook_priority = ( $this->options['product_page_group_hook_priority'] ?? null );
400 392
401 - if ( '' === $product_hook_priority ) {
402 - $product_hook_priority = null;
403 - }
404 -
405 393 $positions = apply_filters(
406 394 'rtsb/module/product_page_badges/positions',
407 395 [
408 396 'before_add_to_cart' => [
@@ -438,12 +426,8 @@
438 426 add_action( $positions[ $product_page_position ]['hook'], [ $this, 'add_group_badges_for_product' ], isset( $positions[ $product_page_position ]['priority'] ) ? absint( $positions[ $product_page_position ]['priority'] ) : '' );
439 427 }
440 428
441 429 $loop_hook_priority = ( $this->options['group_position_hook_priority'] ?? null );
442 -
443 - if ( '' === $loop_hook_priority ) {
444 - $loop_hook_priority = null;
445 - }
446 430
447 431 // Shop Page/ Any Product Query loop.
448 432 $positions = apply_filters(
449 433 'rtsb/module/shop_page_badges/positions',