Home › Forums › ACF PRO › get value under woocommerce query › Reply To: get value under woocommerce query
I gave you the code above for getting the term id.
For terms acf uses a constructed post id that is
$taxonomy_name.'_'.$term_id
when you get_terms()
, you already know the name of the taxonomy. In you’re case, according to your code the taxonomy is product_cat
. When you loop through the fields the term id is in $product_category->term_id
So you can get the value of the field using
the_field('field_name', 'product_cat_'.$product_category->term_id);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.