Skip to content

Instantly share code, notes, and snippets.

@luizbills
Created November 29, 2017 12:05
Show Gist options
  • Save luizbills/71bd9497e9baeae88f2d74a7a04c8862 to your computer and use it in GitHub Desktop.
Save luizbills/71bd9497e9baeae88f2d74a7a04c8862 to your computer and use it in GitHub Desktop.
Muda o preço do PAC
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