Untick "Restock Refunded Items" by Default
Leaves the "Restock refunded items" box unticked when you refund an order, for shops where returned goods are usually damaged or not resold.
Opens WPIDE on
Code
add_filter( 'woocommerce_restock_refunded_items', '__return_false' );
Notes
You can still tick the box for an individual refund when the items do go back on the shelf.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.