ActionScheduler_wpPostStore::stake_claim
Stake claim.
Метод класса: ActionScheduler_wpPostStore{}
Хуков нет.
Возвращает
ActionScheduler_ActionClaim.
Использование
$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore(); $ActionScheduler_wpPostStore->stake_claim( $max_actions, ?DateTime $before_date, $hooks, $group );
- $max_actions(int)
- Maximum number of actions.
По умолчанию:10 - ?DateTime $before_date
- .
По умолчанию:null - $hooks(массив)
- Claim only actions with a hook or hooks.
По умолчанию:array() - $group(строка)
- Claim only actions in the given group.
По умолчанию:''
Код ActionScheduler_wpPostStore::stake_claim() ActionScheduler wpPostStore::stake claim WC 11.2.1
public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) {
$this->claim_before_date = $before_date;
$claim_id = $this->generate_claim_id();
$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 );
}