How to give user rights to wp-cron?
-
I have a cron job running on my site every hour. It triggers a function inside a plugin, which has the following piece of code:
if ( ! current_user_can( 'manage_options' )) wp_die( __('You do not have sufficient permissions to do this.') ); }
Since it’s the wp-cron running this function, obviously the job fails at this point, as it has no such rights. How do I give wp-cron more rights to do stuff? Is it even possible?
I can comment that out, but I don’t think that’s the best solution here from the security perspective.
- The topic ‘How to give user rights to wp-cron?’ is closed to new replies.