0
votes
0answers
51 views

Ajax Request not coming back to class

I'm struggling with an ajax request. It's executed but not returning back to my class. My PHP: ... public function __construct() { add_action( 'admin_print_styles', ...
0
votes
1answer
123 views

Wp ajax not working from “current_screen” admin hook

I have a class that is doing some backend work ( enqueening css and js files creating metaboxes, registering ajax hooks etc...) Everything works fine when I just include the files. The problem is ...
2
votes
3answers
1k views

Using Ajax with a Class file

At the moment I have an ajax that works (I get a success [200] response), but having an issue with the action hooks on the response. The JSON object is not coming back, instead I'm getting a 0. I ...
0
votes
1answer
134 views

Why can wordpress not find the actions I add in my constructor?

I have a theme which has a page to display a keyword taxonomy called taxonomy-keyword.php. From this page I instantiate a sort of ViewModel called KeywordPage. It looks like this: namespace ...
1
vote
3answers
511 views

Ajax with OOP doesn't work

I have a small script within theme's functions.php file that uses ajax, principle like this: add_action('admin_head', 'rw_script'); function rw_script() { echo ' <script ...