I have the following code in my child theme's functions.php file, and it works great.
function themeprefix_custom_price_message( $price ) {
global $post;
$product_id = $post->ID;
$my_product_array = array( 270,373,378,506,1306,1311,1312,1444,1445,1447,1449,1930,1932,1933,1934,1935,1963,4146,4152,4153,4154 );//add in product IDs
if ( in_array( $product_id, $my_product_array )) {
$textafter = ' Each/Min 12'; //add your text
return $price . '<span class="price-description">' . $textafter . '</span>';
}
else
{
return $price;
}
}
add_filter( 'woocommerce_get_price_html', 'themeprefix_custom_price_message' );
However, now I need to add another group of products and enable different text after the price, i.e., Each/Min 8. I have tried various changes to the above and have brought the site down each time. How do I adjust the above to add another (and then possibly another) group of product IDs with different text after the price? Thanks in advance!

