Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@xadapter
Last active December 11, 2019 09:03
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 xadapter/53c0f79c3792d6712ce5b9646427d4f3 to your computer and use it in GitHub Desktop.
Save xadapter/53c0f79c3792d6712ce5b9646427d4f3 to your computer and use it in GitHub Desktop.
Map Order Number with Order ID(done WooCommerce Sequential Order Numbers Pro) while importing a CSV file with WooCommerce Shipment Tracking Pro by PluginHive: https://www.pluginhive.com/product/woocommerce-shipment-tracking-pro/
add_filter( 'xa_tracking_importer_order_id', 'xa_get_order_id_from_order_number' );
if( ! function_exists('xa_get_order_id_from_order_number') ) {
function xa_get_order_id_from_order_number($order_number) {
return wc_seq_order_number_pro()->find_order_by_order_number( $order_number );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment