How to bring zones of delivery in this format?

Added 2 zones delivery

5e120de88804d096791043.png

But I have only one checkbox:
5e120e2a8c323201859239.png

How to achieve this ?
5e120e42c9a0e667778765.png
April 4th 20 at 00:52
1 answer
April 4th 20 at 00:54
You find it easier to write a separate plugin for each shipping method.
Documentation
Thanks, but why is not displayed ?

I have 2 zones indicated a single rate in the file cart-shipping.php I found this

<ul id="shipping_method" class="woocommerce-shipping-methods">
 <?php foreach ( $available_methods as $method ) : ?>
the <li>
<?php
 if ( 1 < count( $available_methods ) ) {
 printf( '<input type="radio" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" %4$s />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ), checked( $method->id, $chosen_method, false ) ); // WPCS: XSS ok.
 } else {
 printf( '<input type="hidden" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ) ); // WPCS: XSS ok.
}
 printf( '<label for="shipping_method_%1$s_%2$s">%3$s</label>', $index, esc_attr( sanitize_title( $method->id ) ), wc_cart_totals_shipping_method_label( $method ) ); // WPCS: XSS ok.
 do_action( 'woocommerce_after_shipping_rate', $method, $index );
?>
</li>
 <?php endforeach; ?>
 </ul>

Do I understand correctly that if a single rate is repeated 2 times, then the checkbox is not displayed ? - ayla_Erns commented on April 4th 20 at 00:57
And I can't add more than 2 delivery zones ? - ayla_Erns commented on April 4th 20 at 01:00
Your option also will not work because without specifying a particular country shipping will not work:

$this->countries = array() - ayla_Erns commented on April 4th 20 at 01:03

Find more questions by tags WordPressWooCommerce