Hello everyone,
I’m working on an address validation Checkout UI Extension and am stuck on a persistent data access issue with the useShippingAddress hook. I am seeing this issue even after navigating to the next step.
The Problem
When my extension renders on the Shipping Page (Step 2), the useShippingAddress hook returns the shippingAddress object, but the critical fields needed for validation (address1, address2, and zip/postalCode) are consistently undefined. Only coarse location data (city, countryCode, provinceCode) is available.
Testing Context & Failed Targets
I have thoroughly tested multiple targets and observed the same data unavailability:
| Target Tested | When Data Was Checked | Result |
|---|---|---|
purchase.checkout.shipping-option-item.render-after |
Live render on Shipping Page (Step 2) | Failure: address1 and zip are undefined. |
purchase.checkout.actions.render-before |
Live render on Information Page (Step 1) | Failure: address1 and zip are undefined (Expected on this page, but confirmed). |
purchase.checkout.block.render |
Render on Shipping Page (Step 2) | Failure: address1 and zip are still undefined after the address commit. |
- Action Taken: I fill out the full address on the Information Page (Step 1) and click “Continue to shipping.” The issue persists when the component re-renders on the Shipping Page.
- Country Tested: GB (United Kingdom).
Logs from the Shipping Page
When my component renders on the Shipping Step, the console logs show this pattern:
[TEST_EXT] RAW shippingAddress object: {
address1: undefined,
address2: undefined,
city: “London”,
countryCode: “GB”,
zip: undefined
// … other fields are also undefined
}
My Configuration (shopify.extension.toml)
I have confirmed that I have the necessary access capabilities:
Ini, TOML
[extensions.capabilities]
api_access = true
network_access = true
customer_data_access = true
Questions:
Given that address1 is still undefined on the Shipping Step (Page 2), does this point to a requirement for the Protected Customer Data Access capability?
- Could this be a cache issue related to the development store or a conflict with another app/Shopify Function?
- Has anyone successfully implemented address validation on the Shipping Step recently using the
useShippingAddresshook without encountering this redaction?3 - Has anyone successfully implemented address validation on the Shipping Step recently using the
useShippingAddresshook without encountering this redaction?