How To Delete Cart Price Rules By ID In Magento 2

How To Delete Cart Price Rules By ID In Magento 2

Cart price rules apply discounts to items in the cart, based on a set of conditions.

We’ve already discussed the steps to add Magento 2 cart price rules earlier.

Now, you may have the business requirement to delete cart price rules based on the season, offer validity, etc. It may even happen that the discount is to be canceled due to some legit rule violation or any other reason.

One of the ways to do so is to delete cart price rules by ID in Magento 2 store as shown below.

Method To Delete Cart PHow To Delete Cart Price Rules By ID In Magento 2rice Rules By ID In Magento 2:

That’s it.

Follow the above method to remove the discount price rules programmatically by ID in Magento 2.

Removing the applied cart rules avoids mistakes in discount and incur any loss!

Any doubts in cart price rule or the steps to delete it? Feel free to mention them in the Comments section below and I’d be happy to help.

Please share the post via social media for fellow Magento developers to make their tasks easier.

 

3.5
(based on 4 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a reply:

Your email address will not be published.

SUBSCRIBE
3.8
(based on 5 Reviews)