Skip to content

Commit

Permalink
PRESS4-248 Use safeFetch when getting orders
Browse files Browse the repository at this point in the history
  • Loading branch information
aulisius committed Jun 5, 2023
1 parent b5239cb commit f97f636
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/QuickLook.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ export function QuickLook(props) {
<SiteStatus
comingSoon={props.state.wp.comingSoon}
notify={props.wpModules.notify}
siteUrl={window.NFDECOM?.site.url}
toggleComingSoon={props.actions.toggleComingSoon}
/>
</Section.Block>
Expand Down
3 changes: 2 additions & 1 deletion src/sdk/woocommerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ export const WooCommerceSdk = {
},
orders: {
async list(filter) {
return apiFetch({
let orders = await safeFetch({
url: Endpoints.ORDERS({
after: moment().subtract(1, filter).toISOString(),
}),
});
return orders.data ?? [];
},
},
products: {
Expand Down

0 comments on commit f97f636

Please sign in to comment.