WordPress at Your Fingertips
function is not described

WC_Legacy_Cart::init() public WC 1.0

Deprecated from version 3.2.0 Session is loaded via hooks rather than directly.. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Init.

{} It's a method of the class: WC_Legacy_Cart{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Legacy_Cart = new WC_Legacy_Cart();
$WC_Legacy_Cart->init();

Changelog

Deprecated Since 3.2.0 Session is loaded via hooks rather than directly.

Code of WC_Legacy_Cart::init() WC 5.7.1

public function init() {
	wc_deprecated_function( 'WC_Cart::init', '3.2', '' );
	$this->get_cart_from_session();
}