Skip to content

Instantly share code, notes, and snippets.

@rafa-acioly
Created December 31, 2016 18:41
Show Gist options
  • Save rafa-acioly/cc69abc8e29cae68a97ae5524b518b95 to your computer and use it in GitHub Desktop.
Save rafa-acioly/cc69abc8e29cae68a97ae5524b518b95 to your computer and use it in GitHub Desktop.
<?php
function change_currency_symbol()
{
global $woocommerce;
return preg_replace('/[$]/', 'R$', $woocommerce->cart->get_cart_total());
}
apply_filter('woocommerce_cart_total', 'change_currency_symbol');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment