Skip to content

Incorrect Refund Amount Display When PayPal Dispute/Claim Exists #4265

@MorzhM

Description

@MorzhM

Bug Report: Incorrect Refund Amount Display When PayPal Dispute/Claim Exists

Describe the Bug

When a customer has opened a dispute or claim in PayPal, and the merchant processes a refund through the WooCommerce order admin (instead of refunding through the PayPal dispute resolution interface), the order page displays an incorrect refund amount.

The issue is that the amount on hold by the PayPal dispute/claim is being added to the displayed refund amount, leading to an inflated and misleading total.


To Reproduce

  1. Create a test order in WooCommerce and complete payment via PayPal
  2. As a customer, open a dispute or claim in PayPal (this places funds on hold)
  3. As the merchant, go to WooCommerce Orders admin
  4. Process a refund through the WooCommerce order page (NOT through PayPal's dispute resolution)
  5. Observe the refund amount displayed on the order page

Expected result: Only the actual refunded amount should be displayed.
Actual result: The displayed refund amount includes both the refund amount AND the amount held by PayPal dispute.


Expected Behavior

  • The refund amount displayed on the WooCommerce order page should reflect only the actual refund processed
  • PayPal dispute/claim holds should NOT be counted toward the refund total
  • These are two separate financial states:
    • Dispute hold = funds temporarily held by PayPal during dispute resolution
    • Refund = actual money returned to the customer

Actual Behavior

The refund amount displayed on the order page incorrectly sums:

  • The actual refund amount processed through WooCommerce
  • PLUS the amount currently on hold due to the PayPal dispute/claim

This causes confusion for merchants as it appears they have refunded more than they actually have.


Environment

Setting Value
WordPress Version 6.9.1
WooCommerce Version 10.5.2
Plugin Version (WooCommerce PayPal Payments) 3.4.1
PayPal Gateway Type PayPal Standard

Additional Details

Impact:

  • Merchants cannot accurately track actual refund amounts
  • Financial reconciliation between WooCommerce and PayPal becomes difficult
  • Order accounting and reporting become unreliable

Likely Root Cause:
The plugin may be incorrectly aggregating PayPal transaction types when calculating refund totals. Dispute-related holds should be filtered out from refund calculations.

Suggested Investigation Area:

  • How the plugin fetches and processes PayPal transaction history
  • The logic that sums refund amounts in the order display
  • Whether dispute transactions are being incorrectly classified as refunds

Example Scenario (for clarity)

Order total: $1759.00
Customer opens PayPal dispute: $1759.00 (funds $1681.30 placed on hold by PayPal)
Merchant refunds via WooCommerce: $1759.00 (actual refund to customer)

BUGGY DISPLAY:
Refund amount shown: $3440.30 ❌ (wrong - $1759 refund + $1681.30 hold)

CORRECT DISPLAY SHOULD BE:
Refund amount shown: $1759.00 ✓ (only the actual refund processed)

Confirmed in PayPal backend:

  • Only one refund of $1759.00 was processed to the customer
  • The additional $1681.30 is merely an On Hold amount due to the dispute
  • WooCommerce is incorrectly counting the On Hold amount as a refund

Screenshots

Image

Visible in screenshot:

  • WooCommerce order page showing PayPal transaction history
  • Refund amount is incorrectly inflated (includes both actual refund + dispute hold)
  • PayPal backend confirms only the order amount was refunded, not the hold amount

Additional Context

This issue affects merchants' ability to:

  1. Accurately track refunds in their WooCommerce admin
  2. Reconcile their PayPal transactions with WooCommerce orders
  3. Maintain accurate financial records

Any workaround or timeline for a fix would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions