Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce Correios - Free PAC for Shipping Zone
<?php
function custom_woocommerce_correios_shipping_methods( $rate, $instance_id ) {
// Verifica se esta utilizando a instancia correta, se não estiver para o código.
if ( 99 !== $instance_id ) {
return $rate;
}
$rate['cost'] = 0;
return $rate;
}
add_filter( 'woocommerce_correios_correios-pac_rate', 'custom_woocommerce_correios_shipping_methods', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.