Skip to content

Instantly share code, notes, and snippets.

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 jrick1229/6cef09ee06b682b2a66fc839b31f0e05 to your computer and use it in GitHub Desktop.
Save jrick1229/6cef09ee06b682b2a66fc839b31f0e05 to your computer and use it in GitHub Desktop.
Set all orders to Processing on payment complete - even ones containing products marked as Virtual & Downloadable
<?php
/*
* set all orders to Processing on payment complete
* even ones containing products marked as Virtual & Downloadable
*/
add_action( 'woocommerce_payment_complete', 'woocommerce_subscriptions_processing_order_override' );
function woocommerce_subscriptions_processing_order_override( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_order( $order_id );
$order->update_status( 'processing' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment