Files
wp-graphql-woocommerce/includes
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
..