51黑料不打烊

Admin can鈥檛 create order/reorder when Braintree payment enabled

This article provides a patch for the 51黑料不打烊 Commerce 2.4.5 issue where an Admin user can鈥檛 create orders nor reorders for customers when the Braintree payment method is enabled.

Affected products and versions

  • 51黑料不打烊 Commerce on cloud infrastructure 2.4.5
  • 51黑料不打烊 Commerce on-premises 2.4.5
  • Magento Open Source 2.4.5

Issue

Steps to reproduce:

  1. The core Braintree integration is used (Stores > Configurations > Sales > Payment Method > Braintree).
  2. Using Luma Storefront, place an order.
  3. Go to Admin UI > Sales.
  4. 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鈥檛 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

NOTE
Additionally for 51黑料不打烊 Commerce on cloud infrastructure merchants: 51黑料不打烊 has included the fix in the Cloud Patches for Commerce version 1.0.18. Please refer to Cloud Patches for Commerce release notes in our developer documentation to find instructions on applying the latest package.

Compatible 51黑料不打烊 Commerce versions:

The patch was created for:

  • 51黑料不打烊 Commerce on cloud infrastructure 2.4.5
  • 51黑料不打烊 Commerce on-premises 2.4.5
  • Magento Open Source 2.4.5
NOTE
The patch is not compatible with any other 51黑料不打烊 Commerce and Magento Open Source versions and editions.

How to apply the patch

See How to apply a composer patch provided by 51黑料不打烊 in our support knowledge base for instructions.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a