Blog Placholder Image WooCommerce Session and Cookies

WooCommerce Session and Cookies

Today’s tutorial is about how the session and cookies work in WooCommerce. This tutorial will guide you on how woocommerce initializes the session and cookies.

Initially, WooCommerce uses the PHP cookies to store data on the front end by using the class:

WC_Session_Handler to handle all sessions.

Class Path is: \wp-content\plugins\woocommerce\includes\class-wc-session-handler.php

Then, WooCommerce initializes the session in WooCommerce class. And it uses this method:

public function initialize_session():

WC_Session_Handler class contains a method has a function named

set_customer_session_cookie().

The above mentioned method was to start the cookie for a customer.

Search

Recent Blogs

Categories

Archives

Archives

Tags