Created
April 16, 2015 15:59
-
-
Save vanbo/04efdc6bb1b237c2a1db to your computer and use it in GitHub Desktop.
Add TradeGecko Order status to Orders Sync watch list
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
// Use the filter to any status to the Order sync watch list. | |
add_filter( 'wc_tradegecko_query_orders_status', 'wc_tg_add_orders_sync_statuses' ); | |
function wc_tg_add_orders_sync_statuses( $statuses ) { | |
// Here you add all statuses that you want to support. | |
// They should be in array format and the value should be the status slug | |
// For WC 2.2+ statuses are added with "wc-" prefix, like this | |
$statuses[] = 'wc-pending'; // for Pending Payment status | |
$statuses[] = 'wc-on-hold'; // for On Hold status | |
// This will add pending and on-hold orders to the export and update list. | |
return $statuses; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment