WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Utilities

CartController::get_cart_hashes() public WC 1.0

Get hashes for items in the current cart. Useful for tracking changes.

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

No Hooks.

Return

Array.

Usage

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

Code of CartController::get_cart_hashes() WC 5.7.1

public function get_cart_hashes() {
	$cart = $this->get_cart_instance();
	return [
		'line_items' => $cart->get_cart_hash(),
		'shipping'   => md5( wp_json_encode( $cart->shipping_methods ) ),
		'fees'       => md5( wp_json_encode( $cart->get_fees() ) ),
		'coupons'    => md5( wp_json_encode( $cart->get_applied_coupons() ) ),
		'taxes'      => md5( wp_json_encode( $cart->get_taxes() ) ),
	];
}