Admin can’t create order/reorder when Braintree payment enabled
This article provides a patch for the Adobe Commerce 2.4.5 issue where an Admin user can’t create orders nor reorders for customers when the Braintree payment method is enabled.
Affected products and versions
- Adobe Commerce on cloud infrastructure 2.4.5
- Adobe Commerce on-premises 2.4.5
- Magento Open Source 2.4.5
Issue
Steps to reproduce:
- The core Braintree integration is used (Stores > Configurations > Sales > Payment Method > Braintree).
- Using Luma Storefront, place an order.
- Go to Admin UI > Sales.
- Either try to create a new order for a customer, or go to a previously placed order and click on Reorder.
Expected result:
Admin users can successfully create orders and reorders for customers when the Braintree payment method is enabled.
Actual result:
Admin users can’t create orders nor reorders for customers when the Braintree payment method is enabled, and returns the following error:
report.CRITICAL: Error: Call to a member function getMethodInstance() on null in /app/vendor/paypal/module-braintree-core/Block/Form.php:174
Cause
Incorrect class dependencies (vendor/paypal/module-braintree-core/Block/Form.php
)
Solution
Apply the patch provided in this article.
Patch
The patch is attached to this article. To download it, click the following link:
BUNDLE-3137-composer.patch.zip
Compatible Adobe Commerce versions:
The patch was created for:
- Adobe Commerce on cloud infrastructure 2.4.5
- Adobe Commerce on-premises 2.4.5
- Magento Open Source 2.4.5
How to apply the patch
See How to apply a composer patch provided by Adobe in our support knowledge base for instructions.