Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the pakistani rupe symbol in WooCommerce only on checkout page
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
if ( ! is_checkout() ) {
return $currency_symbol;
}
switch( $currency ) {
case 'PKR': $currency_symbol = 'PKR'; break;
}
return $currency_symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment