Created
January 4, 2016 00:23
-
-
Save bekarice/0a148c189bdeccd187d9 to your computer and use it in GitHub Desktop.
Add labels to WooCommerce 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 | |
| // only copy opening php tag if needed | |
| // Adds "per package" after each product price throughout the shop | |
| function sv_change_product_price_display( $price ) { | |
| $price .= ' per package'; | |
| return $price; | |
| } | |
| add_filter( 'woocommerce_get_price_html', 'sv_change_product_price_display' ); | |
| add_filter( 'woocommerce_cart_item_price', 'sv_change_product_price_display' ); |
Can you explain, where to put this?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, can i ask you where to add this code, i try to figure out with the editor, dont find wc-product-price-display.php file.
I suppose i have to create it and add it inside the woocommerce plugin folders? Or i have to edit an existing files?