Created
November 25, 2020 14:08
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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