Deprecated.
This function will continue to work, but a newer version is available at
wix-ecom-backend.CurrentCart.getCurrentCart()
.
We recommend you migrate to the new Wix eCommerce APIs as soon as possible.
If this function is already in your code, it will continue to work.
To stay compatible with future changes, migrate to
wix-ecom-backend.CurrentCart.getCurrentCart()
.
The wix-ecom-backend.CurrentCart.getCurrentCart()
function works from both backend and frontend code.
To migrate to the new function:
Add the new import statement:
Look for any code that uses cart.getCurrentCart()
,
and replace it with currentCart.getCurrentCart()
.
Update your code to work with the new currentCart.getCurrentCart()
call and response properties.
For more info about the differences between the Stores Cart and eCommerce Cart, refer to the cart conversion table.
Test your changes to make sure your code behaves as expected.
Gets the current site visitor's shopping cart.
The getCurrentCart()
function returns a Promise that resolves to the current
site visitor's shopping cart.