WC_Session_Handler::init_hooks
Initialize the hooks.
Метод класса: WC_Session_Handler{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->init_hooks();
Код WC_Session_Handler::init_hooks() WC Session Handler::init hooks WC 11.2.2
protected function init_hooks() {
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( 'template_redirect', array( $this, 'destroy_session_if_empty' ), 999 );
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 );
}
}