WordPress at a glance
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

AbstractRoute::maybe_load_cart() protected WC 1.0

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

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

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->maybe_load_cart();

Code of AbstractRoute::maybe_load_cart() WC 5.0.0

<?php
protected function maybe_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();
	}
}