Thanks for the answer! Just in case someone needs it right now, here is my solution to set free delivery for Czech and Slovakia with different totals.
add_filter( 'woocommerce_package_rates', 'adjust_shipping_rate', 10, 2 );
function adjust_shipping_rate( $rates, $cart ) {
$custome_shipping_country = WC()->customer->get_shipping_country();
global $woocommerce;
$cart_subtotal = WC()->cart->subtotal;
if ( ($cart_subtotal >= 3500 && $custome_shipping_country == 'CZ') || ($cart_subtotal >= 4500 && $custome_shipping_country == 'SK') ) {
foreach ( $rates as $key => $rate ) {
$rates[$key]->cost = 0;
}
}
return $rates;
}
So good to finally see proper plugins for Czech services! Can’t wait for your plugin. Thanks!
-
This reply was modified 3 years, 9 months ago by petrucccio.