By default, ACF fields can be displayed like this:
<?php the_field('slogan');?>
or like this:
<?php if( get_field("slogan") ): ?> <?php the_field( "slogan" ); ?> <?php else :?> Custom text if needed. <?php endif; ?>
In WooCommerce, this construction does not work, below are correct code example:
$queriedObject = get_queried_object(); echo get_field('slogan','product_cat_'.$queriedObject->term_id); $queriedObject = get_queried_object(); echo get_field('slogan','term_'.$queriedObject->term_id); $queriedObject = get_queried_object(); echo get_field('slogan', $queriedObject);