fix(ACDC): hide Processor Response row for approved orders on edit order page (6429)#4478
Merged
Conversation
Narek13
requested review from
AlexP11223,
Dinamiko,
danieldudzic,
hmouhtar,
mmaymo and
stracker-phil
as code owners
June 26, 2026 10:25
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. 🔗 Test this pull request with WordPress Playground What's included:
Login credentials:
Plugin Details:
🤖 Auto-generated for commit 445fbd3 • Last updated: 2026-06-26T10:26:02.498Z |
Dinamiko
approved these changes
Jun 30, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On the WooCommerce edit order page, ACDC orders were showing a "Processor Response: 0000: Approved" row in the order totals section. Code
0000means 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
WCGatewayModulethat only checkedempty($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-0000codes (declines, errors, etc.) continue to display as before.A functional test assertion was added to
WooCommerceOrderEdit.assertOrderDetailsto verify the row is absent for all ACDC orders going forward.Steps to Test