Hello this code solved my problem:
add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_paid_order’, 999, 1 );
function custom_woocommerce_auto_complete_paid_order( $order_id ) {
// Only for ‘woo_credits’ payment gateway
if ( ! $order_id || ‘woo_credits’ != get_post_meta($order_id, ‘_payment_method’, true) )
return;
// Get an instance of the WC_Order object
$order = wc_get_order( $order_id );
// Update order status back to ‘processing’
$order->update_status( ‘processing’ );
}
Regards.