Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
customer_primary_addresses.php
Go to the documentation of this file.
1 <?php
8 
9 require 'customer_two_addresses.php';
10 
13  \Magento\Customer\Model\Customer::class
14 )->load(
15  1
16 );
18 $customerRegistry = $objectManager->get(CustomerRegistry::class);
19 $customer->setDefaultBilling(1)->setDefaultShipping(2);
20 $customer->save();
21 $customerRegistry->remove($customer->getId());
$objectManager
Definition: bootstrap.php:17