Dear Team,
I've entered the following php code so that I add a custom suffix/prefix to the price.
the issue is that the custom message appear, but the price is not appearing. any advise?
link to the issue: https://www.qarenha.com/product-category/tele/
add_filter( 'woocommerce_get_price_html', 'conditional_price_suffix', 1000, 3 );
function conditional_price_suffix( $price, $product ) {
$product_categories = array('tele','hoodies');
if( has_term( $product_categories, 'product_cat', $product->get_id() ) )
$price = $price . __('/ month');
return $price;
}
sorry my bad, the issue was in the product.
the code is working perfectly fine