This feature is not part of the REST API. Do not treat it as such!
If a customer is logged in via the web version of your store then WooCommerce will then merge any items in the cart together with the items the guest customer has in cart.
FYI: It does not matter if your customer is logged in or not already via the web version of your store. Only the cart data will be set. Customer details are not transferred.
Query properties
Query | Type | Description |
---|---|---|
cocart-load-cart | string | Set the cart key of the cart you wish to load. mandatory |
notify | bool | Set as true to notify customers once arrived on the web version of your store. Default is false |
keep-cart | bool | Set as false to merge cart data. Default is true |
https://example-store.com/checkout/?cocart-load-cart=bbfa8e97ac9cff4c861d62a109e83bb6
If the same item already exists in cart and you are merging the two carts together, that item will not change. It will not increase or decrease the quantity if the cart item key are the same.
FAQ
What happens if the cart does not load?
What happens if the cart does not load?
Use the notice property to try loading the cart session again. This can be used also to debug why but normally this is because of two things.
- The cart key was incorrect
- The cart session has expired and is no longer in the database under that cart key.
I want to change the query name
I want to change the query name
Use this filter to change the name.
I want this feature disabled. Do not need it.
I want this feature disabled. Do not need it.
If you do not need or want to use WooCommerce native checkout then disable using this filter.