WordPress at Your Fingertips
function is not described

WC_Session_Handler::maybe_update_nonce_user_logged_out() public WC 5.3.0

When a user is logged out, ensure they have a unique nonce to manage cart and more using the customer/session ID. This filter runs everything wp_verify_nonce() wp_create_nonce() called.

{} It's a method of the class: WC_Session_Handler{}

No Hooks.

Return

Int|String.

Usage

$WC_Session_Handler = new WC_Session_Handler();
$WC_Session_Handler->maybe_update_nonce_user_logged_out( $uid, $action );
$uid(int) (required)
User ID.
$action(string) (required)
The nonce action.

Changelog

Since 5.3.0 Introduced.

Code of WC_Session_Handler::maybe_update_nonce_user_logged_out() WC 5.9.0

public function maybe_update_nonce_user_logged_out( $uid, $action ) {
	if ( Automattic\WooCommerce\Utilities\StringUtil::starts_with( $action, 'woocommerce' ) ) {
		return $this->has_session() && $this->_customer_id ? $this->_customer_id : $uid;
	}

	return $uid;
}