Created
November 16, 2018 09:23
-
-
Save wooexperte/bca13068ccee520e59974a516a741c22 to your computer and use it in GitHub Desktop.
WooCommerce - Kostenlos statt 0 Euro
This file contains 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_html', 'wpglorify_price_free_zero_empty', 100, 2 ); | |
function wpglorify_price_free_zero_empty( $price, $product ){ | |
if ( '' === $product->get_price() || 0 == $product->get_price() ) { | |
$price = 'kostenlos!'; // Text anpassen | |
} | |
return $price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment