Add text after price in single product page only woocomerce

Im trying to add text next to product price only in single product page. I found that price is displayed with this hook woocommerce_template_single_price (?) so I'm using this code in my functions.php:

function change_product_price_display( $price ) {
    $price .= ' su PVM';
    return $price;
}
add_filter( 'woocommerce_template_single_price', 'change_product_price_display' );

Nothing happens. I can make so text is shown next to price everywhere with this hook woocommerce_get_price_html, but I need text only in single product page.



Read more here: https://stackoverflow.com/questions/66482265/add-text-after-price-in-single-product-page-only-woocomerce

Content Attribution

This content was originally published by DadaB at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: