Created
June 26, 2018 11:11
-
-
Save wtmujeebu/381d9b9f2edcade9001c91cb63f5ad3e to your computer and use it in GitHub Desktop.
Make order status completed when an order is placed - WebToffee WooCommerce Subscriptions
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
add_action( 'woocommerce_order_status_processing', 'processing_to_completed'); | |
function processing_to_completed($order_id){ | |
$order = new WC_Order($order_id); | |
$order->update_status('completed'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment