Skip to content

fix(ACDC): hide Processor Response row for approved orders on edit order page (6429)#4478

Merged
Dinamiko merged 2 commits into
dev/developfrom
dev/PCP-6429-acdc-edit-order-page-processor-response-0000-approved-is-showing-on-edit-order-page
Jun 30, 2026
Merged

fix(ACDC): hide Processor Response row for approved orders on edit order page (6429)#4478
Dinamiko merged 2 commits into
dev/developfrom
dev/PCP-6429-acdc-edit-order-page-processor-response-0000-approved-is-showing-on-edit-order-page

Conversation

@Narek13

@Narek13 Narek13 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Description

On the WooCommerce edit order page, ACDC orders were showing a "Processor Response: 0000: Approved" row in the order totals section. Code 0000 means the payment was approved — there is nothing actionable for the merchant, so the row should not be displayed.

The display is rendered by a hook in WCGatewayModule that only checked empty($fraud_result['response_code']). Since '0000' is non-empty, it passed the guard and was always printed for ACDC orders. The fix adds || $fraud_result['response_code'] === '0000' to the early-return condition, suppressing the row for approved payments. Non-0000 codes (declines, errors, etc.) continue to display as before.

A functional test assertion was added to WooCommerceOrderEdit.assertOrderDetails to verify the row is absent for all ACDC orders going forward.

Before After
Before - Screenshot 2026-05-18 at 12:53:04 After - Screenshot 2026-06-26 at 14:23:44

Steps to Test

  1. Enable ACDC (Advanced Card Processing) in the plugin settings.
  2. Complete a checkout using a test card (e.g. the default Visa test card).
  3. Navigate to WooCommerce → Orders and open the newly created order.
  4. Confirm the "Processor Response" row is no longer visible in the order totals section beneath the PayPal Payout line.

@github-actions

Copy link
Copy Markdown

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 v4.1.0-pr4478-28232275232-g3026883 (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 4.1.0-pr4478-28232275232-g3026883
  • Commit: 445fbd3
  • Artifact: woocommerce-paypal-payments-4.1.0-pr4478-28232275232-g3026883

💡 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 445fbd3 • Last updated: 2026-06-26T10:26:02.498Z

@Narek13 Narek13 changed the title fix(ACDC): hide Processor Response row for approved orders on edit order page fix(ACDC): hide Processor Response row for approved orders on edit order page (6429) Jun 26, 2026
@Dinamiko
Dinamiko merged commit fd568f6 into dev/develop Jun 30, 2026
12 checks passed
@Dinamiko
Dinamiko deleted the dev/PCP-6429-acdc-edit-order-page-processor-response-0000-approved-is-showing-on-edit-order-page branch June 30, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants