You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"generator":"Code Snippets v3.3.0","date_created":"2023-05-04 20:02","snippets":[{"name":"Add currency suffix on cart and checkout pages in WooCommerce","desc":"https:\/\/woocommerce.github.io\/code-reference\/hooks\/hooks.html","tags":["currency","suffix","woocommerce"],"scope":"global","code":"add_filter( 'woocommerce_price_format', 'add_currency_suffix', 10, 2 );\n\nfunction add_currency_suffix( $price, $currency_symbol ) {\n\n \/\/ Only add the suffix on cart and checkout pages\n if ( is_cart() || is_checkout() ) {\n\n \/\/ Get the current currency code\n $currency = get_woocommerce_currency();\n\n \/\/ Add the suffix to the price\n $price .= ' ' . $currency;\n\n }\n\n return $price;\n\n}","priority":"10"}]}