Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Created February 25, 2021 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrick1229/6d56e5978ce2115c2a1cc2d94d2e57dd to your computer and use it in GitHub Desktop.
Save jrick1229/6d56e5978ce2115c2a1cc2d94d2e57dd to your computer and use it in GitHub Desktop.
Append USD to price string in WooCommerce
<?php
add_filter( 'wc_price', 'wc_price_add_USD', 10, 3 );
function wc_price_add_USD( $return, $price, $args){
$price= "$" . $price . " USD";
return $price;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment