WordPress at Your Fingertips
function is not described

ActionScheduler_Store::cancel_actions_by_group() public WC 3.0.0

Cancel pending actions by group.

{} It's a method of the class: ActionScheduler_Store{}

No Hooks.

Return

null. Nothing.

Usage

$ActionScheduler_Store = new ActionScheduler_Store();
$ActionScheduler_Store->cancel_actions_by_group( $group );
$group(string) (required)
Group slug.

Changelog

Since 3.0.0 Introduced.

Code of ActionScheduler_Store::cancel_actions_by_group() WC 6.1.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'  => 'action_id',
			)
		);

		$this->bulk_cancel_actions( $action_ids );
	}
}