Dear all,
I have developed a carrier service and a checkout extension. While most functions are working fine, I am encountering an issue where shippingOptionTarget.carrier.name is always null in the checkout extension.
I need to identify which shipment is associated with my carrier service to display the correct information in the checkout extension. Could you please advise on how to resolve this issue?
Thank you for your assistance.
1 Like
Hi @EagleTsui
Sounds like you’re running into a common issue where the checkout extension isn’t properly linking to the carrier service. Shopify’s checkout extensions may not always have direct access to certain carrier service details.
I think here are few things you can check
- Double check that your carrier service is properly registered and configured in ur Shopify admin under Settings → Shipping and Delivery.
- Maybe instead of relying on shippingOptionTarget.carrier.name, try using shipment.lineItems to determine which products are in the shipment and infer the correct carrier service.
- Check Shopify’s GraphQL API responses during checkout to see if the carrier name is being passed at any point. If not, you may need to retrieve it separately in your checkout extension.
Hi Promer-Aila,
The carrier service register is correct and the function is work. For your information I used the following API to create it (https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/carrierServiceCreate). So I don’t know how to retrieve carrier.name correctly.
1 Like
Hi Praise,
I using the following link “https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/carrierServiceCreate” to create my carrier service and filled name to “Test Carrier”. May I know is it correct?