Auto-complete all SC Commerce orders

Automatically set orders to completed.

/**
 * Auto complete all SC Commerce orders
 */

add_action('woocommerce_thankyou', 'cc_auto_complete_order');

function cc_auto_complete_order($order_id) { 

  if (! $order_id) {
    return;
  }

  $order = wc_get_order($order_id);
  $order->update_status('completed');

}