This topic has 2 replies, 2 voices, and was last updated 2 years, 11 months ago ago by Olga Barlow
I’ve been dealing with an issue related to woocommerce validation specifically when using the woocommerce_add_to_cart_validation hook.
The issue is whenever I pass $passed = false within the hook, the banner with the error isn’t shown until the user goes to the cart page.
The code in which I’m doing that in is in functions.php file in the child theme.
Hello,
Actually, additional customization is outside the scope of our support https://themeforest.net/page/item_support_policy
We use Ajax add to cart and it could be the reason why you don’t see notices on the single product. So, go to Theme Options > WooCommerce > Single product builder > Add to cart > disable Ajax add to cart option.
Also, take into account that copying of the files from the framework folder could cause the issue after theme updates. So, don’t copy whole the file but only functions from the files of that folder and copy them to your child theme functions.php file if you want to change any function from the woo.php file.
Regards
Tagged: add_to_cart, functionality, properly, themes, validation, woocommerce, wordpress
The issue related to '‘woocommerce_add_to_cart_validation doesn’t work properly’' has been successfully resolved, and the topic is now closed for further responses