Category: jQuery
Using AJAX in WordPress
In the constructor of your PHP class add the following In your enqueue function add the localize script function so you have a variable to use in the js file to call admin-ajax.php Then add the callback functions to the same class Then in your js file add the following, assuming you have an element…