hello, I want to display some html ONLY for selected woocommerce products (or another option is ONLY for selected product category) which are selected in option page with realtionship picker. My result is: html is displayed for all products instead. This is what I have:
$post = get_field('pick_products', 'option');
$prom_img = get_field('promo_img', 'option');
if ( $post ) {
foreach( $post as $post ):
setup_postdata($post);
$sales_html = '<div class="promo-badge test"><img src=' . $prom_img['url'] . '></div>';
wp_reset_postdata();
endforeach;
}