Does anyone have a suggestion on how to add a ‘free’ text or badge after each payment method in the checkout.
The list is called by Magento_Checkout/web/template/payment-methods/list.html with an each call to render the payment method groups and their methods.
I hope there is a clever way of doing this, since I don’t want to overwrite all vendor payment method template files.
One option I tried was adding a ::after CSS element on the payment method title, which does work, however with this method I can’t figure out how to translate the “Free” text. Is there a way to pass through the a variable to CSS with Ko i18n for example (<!-- ko i18n: 'Free' -->)?
.payment-method-title:after {
content: 'Free';
font-size: 14px;
text-align: right;
line-height: 30px;
}