This commit is contained in:
Joshua T Flowers 2020-06-12 10:48:49 +03:00 committed by GitHub
parent 0eb906f56d
commit 960bc68dba
1 changed files with 13 additions and 5 deletions

View File

@ -263,16 +263,24 @@ class ShippingRates extends Component {
) }
</div>
<div className="woocommerce-shipping-rate__main">
<div className="woocommerce-shipping-rate__name">
{ zone.name }
{ zone.toggleable && (
{ zone.toggleable ? (
<label
htmlFor={ `woocommerce-shipping-rate__toggle-${ zone.id }` }
className="woocommerce-shipping-rate__name"
>
{ zone.name }
<FormToggle
id={ `woocommerce-shipping-rate__toggle-${ zone.id }` }
{ ...getInputProps(
`${ zone.id }_enabled`
) }
/>
) }
</div>
</label>
) : (
<div className="woocommerce-shipping-rate__name">
{ zone.name }
</div>
) }
{ ( ! zone.toggleable ||
values[
`${ zone.id }_enabled`