• secobin

    (@secobin)


    I have a problem with WooCommerce Gift Coupon
    I set free shipping when I use a coupon.
    if the free shipping method is at the top of the list I disable the other methods and in the cart I get the message “there are no other methods available shipping”.
    If instead it is at the bottom of the list it does not see it and if I enter the coupon code the free shipping is not calculated.

    I tried to insert this code in the function.php file but nothing. The situation does not change.

    // Rimuove gli altri metodi di spedizione se quello gratuito
    Ã ̈ attivo (WC 3.0+)
    add_filter( ‘woocommerce_package_rates’, function( $rates ) { foreach ( $rates as $rate_id => $rate ) { if ( ‘free_shipping’ === $rate->method_id ) { return array( $rate_id => $rate ); } } return $rates;
    }, 100 );

    How can I solve the problem ?
    thanks Giacomo

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘free shipping’ is closed to new replies.