Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tranquangchau/67ef9f90b9c1b238f051991a102c8a69 to your computer and use it in GitHub Desktop.
Save tranquangchau/67ef9f90b9c1b238f051991a102c8a69 to your computer and use it in GitHub Desktop.
woocommerce get price without currency
global $woocommerce;
$currency = get_woocommerce_currency_symbol();
$info['price'] = number_format( $price, wc_get_price_decimals(), wc_get_price_decimal_separator(), wc_get_price_thousand_separator()).$currency;
//WC Version: 2.6.11
//WP Version: 4.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment