wc_session_expiration

wc_session_expiration

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('wc_session_expiration') is found 2 times:

  • /includes/class-wc-session-handler.php line 221
    	 * Set session expiration.
    	 */
    	public function set_session_expiration() {
    		$this->_session_expiring   = time() + intval( apply_filters( 'wc_session_expiring', 60 * 60 * 47 ) ); // 47 Hours.
    		$this->_session_expiration = time() + intval( apply_filters( 'wc_session_expiration', 60 * 60 * 48 ) ); // 48 Hours.
    	}
    
    	/**
    	 * Generate a unique customer ID for guests, or return user ID if logged in.
    	 *
    	 * Uses Portable PHP password hashing framework to generate a unique cryptographically strong ID.
    
  • /src/StoreApi/Routes/V1/AbstractCartRoute.php line 223
    		 * @since 8.7.0
    		 *
    		 * @param int $expiration Expiration in seconds.
    		 */
    		return time() + intval( apply_filters( 'wc_session_expiration', DAY_IN_SECONDS * 2 ) );
    	}
    
    	/**
    	 * Checks if the request has a valid cart token.
    	 *
    	 * @param \WP_REST_Request $request Request object.