Magento 2: Create Widget Programmatically & Assign Static Block to it

This article shows how you can add/create Widget using Upgrade Script of a module in Magento 2. This code is useful when you need to auto add/create widget while upgrading your custom module. Here, we will also create a CMS Static Block and assign that newly created static block to the Widget. Add Widget and … Read more