Commit Graph

5 Commits

Author SHA1 Message Date
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Brent Shepherd 6eddeaec50 PHPCS fixes 2018-09-24 11:43:46 +10:00
Brent Shepherd 0c27837b2b Add cancel_all() to WC_Queue_Interface
And the WC_Action_Queue implementation of WC_Queue_Interface.

This avoids ambiguity between the behaviour of cancel(), which can
be confusing given it technically unschedules all actions for cron
or recurring actions, but only the next instance of a single action.
2018-09-20 15:42:24 +10:00
Brent Shepherd ab78e65af9 Update WC_Queue_Interface::get_next()
To more closely align return value with other date APIs in WC, namely
WC_Data. Includes changing return value to:

1. a WC_DateTime instead of a timestamp when a scheduled occurrence is found
2. null instead of false, similar to the default of WC_Data::set_date_prop()
2018-07-31 12:29:15 +10:00
Brent Shepherd 8e4466c9c8 Add WC_Queue_Interface
To provide an agreed set of public methods that need to be defined
for any class wanting to act as WooCommerce's queue handler.

The require APIs support both delay jobs, by providing APIs to
schedule an action/job/event for some time in the future, and a
non-delayed job API, to add an event to the queue to run as soon
as possible.
2018-07-31 12:20:30 +10:00