enter image description here

Magento 2 - Checkout. Remove “New Address” Button from checkout billing/shipping address with module for B2B customers

2 Answers 2


Try these all steps

Step 1: Create the module structure In the app/code directory of your Magento installation.

  - app
  - code
    - Vendor
      - Module
        - etc
          - module.xml
        - registration.php

Step 2: Create the module declaration file Create the module.xml file in the etc

  <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0" />

Step 3: Create the registration file Create the registration.php

use Magento\Framework\Component\ComponentRegistrar;


Step 4: Override the checkout layout file Create the following file in your module's directory: app/code/Vendor/Module/view/frontend/layout/checkout_index_index.xml

  <?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="customer-addresses">
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout.steps.billing-step.billingAddress.customer-addresses" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="componentDisabled" xsi:type="boolean">true</item>
                        <item name="checkout.steps.shipping-step.shippingAddress.customer-addresses" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="componentDisabled" xsi:type="boolean">true</item>

Step 5: Enable the module

  php bin/magento module:enable Vendor_Module

  php bin/magento setup:upgrade

  php bin/magento setup:di:compile

  php bin/magento cache:clean
  • I want to hide this button for B2B and show this button for B2C how I can handle this any suggestions, please Commented Jun 3, 2023 at 18:43
  • this code is not worked Commented Jun 3, 2023 at 19:08
  • How you have identified that a customer is B2C or B2B customer?
    – Amit Bera
    Commented Jun 4, 2023 at 6:32

Please copy the file from vendor/magento/module-checkout/view/frontend/web/template/shipping.html



Remove the below code from the file

<!-- Address form pop up -->
        <if args="!isFormInline">
            <div class="new-address-popup">
                <button type="button"
                        class="action action-show-popup"
                    <span translate="'New Address'"></span>
            <div id="opc-new-shipping-address"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.