Created
August 6, 2016 05:27
-
-
Save stevenhoney/d82216edc85f997f700f23b59206a17d to your computer and use it in GitHub Desktop.
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
| add_filter('woocommerce_get_price','change_price', 10, 2); | |
| add_filter('woocommerce_get_regular_price','change_price', 10, 2); | |
| add_filter('woocommerce_get_sale_price','change_price', 10, 2); | |
| function change_price( $price, $product_id ){ | |
| $front_prijs = get_field( 'front_prijs', $product_id ); | |
| $tekst_na_prijs = get_field( 'tekst_na_prijs', $product_id ); | |
| if( $front_prijs && $tekst_na_prijs ){ | |
| $price = '€' . $front_prijs . ' ' . $tekst_na_prijs; | |
| } | |
| return $price; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment