woocommerce get list of attribute values

前端 未结 4 896

I\'m using woocommerce on wordpress to create a simple shop site and I\'ve added a couple attributes to a product. These are namely, size and color. Un

4条回答
  •  走了就别回头了
    2021-02-04 09:16

    In addition to @user5029040 answer, which outputs html, if you want to get an array you can use the following function.

    $product->get_variation_attributes();
    

提交回复
热议问题