Variable Product Image
-
Hi,
I added the following snippet as recommended, but it seems that the code does not display the image for the product that has the variation attribute.
It only works for the “Simple product”.function example_product_image( $product ) { if( ( '' !== $product->get_id() ) && has_post_thumbnail( $product->get_id() ) ) { echo get_the_post_thumbnail( $product->get_id(), array( 40, 40 ), array( 'loading' => false ) ); } } add_action( 'wcdn_order_item_before', 'example_product_image' );Please,
How to make this snippet work for “Variable Product”?
And,
How to display a description text next to the image, aligned vertically, and avoid that the image is surrounded by the text?Thank you very much,
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Variable Product Image’ is closed to new replies.