Since woocommerce version 3.4 it is possible to anonymize order data either manually or via a scheduled interval (Days / Weeks / Months / Years). Now I would like to customize the interval to twice daily.

I am using the wp-crontrol plugin to edit the corresponding woocommerce wp-cron job (hookname: woocommerce_cleanup_personal_data). When testing it on my local environment it works perfectly fine but unfortunately not on the live server.

Although I can change the interval and in the wp-cron log it is listed as being executed at the desired time nothing happens to the order data (it is not being anonymized). After some further research I have understood that the following cases could cause wp-cron jobs not to work:

1. using a cache plugin

Yes, I am using a cache plugin on the live server (not on my local environment though). So I have tried deactivating given plugin but still nothing happens.

2. different time zone settings of server and wordpress install

I have changed the wordpress timezone settings to match the timezone on the server. Still no luck.

3. no http request to the site (no user visiting the page)

I myself have visited the pages over a dozen times (in admin mode and as normal user). Also there have been other visitors on the page.

Also I don't want to replace the wp-cron job with a real server cron job. Does anyone have any idea what I could be missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.