When creating a new order in the backend as an admin, you can either select from existing customers or click the "Create New Customer" button. However, we area finding that new customers added in this process are not actually created and are not in the customer grid afterwards.

I've tested with a vanilla installation of Magento 2.3.4 and have not been able to replicate this failure to create a new customer. How might I troubleshoot / fix this?

  • Are you on developer mode? Is error reporting and display errors on? Have you checked system.log and exception.log for errors? Dec 18, 2020 at 5:01

2 Answers 2


Since you're getting different results from vanilla install and your current repo, let's step through this hopefully we can narrow it down.

Do you see any warnings/notices in sys or exception log pertaining to this process?

Does your non-vanilla installation contain custom code that may be observing/altering related events?

Debug the logic:

Step through the logic of order creation and update your findings.

Starting points would be these methods in the file app/code/Magento/Sales/Model/AdminOrder/Create.php

  1. createOrder()
  2. _prepareCustomer()

NOTE: will update answer with feedback from OP

  • Thanks so much for stepping up, @LeoFisher! So would you essentially recommend grepping the app/code folder and vendor folders for these methods/classes?
    – brackfost
    Dec 16, 2020 at 13:36
  • 1
    no, you can go exactly to those files listed and they will have those methods inside. You will either need to set up a debugger (xdebug) or do some $this->logger to inspect objects and gain insight to why the logic may be failing. Also do you see anything in the logs around the time that the Order is being generated?
    – Leo Fisher
    Dec 16, 2020 at 20:54
  • Thanks @LeoFisher -- would you, for example, log the customer object in the _prepareCustomer() method?
    – brackfost
    Dec 16, 2020 at 21:13
  • Yes and check to see if its even entering this condition } elseif (!$customer->getId()) {. github.com/magento/magento2/blob/…
    – Leo Fisher
    Dec 17, 2020 at 1:20
  • 1
    No worries, when you have time ill help out when you come back around to it.
    – Leo Fisher
    Dec 22, 2020 at 18:35

I had an exact same problem after some days of debugging found that there was this patch installed https://github.com/magento/magento2/pull/28247 which interrupted creating new customer from admin when creating new order. maybe look through your patches as well (or plugins might also make a problem or observer)

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.