Skip to content

Magento 2: How to add custom text attribute on product page after price, Only if special price?

How to add custom text attribute on the product page after price Only if special price.
If special price custom text is visible if normal price custom text is not visible.
Magento 2.3.6

For example:
Product 1 with special price, text “custom text aaa” visible. If product with regular price only, the text not visible.

Product 2 with special price, text “custom text bbb” visible. If product with regular price only, the text not visible.