so I’ve some Superior Customized Fields on my product web page. They’re displayed within the store loop, like so:
add_action('woocommerce_after_shop_loop_item_title', 'tagline', 5);
perform tagline() {
international $product;
$product_id = $product->get_id();
if (isset(get_fields()['product_tagline'])) {
$tagline = get_fields()['product_tagline'];
}
echo '<p class="tagline">' . $tagline . '</p>';
}
I am additionally utilizing ACF to pick out merchandise in a submit, so if we point out merchandise in a weblog submit, I can choose them to show as a sidebar. I am scuffling with getting the $tagline
from my product fields to make use of in my sidebar.
I’ve tried $tagline = get_fields()['product_tagline'];
however the result’s null
. Any thought of the place I am going fallacious?