v1.2.0
1.2.0
Embedded checkout
- Now the
SHOP_TOKENis set at TLD (Top Level Domain) so the subdomain (where the embedded checkout iframe lives) can access the token - Added a new section in the readme with some notes about how to make the checkout works
- Modified the
logoutendpoint to bePOSTto prevent unwanted caching
Create useOrders hooks
Allow to fetch the orders using a new useOrders hook.
- If the user is not logged in, nothing is returned.
- If the user is logged in, it returns an array with his orders.
- Get the customer ID on the server (through the token) to avoid security issues.
Resolves #25
Add locale to cart
When creating the carts, you can specify the locale. By default it's en, now the package checks the locale of the app to add it to the request.
next.
Resolves #30