Skip to content

Instantly share code, notes, and snippets.

@vanbo
Created April 16, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanbo/04efdc6bb1b237c2a1db to your computer and use it in GitHub Desktop.
Save vanbo/04efdc6bb1b237c2a1db to your computer and use it in GitHub Desktop.
Add TradeGecko Order status to Orders Sync watch list
// 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