• Customer

    Free Shipping and Fixed Price's two in the checkout page

    Posted by: bilalhizardere Mar 22, 2019 at 08:50 (6 year ago)
    Hello everyone. I have a free shipping system for purchases over 100 $. 2 options appear on the checkout page for a payment that is normally $ 150. Fixed price and free shipping. But i used the php codes below and system change otomatically.

    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 );


    Thanks to these php codes, the only free shipping option on the payment page for purchases over $ 100 seems to be selected and automatically. But now, with a purchase of $ 150, there are still two options.

    Can you offer a solution for this? Is there any other method you know?
    THX



  • Customer

    Posted by: yame, Mar 25, 2019 at 03:47 (6 year ago)

    Hi,

    My coder checked for your issue. He said that it belongs to the customized work, not be included in support ability.

    Hope that you can understand for this

    Regards,
    Yame

INSTALLATION SERVICE

Theme Installation: $49. Pay now

CUSTOMIZED SERVICES

Use our expert service to turn your ideas into reality. Please send an email to kutethemes@gmail.com to provide the more detailed information. Thanks!

WORKING TIME

Our support service works from Monday to Friday.
Mean time (GMT +7):
+ 7:30 - 11:30 AM
+ 1:30 - 5:30 PM
We will try to answer all the questions within 24 hours and solve them as quickly as possible