• webercnet

    (@webercnet)


    Hi, your plugin doesn’t works with my theme (total). I wrote what do you say to do to others users, but i’ve not understood where i may put those hooks (below there is your reply)

    “Your theme probably doesn’t use the standard WooCommerce hooks and functions: for this reason you don’t see any badge on products.
    YITH WooCommerce Badge Management uses the following hooks to add the badges on product images:

    woocommerce_single_product_image_html (WooCommerce < 3.0.0)
    woocommerce_single_product_image_thumbnail_html (WooCommerce >= 3.0.0)
    post_thumbnail_html
    You should contact your theme developers and ask them to add/use these missing hooks in their theme.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    and thank you for writing in!

    If you cannot see the badges, it probably depends on your theme not using the standard WooCommerce hooks and functions.
    As you have just read, YITH WooCommerce Badge Management uses these hooks:

    • woocommerce_single_product_image_html (WooCommerce < 3.0.0)
    • woocommerce_single_product_image_thumbnail_html (WooCommerce >= 3.0.0)
    • post_thumbnail_html

    These hooks are used by WooCommerce and WordPress to display the product images; therefore your theme should use them as well.

    Best Regards

    Thread Starter webercnet

    (@webercnet)

    Hi, i’ve understood this, and i’ve already read your message in another post, but i don’t understand where i may put thos hooks in total theme. I wrote also to developer but nothing are able to help me

    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    you can try adding the following code snippet to your theme functions.php:

    if ( !function_exists( 'yith_wcbm_total_badge_container_start' ) && !function_exists( 'yith_wcbm_total_badge_container_end' ) ) {
        add_action( 'woocommerce_before_shop_loop_item_title', 'yith_wcbm_total_badge_container_start', 9 );
        add_action( 'woocommerce_before_shop_loop_item_title', 'yith_wcbm_total_badge_container_end', 11 );
        function yith_wcbm_total_badge_container_start() {
            do_action( 'yith_wcbm_theme_badge_container_start' );
        }
    
        function yith_wcbm_total_badge_container_end() {
            do_action( 'yith_wcbm_theme_badge_container_end' );
        }
    }

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

    Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin doesn’t works with my theme’ is closed to new replies.