4 Commits
Author SHA1 Message Date
Geoff TaylorandGitHub 2107c7e034 feat: Implements refund mutations (#906)
* chore: New feature stubbed out

* feat: Implement createRefund and deleteRefund mutations

createRefund: Creates a refund on an order with amount, reason,
optional payment gateway refund, restock, and meta data support.
Requires edit_shop_orders capability.

deleteRefund: Deletes a refund by ID with optional force flag.
Returns the deleted refund data and parent order.
Requires delete_shop_orders capability.

Both mutations include before/after action hooks for extensibility
and follow the WC REST API refund controller pattern.

Closes #17

* chore: Add PHPStan type annotation for wc_get_order in Refund_Delete

* devops: Add guard tests for deleteRefund mutation

Test invalid refund ID, order ID passed instead of refund ID,
with expectedErrorMessage assertions confirming error messages.
2026-03-31 10:24:01 -04:00
Geoff Taylor 4e4654c540 CouponQueriesTest refactored. Unneeded tests removed. 2019-04-13 00:46:16 -04:00
Geoff Taylor 9949927b2b clean-up started 2019-03-21 21:43:24 -04:00
Geoff Taylor db6b666d9b some test implementation started 2019-03-14 23:55:34 -04:00