Skip to content

Instantly share code, notes, and snippets.

@vanbo
Created February 5, 2018 11:01
Show Gist options
  • Save vanbo/e0036dc981e163753ae94c2dc3b36c5b to your computer and use it in GitHub Desktop.
Save vanbo/e0036dc981e163753ae94c2dc3b36c5b to your computer and use it in GitHub Desktop.
WC: Change complete order status
add_filter( 'woocommerce_payment_complete_order_status', 'prefix_filter_wc_complete_order_status', 10, 3 );
/**
* @param string $status
* @param int $order_id
* @param WC_Order $order
*
* @return string
*/
function prefix_filter_wc_complete_order_status( $status, $order_id, $order ) {
return 'on-hold';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment