ActionScheduler_OptionLock::new_lock_value
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"
Method of the class: ActionScheduler_OptionLock{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->new_lock_value( $lock_type, $now ): string;
- $lock_type(string) (required)
- A string to identify different lock types.
- $now(int) (required)
- The timestamp to use.
ActionScheduler_OptionLock::new_lock_value() ActionScheduler OptionLock::new lock value code WC 11.2.1
private function new_lock_value( $lock_type, int $now ): string {
return uniqid( '', true ) . '|' . ( $now + $this->get_duration( $lock_type ) );
}