ActionScheduler_HybridStore::stake_claim()publicWC 1.0

If any actions would have been claimed by the secondary store, migrate them immediately, then ask the primary store for the canonical claim.

Method of the class: ActionScheduler_HybridStore{}

No Hooks.

Return

ActionScheduler_ActionClaim.

Usage

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->stake_claim( $max_actions, $before_date, $hooks, $group );
$max_actions(int)
-
Default: 10
$before_date(DateTime|null)
-
Default: null
$hooks **
-
Default: array()
$group **
-
Default: ''

ActionScheduler_HybridStore::stake_claim() code WC 8.7.0

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

	$claimed_actions = $claim->get_actions();
	if ( ! empty( $claimed_actions ) ) {
		$this->migrate( $claimed_actions );
	}

	$this->secondary_store->release_claim( $claim );

	return $this->primary_store->stake_claim( $max_actions, $before_date, $hooks, $group );
}