Created
November 27, 2019 12:44
-
-
Save hmowais/701830117d6b1f7e2ac38de68e5173ef to your computer and use it in GitHub Desktop.
Show Custom Content After Product Price
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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