WC_Session_Handler::maybe_update_nonce_user_logged_out()
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.
Метод класса: WC_Session_Handler{}
Хуков нет.
Возвращает
int|Строку
.
Использование
$WC_Session_Handler = new WC_Session_Handler(); $WC_Session_Handler->maybe_update_nonce_user_logged_out( $uid, $action );
- $uid(int) (обязательный)
- User ID.
- $action(строка) (обязательный)
- The nonce action.
Список изменений
С версии 5.3.0 | Введена. |
Код WC_Session_Handler::maybe_update_nonce_user_logged_out() WC Session Handler::maybe update nonce user logged out WC 9.3.3
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; }