Ecommerce Shopify WordPress Discussion

Woocommerce free-shopping above a price is not reflecting at view cart

I have a created a website with wordpress and woocommerce. I want to remove the shippig-rates if the customer buy more than €75. So I have simple product called A and price is €39,- I can add this to the mini-cart and than view the cart page, I see the 39 and the shipping-rate. but if i add with quantity one more the price is changing to 78, so the shipping price should be removed. But this is not removing the shipping-rate and stay with shipping rate, I have tried it with peace of code; function my_hide_shipping_when_free_is_available( $rates ) { $free = array(); foreach ( $rates as $rate_id => $rate ) { if ( 'gratis_verzending' === $rate->method_id && $rate->cost == 0 ) { $free[ $rate_id ] = $rate; break; } } // Output some debug information error_log( print_r( $rates, true ) ); error_log( print_r( $free, true ) ); return ! empty( $free ) ? $free : $rates; } add_filter( 'woocommerce_package_rates', 'my_hide_shipping_when_free_is_available', 100 ); This didn't work. So I tried to force to get everything above €75,- bij adding the following code but still not working. function my_force_free_shipping_above_75( $rates ) { // Get the cart subtotal $subtotal = WC()->cart->get_subtotal(); // Check if the subtotal is greater than 75 euros if ( floatval( $subtotal ) > 75 ) { // Iterate over the rates and force free shipping foreach ( $rates as $rate_key => $rate ) { if ( 'gratis_verzending' === $rate_key ) { // Set the cost to 0 for free shipping $rates[ $rate_key ]['cost'] = 0; } } } return $rates; } // Hook the function to the 'woocommerce_package_rates' filter with a priority of 10 add_filter( 'woocommerce_package_rates', 'my_force_free_shipping_above_75', 10 ); Can anyone point me to the right direction?
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.