Viewing 1 replies (of 1 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    and thank you for writing in!

    Please try adding the following code snippet to your theme functions.php:

    if ( !class_exists( 'YITH_WCBM_Customization_Print_First_Only' ) ) {
        class YITH_WCBM_Customization_Print_First_Only {
            private static $printed = array();
    
            public static function check( $badge_html, $id_badge, $product_id ) {
                $my_id = $id_badge . '-' . $product_id;
    
                if ( in_array( $my_id, self::$printed ) ) {
                    return '';
                }
    
                self::$printed[] = $my_id;
    
                return $badge_html;
            }
        }
    
        add_filter( 'yith_wcbm_get_badge', array( 'YITH_WCBM_Customization_Print_First_Only', 'check' ), 10, 3 );
    }

    Please try this solution and let us know if everything works fine!

    Best Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Badge duplicated’ is closed to new replies.