Display specific product attributes on Woocommerce archives pages
问题 I want to display some specific product attributes of my choice on the store shop page for each product. It is necessary to display the name of the attribute and opposite its value. I started writing code, I wanted to print at least names, but I only show the name of the last attribute add_action('woocommerce_after_shop_loop_item','add_attribute'); function add_attribute() { global $product; $weigth_val = $product->get_attribute('weight'); $quant_val = $product->get_attribute('quantity');