I use Drupal Commerce and taxonomy term field was added in customer shipping profile. Trying to merge terms fails. Customer profile field contains no value after operation.

Comments

grinenko created an issue. See original summary.

bucefal91’s picture

Hello!

Today I've looked into your problem. Term Merge behaves as it should with commerce customer profile. The problem actually resides in the business logic of commerce_order.module.

They prevent updating any customer profile that is already used in any commerce order. See the following snippet from commerce_order.module:

/**
 * Implements hook_commerce_customer_profile_presave().
 *
 * The Order module prevents customer profile deletion for any profile that is
 * referenced by a non-cart order via hook_commerce_customer_profile_can_delete().
 * The same logic applies when updating a customer profile to determine whether
 * or not the update should be allowed on the same profile or if it should be
 * handled as a clone of the original profile. This ensures that editing a
 * profile on a separate order or through the admin UI after completing an order
 * will not cause the original order to lose essential data.
 */
function commerce_order_commerce_customer_profile_presave($profile) {
  // ... actual implementation of the logic explained in the comment to the function.
}

Overall their action makes very good sense. But it does generate the trouble for Term Merge because it's not a real "update" for a customer profile. At some point I'll see if it's possible to tweak something in the Term Merge module so it bypasses this safety measure of commerce order module.

avpaderno’s picture

Title: Drupal Commerce shipping profile fields merging problem. » Shipping profile fields merging problem

Is this still an issue for supported releases?

astonvictor’s picture

Status: Active » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.