less than a minute read • Updated 2 hours ago
Pass custom field data to custom shipping code
How to pass a custom checkout field's value into your custom shipping code using a data attribute.
If your custom shipping code needs to react to something a customer enters on the checkout — like a delivery preference or a special instruction — you can pass a custom field’s value into the shipping rate request.
Steps
Notes
Any custom session attributes already in the customer’s session are included in the payload the same way, by default.
For the full details on writing custom shipping code itself, see the shipping documentation for the Custom Shipping Code option.