---
title: "Steps to Remove Apply Discount Code From Checkout Payment Page in Magento 2"
url: "https://magecomp.com/blog/how-to-remove-apply-discount-code-from-checkout-payment-page-in-magento-2/"
date: "2020-08-17T16:44:42+00:00"
modified: "2025-02-20T09:41:08+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 511
reading_time: "3 min read"
summary: "Hello Magento Friends ?,"
description: "Want to remove coupon in Magento 2? Discount code can be removed with two methods - CSS file and XML file. Know-How to Remove Apply Discount Code From Checko..."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Add Dynamic CMS Block Programmatically in Magento 2?"
    url: "https://magecomp.com/blog/add-dynamic-cms-block-programmatically-magento-2/"
  - title: "How to add Custom Options to the Product Programmatically in Magento 2?"
    url: "https://magecomp.com/blog/add-custom-options-product-programmatically-magento-2/"
  - title: "How to Use ViewModels in Magento 2?"
    url: "https://magecomp.com/blog/viewmodels-magento-2/"
---

# Steps to Remove Apply Discount Code From Checkout Payment Page in Magento 2

_Published: August 17, 2020_  
_Author: Dhiren Vasoya_  

![How to Remove Apply Discount Code From Checkout Payment Page in Magento 2](https://magecomp.com/blog/wp-content/uploads/2020/08/How-to-Remove-Apply-Discount-Code-From-Checkout-Payment-Page-in-Magento-2-1024x512.webp)

**Hello Magento Friends ?,**

Today I will illustrate How to Remove Apply Discount Code From Checkout Payment Page in Magento 2. Let’s check out our previous blog, [**Magento 2: How to Add Custom Sidebar On Checkout Page**](https://magecomp.com/blog/magento-2-how-to-add-custom-sidebar-on-checkout-page/). So, let’s start on ?
[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-1.webp)](https://magecomp.com/magento-performance-optimization.html)

## Beginning:
Discounts and offers are provided to the products and services in order to attract customers towards the store. The customers are likely to purchase more when they find any discounts. Besides, visitors can be easily converted into customers with the help of it.
But discounts are applied to the products or services for a specific period of time. After that, the store owner needs to remove or disable the discount code from the product payment page. Also, when the discount is applied only for a particular group of customers, the product payment page of other customer groups must not show the discount code.
Hence, let us find out the way to fulfill the above necessity.
## Methods to Remove Apply Discount Code From Checkout Payment Page in Magento 2:
Remove Apply Discount Code From Checkout Payment Page in Magento 2 involves two methods to implement it.
**Method 1: Using the CSS file**

Enter the below code in your custom CSS file.
```
.checkout-index-index .payment-option._collapsible.opc-payment-additional.discount-code
{
    display: none;
}
```

**Method 2: Using the XML file**

Move to the following path
**app/design/frontend/VENDOR/THEME/Magento_Checkout/layout/checkout_index_index.xml**

And enter the below code
```
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="checkout.root">
        <arguments>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="checkout" xsi:type="array">
                        <item name="children" xsi:type="array">
                            <item name="steps" xsi:type="array">
                                <item name="children" xsi:type="array">
                                    <item name="billing-step" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="payment" xsi:type="array">
                                                <item name="children" xsi:type="array">
                                                    <item name="afterMethods" xsi:type="array">
                                                        <item name="children" xsi:type="array">
                                                            <item name="discount" xsi:type="array">
                                                                <item name="config" xsi:type="array">
                                                                    <item name="componentDisabled" xsi:type="boolean">true</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>
```

[![hyva theme development](https://magecomp.com/blog/wp-content/uploads/2025/02/hyva-theme-development-CTA-3.webp)](https://magecomp.com/services/hyva-theme-development/)

Now run the below commands to view the effect
```
php bin/magento cache:clean
php bin/magento cache:flush
```

## Ending:
Therefore, now everyone is able to Remove Apply Discount Code From Checkout Payment Page in Magento 2. While implementing the code, if you come across any difficulty notify me in the comment section below. Share the article with your Magento Developer buddies. Stay in the know for more such solutions.
[![Hire Magento Programmer](https://magecomp.com/blog/wp-content/uploads/2025/02/Hire-Magento-Programmer-CTA-4.webp)](https://magecomp.com/services/hire-magento-programmer/)

**Happy Coding ?**

</body>


---

_View the original post at: [https://magecomp.com/blog/how-to-remove-apply-discount-code-from-checkout-payment-page-in-magento-2/](https://magecomp.com/blog/how-to-remove-apply-discount-code-from-checkout-payment-page-in-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-11-09 07:22:06 UTC_  
