Created
December 12, 2013 16:18
-
-
Save raphaelchaib/7930687 to your computer and use it in GitHub Desktop.
WooCommerce: Changes how price is displayed
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 | |
| // Changes how price is displayed | |
| add_filter( 'woocommerce_get_price_html', 'wpa83367_price_html', 100, 2 ); | |
| function wpa83367_price_html( $price, $product ){ | |
| $return = str_replace( '<ins>', 'Por: <ins>', $price ); | |
| $return = str_replace( '<del>', '<small class="price-from">De: <del>', $return ); | |
| $return = str_replace( '</del>', '</del></small><br/>', $return ); | |
| return $return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment