Skip to content

v1.2.0

Compare
Choose a tag to compare
@jorgemasta jorgemasta released this 19 Mar 22:00
e6196b0

1.2.0

Embedded checkout

  • Now the SHOP_TOKEN is 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 logout endpoint to be POST to prevent unwanted caching

Resolves #36
Resolves #6

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.

⚠️ This adds as a Peer Dependency next.

Resolves #30