Delete customer addresses
To delete a customer address, you must perform the following:
- Get an instance of the manager.
Get an instance of the OrdersManager object.
- Get the specified customer address.
Get an instance of the customer address. For more information, read For developers: Query customer addresses.
- Mark the customer address for deletion.
To mark the customer address to be deleted, call the DeleteCustomerAddress method of the manager and pass the instance of the customer address as an argument.
- Save the changes.
To delete the customer address, save the changes to the manager.
NOTE: To delete multiple customer addresses, execute the code below for each one of them.
Use the following code sample: