How to properly use wp.ajax.post?

wp.ajax.post will need you to wrap your response with wp_send_json_success. It will add additional parameter on your json response with success flag.

Leave a Comment