woocommerce get list of attribute values

前端 未结 4 932

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 08:59

    You can use get_terms() http://codex.wordpress.org/Function_Reference/get_terms

    If you pass in pa_size or pa_color you will get back a list of terms in that taxonomy.

提交回复
热议问题