Applied coupons disable Free shipping conditionally in Woocommerce
The below code will enable “Free shipping” for applied coupons only if cart subtotal reaches a minimal amount (discounted including taxes): add_filter( ‘woocommerce_package_rates’, ‘coupons_removes_free_shipping’, 10, 2 ); function coupons_removes_free_shipping( $rates, $package ){ if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) return $rates; $min_subtotal = 250; // Minimal subtotal allowing free shipping // Get needed … Read more