In this topic we will show you How to Remove Block Depending on a Config Setting through 2 steps:

  • Step 1: Create your events.xml
  • Step 2: Create RemoveBlock.php

Confirmation and Alert Jquery Widget

Step 1: Create your events.xml

Create your events.xml in events.xml file in app\code\[Name_Space]\[Your_Module]\etc

Step 2: Create RemoveBlock.php

Create RemoveBlock.php in app\code\[Name_Space]\[Your_Module]\Model\Observer

The steps I mention above is the shortest process for you to Remove Block Depending on a Config Setting. With this guide, you can manage the Config Setting in Magento 2 easily. Every store has a Config Setting in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!

We also contribute great content of Magento Download for FREE (all versions)

DON'T MISS THE CHANCE!

magento download

How to Override Magento JS Core in Magento 2
How to Get all Translation Labels from PHP and JS Files of Magento 2 Extension

Leave a Reply

Your email address will not be published. Required fields are marked *