If you use custom product templates to show attribute images in product short description for example, you can use our new shortcode. The shortcode is [woocommerce_attribute_images_attributes] with parameters for product (optional) and attributes (attribute name, separated by comma).

Example to show attributes color and size for current product:

[woocommerce_attribute_images_attributes attributes="color"]

Example to show attribute color for product with the ID 354:

[woocommerce_attribute_images_attributes product="PRODUCT_ID" attributes="color"]

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.