• Hello,

    I setup a rule that if customer get more then 100 Turkish free shiping.

    But when it is over 100 TL then in cargo selection there is 2 selection
    One is 8 TL cargo fee, other is free shiping.

    I dont want to customer select it.
    I want is it is over 100 only o selection is freeshiping.

    In early versions i was find a code and wrote it no fuctions i was done. but it is not working on this new versiyons.

    Someone may help me please.

    https://wordpress.org/plugins/woocommerce/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    This is the expected behavior. There is nothing saying that flat rate needs to be hidden when free shipping is available. And we can’t do that by default, because many stores will want to offer express shipping along with free shipping still.

    You can hide flat rate when free shipping is available though with some custom PHP code like this: https://mikejolley.com/2016/06/17/woocommerce-hide-shipping-rates-when-free-shipping-is-available/

    If you aren’t sure where to place this code, this guide will help: https://www.skyverge.com/blog/add-custom-code-to-wordpress/

    Thread Starter chantage

    (@chantage)

    Hello,

    Thank you but this is not helped me.

    after i add this code i still see 2 selection about cargo fee

    <?php
    /**
    * Hide shipping rates when free shipping is available.
    * Updated to support WooCommerce 2.6 Shipping Zones.
    *
    * @param array $rates Array of rates found for the package.
    * @return array
    */
    function my_hide_shipping_when_free_is_available( $rates ) {
    $free = array();

    foreach ( $rates as $rate_id => $rate ) {
    if ( ‘free_shipping’ === $rate->method_id ) {
    $free[ $rate_id ] = $rate;
    break;
    }
    }

    return ! empty( $free ) ? $free : $rates;
    }

    add_filter( ‘woocommerce_package_rates’, ‘my_hide_shipping_when_free_is_available’, 100 );

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Where did you put the code. It’s valid.

    Thread Starter chantage

    (@chantage)

    functions.php

    But it is not worked on me, is it worked for you ?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    There are no errors it in. What are you seeing?

    Thread Starter chantage

    (@chantage)

    No error but it is not working.
    After i add the code and try to buy a product which free shiping.

    I see 2 option, 8 TL Cargo fee and Free shiping.

    I dont want user select it.
    id it is more them 100 it is free

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    The code works, so you must be doing something wrong on that end. If you can’t figure out the code you need – perhaps you should use this extension instead: https://woocommerce.com/products/conditional-shipping-and-payments/

    Thread Starter chantage

    (@chantage)

    Do you want me to pay $79.00 for this .. forget.

    Thread Starter chantage

    (@chantage)

    Why will you remove freeshiping in next versions ?
    I want want to add fee about the citys.

    I want to add fee about profit

    if customer buys more then 100 TL then shiping free, else it will extra 8 TL

    what can’t i do it in 2.60 ?

    Plugin Support RK a11n

    (@riaanknoetze)

    > Why will you remove freeshiping in next versions ?

    Not sure where you’re getting this information from? I suspect there’s a miscommunication here.

    > I want want to add fee about the citys.

    For shipping fees that go down to city level, you’d need to have a look at using post codes in your shipping zones.

    > I want to add fee about profit

    I’m not sure what you mean by this; Could you elaborate a bit more?

    > if customer buys more then 100 TL then shiping free, else it will extra 8 TL

    This is still possible WC 2.6 (Screenshot at http://cld.wthms.co/11re9/BxIUjyNW)

    > Do you want me to pay $79.00 for this .. forget.

    You could also have that custom developed if you want? Although I suspect you might have to pay more than $79.

    Thread Starter chantage

    (@chantage)

    Riaan,
    Thank you for your kind answer 🙂

    I mean it beacuse of this note “Legacy shipping methods (Flat Rate, International Flat Rate, Local Pickup and Delivery, and Free Shipping) are deprecated but will continue to work as normal for now. They will be removed in future versions of WooCommerce. We recommend disabling these and setting up new rates within shipping zones as soon as possible.”

    But now i understand settings are not in another place.

    Now it looks ok.
    Thank you for answers

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Free Shiping Shows 2 Selection’ is closed to new replies.