Delete customer addresses

To delete a customer address, you must perform the following:

  1. Get an instance of the manager.
    Get an instance of the OrdersManager object.
  2. Get the specified customer address.
    Get an instance of the customer address. For more information, read For developers: Query customer addresses.
  3. 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.
  4. 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:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?