Shopify’s Navigation API just got a subtle but crucial tweak. In API version 2027-01 the currententrychange event’s event.from property now points to the page the customer just left, not the page they’re navigating to. If your customer‑account full‑page extensions rely on event.from to detect the new route, they’ll start showing stale content the moment you upgrade. This post breaks down the change, explains who it touches, and gives you a step‑by‑step migration path so you can keep your extensions running smoothly.
What Changed
Prior to API version 2026-10, the currententrychange event passed a NavigationCurrentEntryChangeEvent where event.from contained the *new* entry – effectively mirroring shopify.navigation.currentEntry. Starting in 2027-01, Shopify aligned the property with its documentation: event.from now holds the *previous* history entry. In other words, after a navigation the event tells you where the user came from, not where they are headed.
Who Is Affected
Only full‑page extensions that run in the customer‑account UI (e.g., customer‑account.page.render or customer‑account.order.page.render) and that read event.from to determine the destination page are impacted. Extensions still on API 2026-10 or earlier see no change. Code that already uses shopify.navigation.currentEntry or the useNavigationCurrentEntry hook remains safe across all versions.
Breaking Changes & Migration Steps
If your handler extracts the URL from event.from.url, it will now receive the previous URL, causing the UI to lag one navigation behind. The fix is straightforward: stop reading the new URL from the event and pull it directly from shopify.navigation.currentEntry instead. This approach works in API 2025-10 and later, so you can implement the change today and then upgrade your API version with confidence.
Before:
shopify.navigation.addEventListener('currententrychange', (event) => {
setPath(new URL(event.from.url).pathname);
});
After:
shopify.navigation.addEventListener('currententrychange', () => {
setPath(new URL(shopify.navigation.currentEntry.url).pathname);
});
Action Required
Testing Your Update
Open a customer account page that contains your full‑page extension. Use the browser’s dev tools to monitor the console for the currententrychange event. After each navigation, confirm that shopify.navigation.currentEntry.url matches the URL you just visited. If the path updates correctly, your migration is successful. Also, run your automated UI tests to catch any regression before pushing to production.
Conclusion
The 2027-01 Navigation API tweak is a classic example of a small‑scale breaking change that can ripple through customer‑facing extensions. By swapping event.from for shopify.navigation.currentEntry today, you avoid unexpected UI glitches and keep your extensions future‑proof. Need a hand reviewing your code or testing the migration? Reach out in the Shopify Community forums or drop a comment below—happy coding!
