Support » Plugin: WooCommerce Product Image Flipper » 2 quick questions

  • Hi @michelkusters

    Are you still offering support on your plugin? I had a quick question:

    Is there any way you can allow the plugin to load only on certain categories?


Viewing 4 replies - 1 through 4 (of 4 total)
  • @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


    Oh Apologies! Well hopefully @jameskoster will also give me a reply at some point šŸ™‚

    Plugin Author James Koster


    Hey, it’s definitely possible, but would involve editing plugin files.

    Have a look here:

    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 2 years, 9 months ago by James Koster.
    Thread Starter 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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2 quick questions’ is closed to new replies.