For WooCommerce 4.0 and older, restocking on refund has two possible ways of being handled:

  1. A refund of the order where the order status is changed to “Refunded” triggeres a restock of all items in the order.
  2. A partial refund of the order gives the admin the option to restock or not with a tick box:
WP admin partial refund screenshot

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.

Github PR screenshot

For details of the change see issue #25728 on github. And to find out what else is happening in Woo 4.1 see the Beta Release Note.

Leave a Reply

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