Retrive Image Attribute Link
-
Hi, how do we retrieve the image attribute URL? I use this code to display attribute term on current product.
function get_product_brand_attribute() { global $product; if ( is_a( $product, 'WC_Product' ) ) { $brand_terms = wc_get_product_terms( $product->get_id(), 'pa_brand' ); if ( ! empty( $brand_terms ) && ! is_wp_error( $brand_terms ) ) { $brand = reset( $brand_terms ); return $brand->name; //return $brand->imagefromplugin// } } return ''; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Retrive Image Attribute Link’ is closed to new replies.