Profile that is currently referenced by an order needs new profile

Created on 29 May 2015, over 10 years ago
Updated 18 August 2025, about 2 months ago

In Paypal EC. There is a function that takes care of data for customer profiles. It checked in options, they are gathered from PayPal and then saved to drupal.

commerce_paypal_ec_customer_profile is the function.
"profile is currently referenced by an order" is the problem.

When you have a profile currently referenced by an order, which is usually the case for old customers. You cant change data in that profile and clone of the profile is made, but with current code in the function above, clone is created, but referenced profile by order is still old profile, default one, so data from PayPal is not used for shipping address in drupal order data.

What I used is commerce_customer_profile_can_delete to check if profile is already referenced, and if so, just create new profile. I made a patch for that.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

PayPal EC

Created by

πŸ‡­πŸ‡·Croatia Marko B

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024