docs: fixed typo in upgrade guide v1.7 (#2879)

This commit is contained in:
Shahed Nasser
2022-12-22 15:30:18 +02:00
committed by GitHub
parent f4c9a4698f
commit c78e78de28

View File

@@ -24,23 +24,23 @@ medusa migrations run
### Change Used Methods
Instead of using `customerService.retrieveByEmail`, you should now use the methods `customerService.retrieveRegisteredByEmail` or `customerService.retrieveUnRegisteredByEmail`.
Instead of using `customerService.retrieveByEmail`, you should now use the methods `customerService.retrieveRegisteredByEmail` or `customerService.retrieveUnregisteredByEmail`.
The `customerService.retrieveRegisteredByEmail` method allows you to retrieve a registered customer by email:
```tsx
```ts
customerService.retrieveRegisteredByEmail("example@gmail.com");
```
On the other hand, the `retrieveUnregisteredByEmail` method allows to retrieve guest customers by email:
```jsx
customerService.retrieveUnRegisteredByEmail("example@gmail.com");
customerService.retrieveUnregisteredByEmail("example@gmail.com");
```
To retrieve a customer by email regardless of whether they are registered or not, you can use the `customerService.list` method instead:
```tsx
```ts
customerService.list({
email: "example@gmail.com"
})