Hello @slash1andy
once again.
i try the code:
/**
* Auto Complete all WooCommerce orders.
*/
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’ );
}
and have copy this in my snippets plugin but it doesnt works.
After that i have put the code in my functions.php (as i have done a lot of times with other code) but then i get a wordpress crash / error.
i am running woocommerce Version 4.6.0
maybe i need another code or do you habe an idea what is going wrong?
Thanks a lot man
Greetings
Vasilibilly