For WooCommerce 4.0 and older, restocking on refund has two possible ways of being handled:
- A refund of the order where the order status is changed to “Refunded” triggeres a restock of all items in the order.
- A partial refund of the order gives the admin the option to restock or not with a tick box:
As of WooCommerce 4.1 the option for a full order refund can now also be managed through a filter. Woo 4.1 introduces the new filter “woocommerce_can_restock_refunded_items”. If set to false, this filter will prevent restocking of items on refund.