↧
Answer by Nathan for Get product attribute for Simple product in WooCommerce
Building on Loic's answer for an attribute of pa_manufacturer:if ( get_post_type( $post ) === 'product'&& ! is_a($product, 'WC_Product') ) { $product = wc_get_product( get_the_id() ); // Get...
View ArticleAnswer by LoicTheAztec for Get product attribute for Simple product in...
You will use the WC_Product method get_attributes() that returns an array like:global $product;if ( get_post_type( $post ) === 'product'&& ! is_a($product, 'WC_Product') ) { $product =...
View ArticleGet product attribute for Simple product in WooCommerce
I need to get product attributes from product in WooCommerce, type product Simple product, some product can be as dropdown, but much options as radio button. How I can do this? How it possible? With...
View Article