Executing $wpdb during ajax call wc-ajax=checkout generate HTML content
-
Hi,
I’m adding an action to the
woocommerce_order_status_pending_to_processing
hook, that executes a$wpdb
function to feed a plugin table during ajax callwc-ajax=checkout
, but it generates HTML content in the XHR response and the checkout page do not proceed to the ThankYou page, instead it show an error notification “SyntaxError: Unexpected token ‘<‘”.If I execute the hook without the $wpdb part, it’s working like a charm. I have no idea what’s going on, I litteraly tried everyhting I could but I can’t finaly fix it.
Please I need your help ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Executing $wpdb during ajax call wc-ajax=checkout generate HTML content’ is closed to new replies.