Skip to content

Commit 70147c6

Browse files
authored
Merge pull request AdobeDocs#327 from oshmyheliuk/CEXT-4264
CEXT-4264: Add the possibility of disabling shipping methods
2 parents 12f52d2 + 69a5201 commit 70147c6

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 allows you to remove specific shipping methods from the list of available options.
176+
177+
If you use the `flatrate` shipping method, but want to disable it, you must update your webhook response to mark the shipping method as removed. This example is demonstrated 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)