Retrieves the current site visitor's cart.
The getCurrentCart()
function returns a Promise that resolves when the current cart is retrieved.
function getCurrentCart(): Promise<Cart>;
import { currentCart } from "@wix/ecom";
async function getCurrentCart() {
const response = await currentCart.getCurrentCart();
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.