Skip to content

Instantly share code, notes, and snippets.

@hmowais
Created November 27, 2019 12:44
Show Gist options
  • Save hmowais/701830117d6b1f7e2ac38de68e5173ef to your computer and use it in GitHub Desktop.
Save hmowais/701830117d6b1f7e2ac38de68e5173ef to your computer and use it in GitHub Desktop.
Show Custom Content After Product Price
<?php
function cw_change_product_price_display( $price ) {
if(is_singular()) {
$price .= '<small>' . ' Excl. GST' . '</small>';
return $price;
}
else {
$price .= '<small>' . ' Excl. GST' . '</small>';
return $price;
}
}
add_filter( 'woocommerce_get_price_html', 'cw_change_product_price_display' );
add_filter( 'woocommerce_cart_item_price', 'cw_change_product_price_display' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment