Support

Account

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);