ActionScheduler_DBStore::stake_claim()
Stake a claim on actions.
Метод класса: ActionScheduler_DBStore{}
Хуков нет.
Возвращает
ActionScheduler_ActionClaim
.
Использование
$ActionScheduler_DBStore = new ActionScheduler_DBStore(); $ActionScheduler_DBStore->stake_claim( $max_actions, $before_date, $hooks, $group );
- $max_actions(int)
- Maximum number of action to include in claim.
По умолчанию: 10 - $before_date(\DateTime)
- Jobs must be schedule before this date.
По умолчанию: now - $hooks(массив)
- Hooks to filter for.
По умолчанию: array() - $group(строка)
- Group to filter for.
По умолчанию: ''
Код ActionScheduler_DBStore::stake_claim() ActionScheduler DBStore::stake claim WC 8.7.0
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 ); }