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