WC_Cart::init PHP Method

init() public method

Loads the cart data from the PHP session during WordPress init and hooks in other methods.
public init ( )
    public function init()
    {
        $this->get_cart_from_session();
        add_action('woocommerce_check_cart_items', array($this, 'check_cart_items'), 1);
        add_action('woocommerce_check_cart_items', array($this, 'check_cart_coupons'), 1);
        add_action('woocommerce_after_checkout_validation', array($this, 'check_customer_coupons'), 1);
    }
WC_Cart