WooCommerce Correios - Free PAC when cart costs more than 100
<?php | |
function custom_woocommerce_correios_shipping_methods( $rate ) { | |
if ( isset( WC()->cart->subtotal ) && 100 <= WC()->cart->subtotal ) { | |
$rate['cost'] = 0; | |
} | |
return $rate; | |
} | |
add_filter( 'woocommerce_correios_correios-pac_rate', 'custom_woocommerce_correios_shipping_methods' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment