Hi everyone,
I’m facing an issue with a custom Shopify Function that applies shipping discounts by matching the shipping method title. This works fine until the shipping method title changes dynamically—for example, when customers select pickup points or when third-party carriers rename the rate.
Example:
Configured titles: “FedX Delivery”, “Express”
Actual checkout titles:
-
Standard
-
Fast Delivery
-
FedX Delivery
-
test (this was “Express” for another customer)
Because the title isn’t stable, the function fails to match the method and the discount isn’t applied.
Issue:
Shipping method titles change based on pickup point, carrier, or localization. Matching by title is unreliable, and customers don’t receive the intended discount.
What I’m looking for:
-
Is there a stable identifier (handle, code, etc.) that Shopify Functions can use instead of relying on the title?
-
Any best practices for handling dynamically named shipping methods?
-
Has anyone solved this specifically for pickup-point carriers?
Sample payload:
deliveryOptions: [
{ handle: “…”, title: “Standard” },
{ handle: “…”, title: “Fast Delivery” },
{ handle: “…”, title: “FedX Delivery” },
{ handle: “…”, title: “test” } // was “Express”
]
Any guidance or workarounds would be greatly appreciated!