Support » Plugin: WooCommerce » Blank Option at shipping method list

  • Hi!

    Can anyone help me? i need to add a BLANK option on the shipping method list. the html should look like this.

    <select id="shipping_method" name="shipping_method">
    <option value="">Please Select Shipping Method</option>
    <option value="ship_method_1">ship_method_1</option>
    <option value="ship_method_2">ship_method_2</option>
    <option value="ship_method_3">ship_method_3</option>

    i’ve modified/added to review-order.php

    if ( get_option('woocommerce_shipping_method_format') == 'select' ) {
     echo '<select name="shipping_method" id="shipping_method">';
     echo '<option value="blank">Please Select Shipping Method</options>';
    foreach ( $available_methods as $method )
     echo '<option value="' . esc_attr( $method->id ) . '" ' . selected( $method->id, $_SESSION['_chosen_shipping_method'], false ) . '>' . strip_tags( $method->full_label ) . '</option>';
    echo '</select>';

    selecting shipping method is fine, but when i select back the “blank” option, other options get “selected” and not the “blank”.

    Thanks in Advance.

  • The topic ‘Blank Option at shipping method list’ is closed to new replies.