Why is this Ajax not working?
When you load a php file directly via an ajax request (UncheckPackageThemeHelper.php) it’s loaded outside the context of WordPress, so no WordPress core functions are available. All WordPress ajax requests should be routed through admin-ajax.php. You can print the URL with the function admin_url: admin_url( ‘admin-ajax.php’ ) When admin-ajax.php is loaded, WordPress is bootstrapped, so … Read more