From 24c0ac3a296467b88c3360eacd52207f8c3a2a48 Mon Sep 17 00:00:00 2001 From: Thomas Roberts Date: Fri, 10 Mar 2023 10:09:11 -0800 Subject: [PATCH] Change spelling of collectible to collectable --- .../cart-checkout/pickup-location/index.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/js/base/components/cart-checkout/pickup-location/index.tsx b/assets/js/base/components/cart-checkout/pickup-location/index.tsx index 131f2b8c69a..a213f795f71 100644 --- a/assets/js/base/components/cart-checkout/pickup-location/index.tsx +++ b/assets/js/base/components/cart-checkout/pickup-location/index.tsx @@ -16,16 +16,16 @@ const PickupLocation = (): JSX.Element | null => { const flattenedRates = cartShippingRates.flatMap( ( cartShippingRate ) => cartShippingRate.shipping_rates ); - const selectedCollectibleRate = flattenedRates.find( + const selectedCollectableRate = flattenedRates.find( ( rate ) => rate.selected && isPackageRateCollectable( rate ) ); // If the rate has an address specified in its metadata. if ( - isObject( selectedCollectibleRate ) && - objectHasProp( selectedCollectibleRate, 'meta_data' ) + isObject( selectedCollectableRate ) && + objectHasProp( selectedCollectableRate, 'meta_data' ) ) { - const selectedRateMetaData = selectedCollectibleRate.meta_data.find( + const selectedRateMetaData = selectedCollectableRate.meta_data.find( ( meta ) => meta.key === 'pickup_address' ); if ( @@ -36,15 +36,15 @@ const PickupLocation = (): JSX.Element | null => { const selectedRatePickupAddress = selectedRateMetaData.value; return { pickupAddress: selectedRatePickupAddress, - pickupMethod: selectedCollectibleRate.name, + pickupMethod: selectedCollectableRate.name, }; } } - if ( isObject( selectedCollectibleRate ) ) { + if ( isObject( selectedCollectableRate ) ) { return { pickupAddress: undefined, - pickupMethod: selectedCollectibleRate.name, + pickupMethod: selectedCollectableRate.name, }; } return {