I am using advanced custom field(image upload) and the rule is to show that field if taxonomy term is product category.
The image upload field is showing properly on product category page in admin and the file is being uploaded properly.
Now I want to fetch the value using get field. My code is like
$current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
$image = get_field('product_cat_banner',$current_term->taxonomy.'-'.$current_term->term_id);
And it returns nothing.As stated here, I have done exactly the same but can't understand why it's not getting the value.
Any help is highly appreciated. Thanks in advance.