Skip to content

Commit 6ed2488

Browse files
committed
CEXT-4264: Add the possibility of disabling shipping methods
1 parent 12f52d2 commit 6ed2488

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pages/starter-kit/checkout/use-cases.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ The following example demonstrates how to add a webhook to the `plugin.magento.o
170170

171171
You can register multiple webhooks for different shipping methods or shipping carriers by adding them into the same batch to ensure they are executed in parallel or create multiple batches to execute them sequentially.
172172

173+
### Remove shipping method
174+
175+
The `plugin.magento.out_of_process_shipping_methods.api.shipping_rate_repository.get_rates` webhook within adding shipping methods allows you to remove specific shipping methods from the list of available options
176+
177+
For example, if you are using the `flatrate` shipping method but certain conditions require it to be disallowed, you need to update your webhook response to mark the shipping method as removed. You can find an example in [`actions/shipping-methods.js`](https://github.com/adobe/commerce-checkout-starter-kit/blob/main/actions/shipping-methods/index.js).
178+
173179
## Shipping methods: Payload
174180

175181
The request payload contains information about all items in the cart, including product information, product attributes, shipping address, and customer information for logged-in customers.

0 commit comments

Comments
 (0)