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.
Return
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 9.4.2
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 ) ) ); }