Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders\WooPayments

WooPaymentsService::clear_onboarding_lockprivateWC 1.0

Unlock the onboarding.

WARNING: this writes 0 unconditionally and has no ownership check, so it clears whatever lock is currently set — including one a concurrent request acquired. Call it only when clearing the lock is safe regardless of ownership:

  • to release a lock this same request set (e.g. in the finally that pairs with
    set_onboarding_lock()); or
    • to self-heal a lock that has already exceeded its TTL (see is_onboarding_locked()),
      where the stale timestamp means no live request is expected to still hold it.

      Do NOT call it after work that runs unlocked, where another request may have taken the lock in the meantime. Safe concurrent release would require a per-request token (compare-and-swap), which is deferred to the broader shared-lock work.

Method of the class: WooPaymentsService{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->clear_onboarding_lock(): void;

WooPaymentsService::clear_onboarding_lock() code WC 11.0.0

private function clear_onboarding_lock(): void {
	// We update rather than delete the option for performance reasons.
	$this->proxy->call_function( 'update_option', self::NOX_ONBOARDING_LOCKED_KEY, 0, false );
}