Certain actions failing when run through cron

Ok, so it turns out the solution is slightly embarrassing on my part and I couldn’t see the forest for the trees. The code that was executed by the cron job was trying to check the contents of a variable that is set via a radio button on the admin / plugin activation page. Thus, … Read more

After plugin options changed hook

Use the action update_option_{$option}, where $option is the same as the second argument for register_setting(). This hook fires after the option has been updated. add_filter( ‘update_option_directory’, ‘run_after_change’, 10, 2 ); function run_after_change( $old_value, $new_value ) { // compare both values and do something } 10 is the priority, 2 the number of accepted arguments for … Read more

Can you register two cron events in a single function?

It looks like Howdy_McGee pinpointed the issue in a comment on the original question: Make the new_interval() a method of your class and call the filter inside your activation hook (above the cron registrations): add_filter(‘cron_schedules’, array( $this, ‘new_interval’ ) );

WordPress Cron Job in Bookly Plugin [closed]

You should set up a cron job on the server to do what the plugin authors are asking you to do: execute the php command they’ve given you. Just make sure you’re not setting up WordPress’s wp_cron(), since this one is not a real cron job. From this article: When it comes to WordPress, you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)