Validation Issue with Redirect
-
I have come across what may be a bug or may be effectively a conflict with another plug-in. I have added a Gravity Form to my product to gather more details about the product the person is buying. That all works fine, including the redirect after the item is added to the cart, unless there is a validation error on the form. If there is a validation error on the form the system fails silently, meaning the redirect happens but without the product being added to the cart. I started trouble-shooting this with the creators of the plug-in “WooCommerce Gravity Forms Product Add-Ons” and here is what they said:
Unfortunately, this sounds like an issue with their redirect plugin.
It must not be properly calling the correct actions or validating that the product add to cart action is valid before doing the redirect. Gravity Forms Product Addons properly hooks into the add to cart validation action and will return false if the form isn’t valid. So they must not be respecting the validation hook from WooCommerce.
I just tried to test your plug-in on a product that does not use a Gravity Form but that would produce a validation error and I could not find a way to really produce an invalid product add-to-cart. I created variations but WooCommerce disables the add to cart button unless the user selects a variation.
I’ve included a link to a page where you can test the system. To produce the problem do not enter anything in the Food Preferences field.
Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Validation Issue with Redirect’ is closed to new replies.