How to display “Free” for product with $0.00 price in Magento 2

Going to use the Around plugin to change $0.00 to as “Free” text. You can follow below steps to get it done:

For PLP and PDP, you can replace your module name as per given exapmle

app/code/MM/Training/etc/frontend/di.xml

app/code/MM/Training/Plugin/Pricing/Render/PriceBox.php

Just flush your Magento cache and changes will reflect over the frontend. It will be displayed as “free” instead of “$0.00” amount in your store frontend.

Leave a Reply

Your email address will not be published. Required fields are marked *