How To

How to Fix PayPal Module Error in UpdateBmltoPayLater.php File While Upgrading to Magento 2.4.x?

Hello Magento Friends,

Errors are expected to occur while developing. But every error has a solution. And today I am here with a solution for PayPal Module Error in UpdateBmltoPayLater.php File While Upgrading to Magento 2.4.x.

At the time of upgrading to Magento 2.4.x, the composer update works fine but when you run the below command,

php bin/magento setup:upgrade

It throws the below error,

Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater for 
module Magento_Paypal. Original exception message: Notice: Undefined offset: 1 in 
/vendor/magento/module-paypal/Setup/Patch/Data/UpdateBmltoPayLater.php on line 138

To fix the issue, follow the below steps

How to Fix PayPal Module Error While Upgrading to Magento 2.4.x?

Step 1: Open your Magento 2 Database & run the below SQL Query

DELETE FROM `core_config_data` WHERE `path` = 'payment/paypal_express_bml/active';

Step 2: Then, run the Magento setup upgrade command to check if the issue is fixed or not.

php bin/magento setup:upgrade

Conclusion:

Accordingly, you can overcome the “Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater” Error For Magento PayPal Module While Upgrading to Magento 2.4.x. If you still receive the same error, contact our Magento Experts or utilize the Magento Upgrade Service.

Share the article with your developer friends to help them resolve the error. If the solution was useful to you, hit the 5 stars and stay updated with us for more solutions.

Happy Coding!

Click to rate this post!
[Total: 3 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

Recent Posts

Improving Error Handling and Transition Management in Remix with useRouteError and useViewTransitionState

In modern web development, seamless navigation and state management are crucial for delivering a smooth…

6 days ago

Magento Open Source 2.4.8-Beta Release Notes

Magento Open Source 2.4.8 beta version released on October  8, 2024. The latest release of…

1 week ago

How to Create Catalog Price Rule in Magento 2 Programmatically?

Hello Magento Friends, Creating catalog price rules programmatically in Magento 2 can be a valuable…

1 week ago

Top 10 Tips to Hire Shopify Developers

As the world of eCommerce continues to thrive, Shopify has become one of the most…

2 weeks ago

Managing Browser Events and Navigation in Shopify Remix: useBeforeUnload, useHref, and useLocation Hooks

Shopify Remix is an innovative framework that provides a streamlined experience for building fast, dynamic,…

2 weeks ago

Ultimate Guide to Hiring a Top Shopify Development Agency

Building a successful eCommerce store requires expertise, and for many businesses, Shopify has become the…

2 weeks ago