add_action and wp_schedule_single_event Doesn’t Work – Please Help
-
Hi All,
I have some strange problem and don’t understand why this doesn’t work:
wp_schedule_single_event(time()+15, 'test_event'); add_action('test_event', 'test_function'); function test_function(){ echo 'IN test_function() FUNCTION'; } //counter $cnt=wp_next_scheduled('test_event') - time(); echo $cnt;
This code should call test_function() after 15 sec.
And print ‘IN test_function() FUNCTION’ on the screen.
I’m refreshing screen and looking how counter goes from 15 to -10 but never see that it call function test_function()Can anybody help.
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘add_action and wp_schedule_single_event Doesn’t Work – Please Help’ is closed to new replies.