Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce - Kostenlos statt 0 Euro
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