Storefront Customer Order history only this calendar year?

Solved
StephenK
Shopify Partner
27 2 13

We've been building a customer storefront and about to launch soon.

Notice during testing today that since we rolled into 2021, that when logged in, customers only see the orders placed in 2021 not the 2020 ones?

Just using a typical `customer()` graphQL query along these lines:-

customer(customerAccessToken: $token) {
id
orders(first: $first, after:$afterCursor, reverse: true) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node { ...

Anyone else noticed this and know how to grab orders back before 2021?

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
0 Likes
c10s
Shopify Partner
15 2 3

This is an accepted solution.

Strange, just tested mine and it's giving me the expected result (orders from 2021 and 2020), test query below:

customer(customerAccessToken: $customerAccessToken) {
  orders(first: 100, reverse: true) {
    edges {
      node {
        id
        orderNumber
        processedAt
      }
    }
  }
}

 Using the xx.myshopify.com/api/2021-01/graphql.json endpoint.

StephenK
Shopify Partner
27 2 13

So turned out to be an unrelated bug in the frontend, that happened to affect the the last order of 2020.

Thanks for reassuring me it wasn't a problem with the backend at least.

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable