Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Woocommerce issue

OK, cool.

The code snippet that appears in your opening post, is that literally copy and pasted? As there is currently a syntax issue with it if that is the case?

I updated it earlier as I noticed an issue. I'm not sure whether you're seeing the revised version so this is the code:

Code:
add_action( 'woocommerce_before_main_content', 'remove_test_category_thumbnails', 10 );

function remove_test_category_thumbnails() {
    if (is_product_category('test-category')) {
        remove_action('woocommerce_before_shop_loop_item_title' , 'woocommerce_template_loop_product_thumbnail' , 10);
    }
}

add_action( 'woocommerce_before_shop_loop_item_title', 'add_test_category_thumbnails', 10 );

function add_test_category_thumbnails() {
    global $post;
    $testCatThumb = get_post_meta( $post->ID, 'step_dad_mug', true);
    if (is_product_category('test-category') && (isset($testCatThumb)) ) {
        echo wp_get_attachment_image( $testCatThumb );
    }
    else
        echo woocommerce_get_product_thumbnail();
    }
}
 

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Systreg AcornBot:
    Systreg has left the room.
      Systreg AcornBot: Systreg has left the room.
      Top Bottom