Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove coupon code in parenthesis from discount total title in Magento
<?php
$title = ($this->getTotal()->getCode() == 'discount') ? preg_replace('@\(.*?\)@', '', $this->getTotal()->getTitle()) : $this->getTotal()->getTitle();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment