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:
WC_Session_Handler class contains a method has a function named
The above mentioned method was to start the cookie for a customer.