A simple, powerful and independent e-commerce platform.
Sell anything with ease.

Auto-complete all Classic Commerce orders

Automatically set orders to completed.

		/**
 * Auto complete all Classic 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');

}
	
View Raw Code ID: 9943