Configure Product Set updates to happen between specific times

Here's how to force your Products Sets to update at specific times. For example, if you only want your Product Sets to update in the middle of the night, you can use this code to control when your Product Sets should update.

Important If a Product Set is currently updating, it will continue to do so until it's finished.


Create a custom plugin

If you haven't done so already, create a custom plugin.


Configure your Timezone

Go here WordPress Admin Area > Settings > General and ensure that your website has the proper Timezone setting. If your site's timezone is not properly configure, your Product Sets will not update at the times you configure it to update.


Add custom code

Add the following custom code to your custom plugin:


Edit the $update_hours

In the code above (lines #28), configure the hours in which Product Sets should update.

Possible hour values are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 and 23.

All hours should be comma-separated.



Save your custom plugin file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us