Autocomplete Order
-
Hey there, I′m using the following script to autocomplete orders, no matter if they are already payed or not.
add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_order’ );
function custom_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id ) {
return;
}$order = wc_get_order( $order_id );
$order->update_status( ‘completed’ );
}This works out, but now I want the same for “re-orders”/ order the same product again. Has someone an idea?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Autocomplete Order’ is closed to new replies.