Ajax for subscibers not working

If an AJAX function does not work properly, in most cases you forgot to allow Users with no or little privileges to access the function.

Adding the Callback Function is quite simple:

add_action('wp_ajax_my_action', 'my_action_callback');

Now you need to do the same thing for the “not-so-privileged” users:

add_action('wp_ajax_nopriv_my_action', 'my_action_callback');

With these two lines everything should work as expected.