Skip to content

basket.setShipping

basket.setShipping is an event on the Event Bus that occurs whenever a shipping method is set in the basket.

Event body

none

Example

In this example we listen to basket.setShipping event and perform an action whenever it's emitted.

useStorefront(async (storefront) => {
    storefront.eventBus.on('basket.setShipping', () => {
        console.log('A shipping method has been changed!');
    });
});