Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created February 17, 2016 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/cc7d5f9b55977cdd187e to your computer and use it in GitHub Desktop.
Save SiR-DanieL/cc7d5f9b55977cdd187e to your computer and use it in GitHub Desktop.
/**
* Auto Complete all WooCommerce orders.
*/
add_action( 'wc_custom_thankyou_successful', 'custom_woocommerce_auto_complete_order' );
function custom_woocommerce_auto_complete_order( $order ) {
if ( ! $order ) {
return;
}
$order->update_status( 'completed' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment