You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Is your feature request related to a problem? Please describe.
The ajax add to cart feature send an ajax request when the ajax add to cart button is clicked. I would like a way to prevent this ajax call from firing if certain conditions are not met.
While generally simple products require no validation, there are times when plugins (like Name Your Price) might add fields that need validating, yet still want to take advantage of ajax add to cart.
In PHP we could use apply_filters to validate the product (and you do use that validating via woocommerce_add_to_cart_validation). I'd like to propose a JS alternative.
Describe the solution you'd like
Some kind of condition/flag that will prevent the add to cart ajax call from firing. I'm proposing the same thing in One Page Checkout and it could make sense if you both used the same condition.
Activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment