display all Custom Product Attributes error
-
sorry i’m from viet nam and my skill english not well ! i have this code in my site , but it not work , please help me to fix it or give me another solution . I need get all attributes name +value . thanks for readed
function isa_woo_all_pa(){ global $product; $attributes = $product->get_attributes(); if ( ! $attributes ) { return; } $out = ''; foreach ( $attributes as $attribute ) { $out .= $attribute['name'] . ': '; $out .= $attribute['value'] . '<br />'; } echo $out; } add_action('woocommerce_single_product_summary', 'isa_woo_all_pa');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘display all Custom Product Attributes error’ is closed to new replies.