Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save maxrice/db4efbbfae83e9706734 to your computer and use it in GitHub Desktop.
Save maxrice/db4efbbfae83e9706734 to your computer and use it in GitHub Desktop.
WooCommerce Customer/Order CSV Export - Update Order status after export
<?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