@dav74 I think that you accidentally tagged me. The plugin seems to be published by @jameskoster (Thanks for that, James!)
I`m sure it’s technically possible though. Good luck!
Thread Starter
dav74
(@dav74)
Oh Apologies! Well hopefully @jameskoster will also give me a reply at some point 🙂
Hey, it’s definitely possible, but would involve editing plugin files.
Have a look here: https://github.com/jameskoster/woocommerce-product-image-flipper/blob/master/image-flipper.php
To do what you want, move lines 31-33 to the pif_init function (a couple of lines below) and wrap them in a product category query like so;
if ( is_product_category( 'my-category' ) ) {
add_action( 'wp_enqueue_scripts', array( $this, 'pif_scripts' ) );
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'woocommerce_template_loop_second_product_thumbnail' ), 11 );
add_filter( 'post_class', array( $this, 'product_has_gallery' ) );
}
Note: I haven’t actually tested this, but I believe it should work 🙂
-
This reply was modified 7 years, 3 months ago by
James Koster.
Thread Starter
dav74
(@dav74)
Hello @jameskoster
Very kind of you to reply so quickly. I will have a look to see if I can get that to work. It is amazing that you are the only person to have offered this feature for WooCommerce to date. So useful!