ActionScheduler_OptionLock::new_lock_value │ private │ WC 1.0

Supplies a lock value consisting of a unique value and the current timestamp, which are separated by a pipe character.

Example: (string) "649de012e6b262.09774912|1688068114"

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

Хуков нет.

Возвращает

string.

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

// private - только в коде основоного (родительского) класса
$result = $this->new_lock_value( $lock_type, $now ): string;
$lock_type(строка) (обязательный)
A string to identify different lock types.
$now(int) (обязательный)
The timestamp to use.

Код ActionScheduler_OptionLock::new_lock_value() WC 11.2.2

private function new_lock_value( $lock_type, int $now ): string {
	return uniqid( '', true ) . '|' . ( $now + $this->get_duration( $lock_type ) );
}