Last active
June 22, 2017 10:38
-
-
Save hugomedeiros/2883f90d2474808f23fe60ea80377e3a to your computer and use it in GitHub Desktop.
Update WooCommerce Order Status
This file contains hidden or 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 | |
| function update_order_status($status){ | |
| $order = new WC_Order($order_id); | |
| if (!empty($order)) { | |
| // 'processing', 'completed', 'on-hold', 'canceled', other(slug) | |
| $order->update_status( '$status' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment