Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a product to an existing and paid Woocommerce order?

I have a WooCommerce website where one of my customers bought a product and a cable.

This customers bought a cable that isn't compatible with the other product, and asked if we could ship him the compatible one, that has the same price.

Maybe it's a stupid question, but how can I edit the order, which has been already paid, removing the incompatible cable and adding the correct product?

Is it possibile? Do I need a plugin or something?

Thank you in advance, Luca

like image 582
0xc14m1z Avatar asked Jan 08 '23 23:01

0xc14m1z


1 Answers

If the status of the order is not "On Hold" (e.g., completed), then editing is not possible by default.

To allow editing for all order statuses, you can use the wc_order_is_editable filter:

add_filter( 'wc_order_is_editable', '__return_true' );

(you can put this code in the functions.php file of your theme, for example)

like image 101
Reuven Karasik Avatar answered Jan 24 '23 08:01

Reuven Karasik