less than a minute read • Updated 6 days ago
Pass custom field data to custom shipping code
How to read a custom checkout field's value inside your custom shipping code — useful for adjusting rates based on things like delivery preferences or a selected pickup location.
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.