Skip to content

Instantly share code, notes, and snippets.

@webdev1001
Forked from kloon/functions.php
Last active August 29, 2015 14:08
Show Gist options
  • Save webdev1001/77f6e9c9bf6c698d7a02 to your computer and use it in GitHub Desktop.
Save webdev1001/77f6e9c9bf6c698d7a02 to your computer and use it in GitHub Desktop.
<?php
// Add R xx.xx per KG
add_action( 'woocommerce_price_html', 'wc_custom_price', 10, 2 );
function wc_custom_price( $price, $product ) {
return sprintf( __( '%s per KG', 'woocommerce' ), woocommerce_price( $product->get_price() ) );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment