Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Product Set Update Schedule #13

Closed
growdev opened this issue Feb 8, 2023 · 2 comments
Closed

Custom Product Set Update Schedule #13

growdev opened this issue Feb 8, 2023 · 2 comments
Assignees

Comments

@growdev
Copy link
Member

growdev commented Feb 8, 2023

Overview

This issue includes adding a feature to let customers set a custom update schedule for each Product Set.

Analysis

Currently there is a global setting for update interval at WordPress Dashboard > Product Sets > Configuration > Update Interval

When the dfrps_cron hook fires it will pull one PS post to process based on the _dfrps_cpt_next_update_time meta. The post is updated or deleted based on post status. Trashed posts have their products deleted and will not get a next update time. At the end of phase 5 of the update the next update meta is set by dfrps_get_next_update_time().

Proposed changes

  1. Add a meta box to the PS CPT to let store managers enable a custom schedule. The schedule will include the following configuration options:
Field Type Default Values
Enabled checkbox no yes, or no
Interval radio button Day of week 'Day of week' or 'Day of the month'
Days (if Day of week selected) multi select blank One line for each day of week. Value stored as 0-6.
Days (if Day of the) multi select blank One line for day of month 1 to 28.
Time (HH:MM) select 00:00 First select will have 0-24 for hour, 0-60 for minutes.
  1. Update dfrps_get_next_update_time() to check the post for a custom update time, if not found use the global setting.
@growdev growdev self-assigned this Feb 8, 2023
@EricBusch
Copy link
Member

Perfect! 👍

EricBusch added a commit that referenced this issue Feb 15, 2023
@growdev
Copy link
Member Author

growdev commented Feb 16, 2023

This feature has been deployed.

@growdev growdev closed this as completed Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants