Automattic\WooCommerce\StoreApi\Utilities
CartController::get_cart_for_response()
Gets the latest cart instance, and ensures totals have been calculated before returning.
Method of the class: CartController{}
No Hooks.
Return
\WC_Cart
.
Usage
$CartController = new CartController(); $CartController->get_cart_for_response();
CartController::get_cart_for_response() CartController::get cart for response code WC 9.3.1
public function get_cart_for_response() { return did_action( 'woocommerce_after_calculate_totals' ) ? $this->get_cart_instance() : $this->calculate_totals(); }