ActionScheduler_OptionLock::get_existing_lock
Supplies the existing lock value, or an empty string if not set.
Method of the class: ActionScheduler_OptionLock{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->get_existing_lock( $lock_type );
- $lock_type(string) (required)
- A string to identify different lock types.
ActionScheduler_OptionLock::get_existing_lock() ActionScheduler OptionLock::get existing lock code WC 10.3.6
private function get_existing_lock( $lock_type ) {
global $wpdb;
// Now grab the existing lock value, if there is one.
return (string) $wpdb->get_var(
$wpdb->prepare(
"SELECT option_value FROM $wpdb->options WHERE option_name = %s",
$this->get_key( $lock_type )
)
);
}