Account for local pickup rates before disabling shipping in editor (https://github.com/woocommerce/woocommerce-blocks/pull/8207)

* Account for local pickup rates before disabling

* check for local pickup before disabling shipping in editor
This commit is contained in:
Seghir Nadir 2023-01-17 10:32:32 +01:00 committed by Luigi
parent 1e957c5d4d
commit 187a6dd536
1 changed files with 5 additions and 3 deletions

View File

@ -30,9 +30,11 @@ const displayWithTax = getSetting( 'displayCartPricesIncludingTax', false );
// https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/src/StoreApi/docs/cart.md#cart-response
export const previewCart: CartResponse = {
coupons: [],
shipping_rates: getSetting( 'shippingMethodsExist', false )
? previewShippingRates
: [],
shipping_rates:
getSetting( 'shippingMethodsExist', false ) ||
getSetting( 'localPickupEnabled', false )
? previewShippingRates
: [],
items: [
{
key: '1',