ActionScheduler_DBStore::stake_claimpublicWC 1.0

Stake a claim on actions.

Method of the class: ActionScheduler_DBStore{}

No Hooks.

Returns

ActionScheduler_ActionClaim.

Usage

$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->stake_claim( $max_actions, ?DateTime $before_date, $hooks, $group );
$max_actions(int)
Maximum number of action to include in claim.
Default: 10
?DateTime $before_date
.
Default: null
$hooks(array)
Hooks to filter for.
Default: array()
$group(string)
Group to filter for.
Default: ''

ActionScheduler_DBStore::stake_claim() code WC 10.8.1

public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
	$claim_id = $this->generate_claim_id();

	$this->claim_before_date = $before_date;
	$this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group );
	$action_ids              = $this->find_actions_by_claim_id( $claim_id );
	$this->claim_before_date = null;

	return new ActionScheduler_ActionClaim( $claim_id, $action_ids );
}