If Woocommerce grouped product price is 0 show ‘POA’

Question

My grouped products currently say ‘Free’ if the child product prices are 0. I was just trying to find a way to show ‘POA’ instead.

I’ve found a way to remove the price range but cannot figure out how to replace the price with text.

add_filter( 'woocommerce_grouped_price_html', 'bbloomer_grouped_price_range_from', 10, 3 );
 
function bbloomer_grouped_price_range_from( $price, $product, $child_prices ) {
$prices = array( min( $child_prices ), max( $child_prices ) );
$price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
return $price;
}
0
rel_99 2 years 2020-12-20T19:10:35-05:00 0 Answers 10 views 0

Leave an answer

Browse
Browse