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.

Метод класса: ActionScheduler_HybridStore{}

Хуков нет.

Возвращает

ActionScheduler_ActionClaim.

Использование

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->stake_claim( $max_actions, $before_date, $hooks, $group );
$max_actions(int)
-
По умолчанию: 10
$before_date(DateTime|null)
-
По умолчанию: null
$hooks **
-
По умолчанию: array()
$group **
-
По умолчанию: ''

Код ActionScheduler_HybridStore::stake_claim() 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 );
}