Friday, 8 November 2019

Add customer address attribute programmatically in Magento 2.3 using Data Patch

1.Create file registration.php in app/code/Custom/CustomerAddressAttribute/registration.php

<?php
/**
 * Ansar Husain
 * Custom_CustomerAddressAttribute
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Custom_CustomerAddressAttribute,
    __DIR__
);


Add customer attribute programmatically in Magento 2.3 using Data Patch

1.Create file registration.php in app/code/Custom/CustomerAttribute/registration.php

<?php
/**
 * Ansar Husain
 * Custom_CustomerAttribute
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Custom_CustomerAttribute,
    __DIR__
);


Add order state and status programmatically in Magento 2.3 using Data Patch

1.Create file registration.php in app/code/Custom/OrderStatus/registration.php

<?php
/**
 * Ansar Husain
 * Custom_OrderStatus
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Custom_OrderStatus',
    __DIR__
);