Skip to content

Instantly share code, notes, and snippets.

@vubon
Created February 15, 2018 02:44
Show Gist options
  • Select an option

  • Save vubon/8a5039446e08d2b22689f82fb3df0c5b to your computer and use it in GitHub Desktop.

Select an option

Save vubon/8a5039446e08d2b22689f82fb3df0c5b to your computer and use it in GitHub Desktop.
//Add in text after price to all products
function custom_text_to_price( $price, $product ) {
$price = $price . ' USD';
return $price;
}
add_filter( 'woocommerce_get_price_html', 'custom_text_to_price', 100, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment