Get attribute from slug and output in ACF field

 $term = $product->get_attribute( 'pa_slug' );
 $term = get_term_by('slug', $term, 'pa_slug');
 $output_acf_field = get_field('output-attribute', 'pa_slug_'.$term->term_id);

Leave a Reply

Your email address will not be published. Required fields are marked *