WC_Session_Handler::init()
Init hooks and session data.
Метод класса: WC_Session_Handler{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Session_Handler = new WC_Session_Handler(); $WC_Session_Handler->init();
Список изменений
С версии 3.3.0 | Введена. |
Код WC_Session_Handler::init() WC Session Handler::init WC 8.7.0
public function init() { $this->init_session_cookie(); add_action( 'woocommerce_set_cart_cookies', array( $this, 'set_customer_session_cookie' ), 10 ); add_action( 'wp', array( $this, 'maybe_set_customer_session_cookie' ), 99 ); add_action( 'shutdown', array( $this, 'save_data' ), 20 ); add_action( 'wp_logout', array( $this, 'destroy_session' ) ); if ( ! is_user_logged_in() ) { add_filter( 'nonce_user_logged_out', array( $this, 'maybe_update_nonce_user_logged_out' ), 10, 2 ); } }