ActionScheduler_Store::cancel_actions_by_group()
Cancel pending actions by group.
Method of the class: ActionScheduler_Store{}
No Hooks.
Return
null
. Nothing (null).
Usage
$ActionScheduler_Store = new ActionScheduler_Store(); $ActionScheduler_Store->cancel_actions_by_group( $group );
- $group(string) (required)
- Group slug.
Changelog
Since 3.0.0 | Introduced. |
ActionScheduler_Store::cancel_actions_by_group() ActionScheduler Store::cancel actions by group code WC 9.3.1
public function cancel_actions_by_group( $group ) { $action_ids = true; while ( ! empty( $action_ids ) ) { $action_ids = $this->query_actions( array( 'group' => $group, 'status' => self::STATUS_PENDING, 'per_page' => 1000, 'orderby' => 'none', ) ); $this->bulk_cancel_actions( $action_ids ); } }