Skip to main content

ArtinTech Solution

Recording Partial Refunds Without Losing the Order History

Partial returns are ordinary in fashion retail. Two shirts arrive, one fits, one goes back. The money moves, and the question is whether the system remembers why.

The common shortcut is to edit the order total and move on. It balances the day and destroys the history: nobody can later tell an order that was always this size from one that shrank, and the reason lives in a conversation rather than a record.

A refund is its own record

WooCommerce models refunds as objects attached to the order, and the tooling we built creates them properly: an amount, a reason, and a note written onto the order. The original line items stay untouched. The order still says what was bought; the refund says what came back and why.

Restocking is a separate choice, because it genuinely is one. A returned shirt in sellable condition goes back into stock; one that came back damaged does not, and the person processing the refund is the only one who knows which.

A small bug worth naming

The notes generated for these refunds arrived with the currency symbol rendered as a raw HTML entity — readable in a browser, literal nonsense in an admin notice and in the order note. Stripping tags from formatted price output is not enough on its own; the entities have to be decoded as well. It is a two-line fix that only shows up in the places people actually read.

Key takeaways

  • Never adjust an order total to represent a refund — create a refund record.
  • Capture the reason at the moment of the refund, while someone still knows it.
  • Make restocking an explicit decision, not an automatic consequence.
  • Formatted price output contains HTML entities; decode as well as strip before reusing it as text.

Related reading: custom order statuses that keep reports honest, and editing status from the order preview popup.

Running into a similar limitation in your own WooCommerce or WordPress store? Let’s Talk — ArtinTech Solution builds exactly this kind of custom store tooling.

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *