Home › Forums › Front-end Issues › Displaying all fields in a group › Reply To: Displaying all fields in a group
I suspect it’s to do with the filter on your function ‘woocommerce_before_add_to_cart_form’
At a guess, if your product is out of stock, perhaps this isn’t triggered as the add to cart form won’t be displayed.
Could be wrong!
If you add the below to your function file, then check the message shows on both an instock and out of stock item:
function custom_woocommerce_before_add_to_cart_form(){
echo 'woocommerce_before_add_to_cart_form function is being called';
}
add_action('woocommerce_before_add_to_cart_form', 'custom_woocommerce_before_add_to_cart_form');
Worth trying to rule it out
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.