Adding products with AJAX and WC_Form_Handler
-
Hi,
I am adding products with AJAX calls. When I click the add to cart button I want all form variables to be sent in the ajax post call. This means that a hidden input named add-to-cart is included in the post and it seems that the “wp_loaded” action is executed before my “wp_ajax_…” action.
This means that the product gets added in WC_Form_Handler::add_to_cart_action before my ajax method gets invoked.
Is this by design or will I ever be able to supply an $_POST[‘add-to-cart’] and having my ajax method being able to intercept this post?
Thanks in advance
Joakim
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding products with AJAX and WC_Form_Handler’ is closed to new replies.