Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spraveenitpro/20a918c4e28448e6132b6ca19302c776 to your computer and use it in GitHub Desktop.
Save spraveenitpro/20a918c4e28448e6132b6ca19302c776 to your computer and use it in GitHub Desktop.
Add Suffix to product prices in WooCommerce Cart
add_filter( 'woocommerce_cart_item_price', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_item_subtotal', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_subtotal', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_total', 'kd_custom_price_message' );
function kd_custom_price_message( $price ) {
$afterPriceSymbol = ' Inc. GST';
return $price . $afterPriceSymbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment