I'm writing a plugin. It has some job to be execute by wp_cron. Now within the script, it create/edit some posts automatically. So which user will be running the cron job?
Also I notice it failed when calling WP_Filesystem()
Well I've found out that it's running as no one, as get_current_user_id() returns 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With