• Resolved PetrP

    (@petrp)


    Hi, very nice plugin. Is it possible to somehow set it up that it would be possible to add the general product to the wishlist, and not just 1 specific variation of that product?

    If not: is it possible to show on the wishlist-page, at least the pic of the general product (featured image) and not the variation image (which is just a color in our case)?

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hello PetrP,

    Unfortunately, it’s not possible. It will require overriding lots of actions and methods to add a general product into a wishlist.

    Though you can add the next filter somewhere in your functions.php file:

    function change_image_variation( $image, $wl_product, $product ){    
    	if ( 'variation' === $product->product_type ) {
    	    $product = wc_get_product( $wl_product['product_id'] );
    	    return $product->get_image();
    	}	
    	return $image;
        }
        add_filter( 'tinvwl_wishlist_item_thumbnail', 'change_image_variation', 10, 3 );

    It will display featured image of a product instead of its variation image.

    Kind regards,
    Konstantin.

    Thread Starter PetrP

    (@petrp)

    thanks a lot!

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