Automattic\WooCommerce\Internal\Admin\Orders
EditLock::is_locked_by_another_user()
Checks whether the order is being edited (i.e. locked) by another user.
Метод класса: EditLock{}
Хуков нет.
Возвращает
true|false
. TRUE if order is locked and currently being edited by another user. FALSE otherwise.
Использование
$EditLock = new EditLock(); $EditLock->is_locked_by_another_user( $order ) : bool;
- $order(\WC_Order) (обязательный)
- Order to check.
Код EditLock::is_locked_by_another_user() EditLock::is locked by another user WC 9.3.3
public function is_locked_by_another_user( \WC_Order $order ) : bool { $lock = $this->get_lock( $order ); return $lock && ( get_current_user_id() !== $lock['user_id'] ); }