<?php

    namespace MNM\Spitzner\Plugin;

    class RemoveAmpromoSalesRuleLabel
    {
        /**
         * @param \Magento\SalesRule\Model\RulesApplier $subject
         * @param callable $result
         * @param \Magento\Quote\Model\Quote\Address $address
         * @param \Magento\SalesRule\Model\Rule $rule
         * @return array
         */
        public function aroundAddDiscountDescription(\Magento\SalesRule\Model\RulesApplier $subject, callable $proceed, $address, $rule)
        {
            if(strpos($rule->getSimpleAction(), 'ampromo_cart') === false)
            {
                $proceed($address, $rule);
            }

            return $subject;
        }
    }