我在Woocommerce中对我的产品使用了许多产品属性,我正在循环通过一个表中的所有变体,该表可以在产品页面上使用短码显示。对于这个表,我需要表头中的所有产品属性(这是在循环遍历变体之前),我使用以下命令获取属性:foreachget_attributes();
foreach ($attributes as $attri
我试图在WooCommerce中列出所有属性(填不填)。使用此代码:
//show attributes after summary in product single view add_action('woocommerce_single_product_summary', function() { //template for this is in storefront-child/woocommerce/single-produc
我创建了如下product_attributes:Color have slug color / Size has slug size 在产品中:如何按插件显示color名称/标签。我尝试使用wc_get_product_terms,但它的属性值是color / size,而不是var_dup(color / size)信息。