Created
May 27, 2014 17:27
-
-
Save maxrice/db4efbbfae83e9706734 to your computer and use it in GitHub Desktop.
WooCommerce Customer/Order CSV Export - Update Order status after export
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 | |
// this will update an order's status immediately after it's exported | |
function wc_csv_export_update_exported_order_status( $order, $export_method ) { | |
// uncomment this to restrict the order status update to a specific export method | |
//if ( 'ftp' != $export_method ) { | |
// return; | |
//} | |
$order->update_status( 'completed' ); | |
} | |
add_action( 'wc_customer_order_csv_export_order_exported', 'wc_csv_export_update_exported_order_status', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment