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

[Feature Request] Automatically change active status sale for upcoming sale. #123

Open
andrewlimaza opened this issue Sep 15, 2022 · 0 comments

Comments

@andrewlimaza
Copy link
Collaborator

andrewlimaza commented Sep 15, 2022

It'd be neat to automatically set a sales 'active' status for upcoming sales, this helps site owners run their sales fully autonomously and won't need to login to turn their sale on or off.

This might be nice to opt-into to give flexibility and control over to sales as maybe the person doesn't want to automatically turn on a sale for whatever reason (i.e. incomplete sale settings).

An option as post meta could work, such as "Automatically activate sale?" and we can query this when figuring out which sale to automatically activate next.

It should only activate sales if:

  • Setting is enabled.
  • Sales start date is today or in the future AND sales end date is today or in the future.
  • Activate the next one based on the start date order.
  • Runs daily to check if a sale needs to be activated and then caches data to save some memory (although one query a day automatically isn't too heavy via a cron).

Ignore any currently active sales, just so we don't turn off an active sale.

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

1 participant