Created
November 29, 2017 12:05
-
-
Save luizbills/71bd9497e9baeae88f2d74a7a04c8862 to your computer and use it in GitHub Desktop.
Muda o preço do PAC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_package_rates', 'lpb_change_correios_pac_cost', 10, 2 ); | |
function lpb_change_correios_pac_cost ( $rates, $package ) { | |
foreach ( $rates as $rate) { | |
if ( $rate->method_id === 'correios-pac' ) { | |
$rate->cost = 20; | |
} | |
} | |
return $rates; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment