Automattic\WooCommerce\StoreApi\Utilities
CartController::get_cart_for_response()
Gets the latest cart instance, and ensures totals have been calculated before returning.
Метод класса: CartController{}
Хуков нет.
Возвращает
\WC_Cart
.
Использование
$CartController = new CartController(); $CartController->get_cart_for_response();
Код CartController::get_cart_for_response() CartController::get cart for response WC 9.4.2
public function get_cart_for_response() { return did_action( 'woocommerce_after_calculate_totals' ) ? $this->get_cart_instance() : $this->calculate_totals(); }