Last active
June 11, 2021 13:23
-
-
Save stuartduff/e2caa1d60b3f31504523215571d1ad17 to your computer and use it in GitHub Desktop.
Change the pakistani rupe symbol in WooCommerce only on checkout page
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_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