Hello, I am creating a store in which on orders over € 50 the shipping is free, if I add products to the cart worth more than € 50 the option to choose between free shipping or paid shipping appears, but don´t Automatically adds. It must add free shipping without allowing you to choose between several options since this can be a hassle for the customer, how can I make shipping automatically free when the order worth more than 50€?
I have tried another theme and if it works correctly, from what I understand it is not a cinfiguration problem.
Thank you very much, Best regards !!
Hey @tresletras,
Thanks for writing in! Regretfully none of our products offer the feature you need. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. Our themes are quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
SOLVED!!! Only is needed add this code to funcions.php file
/**
- 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 );
Hello @tresletras,
We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!
Best Regards.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

