Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* @Title: WooCommerce Add Product Price Unit on Shop and Single Product Page
* @Author: Mina Pansuriya
* @Website: http://minapansuriya.com
*/
add_filter( 'woocommerce_get_price_html', 'pbs_woo_add_product_unit_after_prie' );
add_filter( 'woocommerce_cart_item_price', 'pbs_woo_add_product_unit_after_prie' );
function pbs_woo_add_product_unit_after_prie( $price ) {
$price .= ' per litre';
return $price;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment