Skip to content

Instantly share code, notes, and snippets.

@luizbills
Created February 7, 2018 17:12
Show Gist options
  • Select an option

  • Save luizbills/fff7aeb5dff802acb88d7a697e21aa0b to your computer and use it in GitHub Desktop.

Select an option

Save luizbills/fff7aeb5dff802acb88d7a697e21aa0b to your computer and use it in GitHub Desktop.
Mudar resposta do correios de "Entrega em" para "Entrega em até"
add_filter( 'woocommerce_package_rates', 'lpb_change_correios_shipping_response_label', 10, 2 );
function lpb_change_correios_shipping_response_label ( $rates, $package ) {
foreach ( $rates as $rate) {
if ( false !== strpos($rate->id, 'correios') ) {
$rate->label = str_replace( 'Entrega em', 'Entrega em até', $rate->label );
}
}
return $rates;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment