Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Show items if there is more than one shipping rate
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Aug 2, 2022
1 parent 95488bb commit 5125973
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Packages = ( {
collapsible={ !! collapsible }
collapse={ !! collapse }
showItems={
showItems || packageData?.shipping_rates?.length >= 1
showItems || packageData?.shipping_rates?.length > 1
}
noResultsMessage={ noResultsMessage }
renderOption={ renderOption }
Expand Down Expand Up @@ -167,6 +167,7 @@ const ShippingRatesControl = ( {
ShippingRatesControlPackage,
},
context,
shippingRates,
};
const { isEditor } = useEditorContext();

Expand All @@ -192,6 +193,7 @@ const ShippingRatesControl = ( {
/>
<ExperimentalOrderShippingPackages>
<Packages
showItems={ shippingRates.length > 1 }
packages={ shippingRates }
noResultsMessage={ noResultsMessage }
renderOption={ renderOption }
Expand Down

0 comments on commit 5125973

Please sign in to comment.