add_action not adding action to hook
-
I am trying to schedule a function to run immediately in the background. I can schedule the hook, but there’s no function attached to it!?
The function works. I’ve successfully called it but it’s slow so I want it to run in the background.
Here’s the code I’m using to schedule it.
function rmi_delete_all_providers(){ //stuff } add_action('rmi_bg','rmi_delete_all_providers',10,0); wp_schedule_single_event( time(), 'rmi_bg' ); spawn_cron();
I’ve run this with a delay so I can check it in WP Crontrol. The hook is there, but there is no associated action. I’ve also tried the add_action without the optional values.
Any ideas why I can’t get this function to properly attach to the hook?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘add_action not adding action to hook’ is closed to new replies.