WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Utilities

CartController::load_cart() public WC 1.0

Makes the cart and sessions available to a route by loading them from core.

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

No Hooks.

Return

null. Nothing.

Usage

$CartController = new CartController();
$CartController->load_cart();

Code of CartController::load_cart() WC 5.8.0

public function load_cart() {
	if ( ! did_action( 'woocommerce_load_cart_from_session' ) && function_exists( 'wc_load_cart' ) ) {
		include_once WC_ABSPATH . 'includes/wc-cart-functions.php';
		include_once WC_ABSPATH . 'includes/wc-notice-functions.php';
		wc_load_cart();
	}
}