src/Plugin/ModifyCheckoutLayoutPlugin.php
private function disableDiscountComponent($jsLayout)
    {
        if ($this->scopeConfig->getValue(self::CONFIG_DISABLE_DISCOUNT_PATH, ScopeInterface::SCOPE_STORE)) {
            unset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
                ['payment']['children']['afterMethods']['children']['discount']);
        }
        return $jsLayout;
    }
private function disableDiscountComponent($jsLayout)
    {
        if ($this->scopeConfig->getValue(self::CONFIG_DISABLE_DISCOUNT_PATH, ScopeInterface::SCOPE_STORE)) {
            unset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
                ['payment']['children']['afterMethods']['children']['discount']);
        }
        return $jsLayout;
    }
private function disableDiscountComponent ( $ jsLayout ) { if ( $ this -> scopeConfig -> getValue ( self :: CONFIG_DISABLE_DISCOUNT_PATH , ScopeInterface :: SCOPE_STORE ) ) { unset ( $ jsLayout [ 'components' ] [ 'checkout' ] [ 'children' ] [ 'steps' ] [ 'children' ] [ 'billing-step' ] [ 'children' ] [ 'payment' ] [ 'children' ] [ 'afterMethods' ] [ 'children' ] [ 'discount' ] ) ; } return $ jsLayout ; }
Disables the discount component after payment step.

@param array $jsLayout
@return array
Disables the discount component after payment step .