What could cause Magento to change new address back to default address on Paypal redirect?

What could cause Magento to change new address back to default address on Paypal redirect?

October 7, 2026 · Illustrated author avatarBy Stefan Bogdanescu
What could cause Magento to change new address back to default address on Paypal redirect?

Strange Magento Address Issue During PayPal Express Checkout

As a seasoned developer, I’ve encountered various challenges while working with e-commerce platforms like Magento. One of the most puzzling issues I faced recently was an address discrepancy during the checkout process using PayPal Express.

The Curious Bug in Onepage Checkout

The bug manifested itself when logged-in customers entered new billing addresses “on-the-fly” and elected to save them in their address book for future use. After setting the shipping address to this new location, they would proceed through the onepage checkout flow.

Remarkably, at this stage, the address was saved correctly within the database. The Magento system appeared to handle the data appropriately until the final stages of the PayPal Express transaction.

Tracing the Issue: A Closer Look at the Code

Using Xdebug for debugging purposes, I traced the issue through the checkout process. Specifically, I observed a line in the app/code/core/Mage/Sales/Model/Quote.php file on line 318:

if (null !== $this->getAddressesCollection()) {
    $this->getAddressesCollection()->save();
}

The critical point here is that right before this line, the getAddressesCollection() method was retrieving both the billing and shipping addresses. However, at this stage, these addresses were incorrectly set back to the customer’s default address.

The Database Discrepancy

Despite the database containing the correct, newly entered addresses, the Magento system seemed to overwrite them with the default values just prior to redirection to PayPal. This led to a situation where the data integrity was maintained in the database but not reflected accurately during the final checkout steps.

Possible Causes and Solutions

Upon further investigation, I discovered that this issue appears to be a known bug within Magento Enterprise Edition 1.11.1.0. While it’s frustrating to encounter such a problem, there are a few potential solutions:

  1. Upgrade to a Later Version: If feasible, updating the Magento version could potentially resolve this issue. The latest versions often include patches for bugs found in previous releases.

  2. Custom Logic or Patch Introduction: In some cases, a custom logic addition or a specific patch might be required to prevent the addresses from being overwritten during the final save operation before redirection to PayPal.

  3. Third-Party Extensions Review: If you’re using any third-party extensions that interact with the checkout process, it’s worth reviewing them for potential conflicts or issues.

Conclusion: Addressing the Magento Bug

Address discrepancies during the checkout process can significantly impact user experience and conversion rates. As developers, we must remain vigilant to such bugs and work diligently to resolve them.

While this specific issue appears to be a known bug in Magento Enterprise Edition 1.11.1.0, it’s important to note that the platform continually evolves with new releases and patches addressing such concerns.

If you’re facing similar challenges or need further assistance with Magento development, feel free to reach out to our team at Laravel Company. Our experienced developers are always ready to help troubleshoot complex issues and optimize your e-commerce platform for enhanced performance and user satisfaction.

Checkout Database Configuration Customers

Our network