Merhaba

function wc_custom_auto_complete_order($order_id) {
if (!$order_id) {
return;
}

$order = wc_get_order($order_id);

// Eğer sipariş "processing" statüsündeyse, tamamlandı olarak güncelle
if ($order->get_status() == 'processing') {
$order->update_status('completed');
}
}
add_action('woocommerce_thankyou', 'wc_custom_auto_complete_order');