Skip to content

Conversation

Narek13
Copy link
Collaborator

@Narek13 Narek13 commented Oct 1, 2025

Issue Description

During migration from legacy to new UI, ACDC-eligible merchants who were using BCDC need to have all ACDC card payment methods disabled to maintain proper BCDC-only state. Currently, when these merchants migrate, the BCDC override flag is set correctly but ACDC card methods may remain enabled, creating potential conflicts.

PR Description

Adds logic to explicitly disable all ACDC card payment methods during migration when ACDC-eligible merchants were using BCDC in the legacy UI, ensuring clean BCDC-only state in the new UI.

Changes:

  • Implemented disable_acdc_methods() method in PaymentSettingsMigration class
  • Method iterates through all card payment methods from PaymentMethodsDefinition
  • Disables each ACDC card method via toggle_method_state(false)
  • Called during migration when is_bcdc_enabled_for_acdc_merchant() returns true

Problem Addressed:
In the legacy UI, ACDC-eligible merchants could use BCDC (Standard Card buttons) while having other card-related methods (like Google Pay) enabled simultaneously. Without explicit cleanup during migration, these ACDC methods could remain active in the new UI, causing:

  • Payment method conflicts
  • Inconsistent payment processing behavior
  • Confusion about which card processing method is active

Before Migration

After

Screenshot 2025-10-01 at 20 53 58 Screenshot 2025-09-29 at 15 46 42
Screenshot 2025-10-01 at 20 54 24 Screenshot 2025-10-01 at 20 55 51

Add `disable_acdc_methods()` method to deactivate all ACDC card payment
methods when migrating ACDC merchants who were using BCDC in legacy UI.
This ensures proper BCDC-only state in the new UI by preventing conflicts
between ACDC and BCDC payment methods.

In legacy UI, merchants could have methods like Google Pay enabled
alongside BCDC. This method cleans up those configurations during
migration to maintain BCDC classification without ACDC interference.
@Narek13 Narek13 self-assigned this Oct 1, 2025
@Narek13 Narek13 added the bug Something isn't working label Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

🔗 Test this pull request with WordPress Playground

What's included:

  • ✅ WordPress (latest)
  • ✅ WooCommerce (latest)
  • ✅ PayPal Payments plugin v3.1.2-pr3730-18169568475-g363c400 (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 3.1.2-pr3730-18169568475-g363c400
  • Commit: 363c400
  • Artifact: woocommerce-paypal-payments-3.1.2-pr3730-18169568475-g363c400

💡 The demo environment resets each time you refresh. Perfect for testing!

🔄 This link updates automatically with each new commit to the PR.

⚠️ This URL is valid for 30 days from when this comment was last updated.


🤖 Auto-generated for commit 363c400 • Last updated: 2025-10-01T17:05:55.485Z

@Narek13
Copy link
Collaborator Author

Narek13 commented Oct 14, 2025

This was discussed to cancel

@Narek13 Narek13 closed this Oct 14, 2025
@Narek13 Narek13 deleted the PCP-5399-fix-bcdc-migration-logic branch October 14, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant