Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

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();
    }
}
 

The Rule #1

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

Members online

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom