Title: Automatically Add Tracking
Last modified: July 22, 2019

---

# Automatically Add Tracking

 *  Resolved [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/)
 * Thank you for a great plugin and for TrackShip (to which I subscribe)!
 * I would love to automatically add tracking numbers to orders when they ship in
   ShipStation. How would I go about that?
 * Thanks so much in advance!
 * Jeff

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/automatically-add-tracking/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/automatically-add-tracking/page/2/?output_format=md)

 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11756927)
 * Hi, we are happy to add compatibility with shipping services, do you use a plugin
   for the ShipStation integration?
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11757513)
 * That would be amazing! Here is the plugin that is used for ShipStation:
 * [https://wordpress.org/plugins/woocommerce-shipstation-integration/](https://wordpress.org/plugins/woocommerce-shipstation-integration/)
 * Thanks so much – you are awesome!
 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11757769)
 * Hi, I think that the plugin should work with ShipStation plugin – they say that
   they support the WooCommerce Shipment tracking plugin, we use the same tracking
   meta fields for the tracking number and provider and if they are compatible, 
   it should be working with our plugin as well.
    [https://docs.woocommerce.com/document/shipstation-for-woocommerce/#section-7](https://docs.woocommerce.com/document/shipstation-for-woocommerce/#section-7)
   Let me know if I can be more help Thanks
    -  This reply was modified 6 years, 9 months ago by [Zorem](https://wordpress.org/support/users/zorem/).
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11759272)
 * Glad it sounds like it will work! I guess I’m just stuck on how to make the tracking
   show up in your plugin and not just the notes. I’m guessing it has something 
   to do with the functions.php file but I’m pretty new to edits on an integration
   front. Any extra help would be greatly appreciated!
 * Jeff
 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11759328)
 * Since we use the same meta fields you can check with the the ShipStation plugin
   support how to make it save the tracking info into the Shipment Tracking fields,
   this way, it should be compatible with our plugin as well
    Please let me know
   what they say Thanks
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11759452)
 * Thank you! I just submitted a question for their support. I’ll follow up when
   I get an answer 🙂
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760236)
 * They are asking what meta data would need to be passed along…can you help with
   that question?
 * Thanks!
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760252)
 * ShipStation is saying that tracking info is already passed to WooCommerce at 
   the time of shipment. I guess I’m lost as to what code needs to go where to put
   the tracking into in the right place
 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760323)
 * Hi.ok, did you check if the free plugin is maybe limited? you should contact 
   the plugin developer, I would look into this free plugin code and let you know
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760335)
 * I have posted in the support forum for this plugin:
 * [https://wordpress.org/plugins/woocommerce-shipstation-integration/](https://wordpress.org/plugins/woocommerce-shipstation-integration/)
 * and am awaiting response. I started with the ShipStation support themselves, 
   which was not correct. I have since posted to the plugin’s support.
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760763)
 * Does seeing this help? This is from the help doc for the ShipStation plugin:
 * // Add this code to your theme functions.php file or a custom plugin
    add_filter(‘
   woocommerce_shipstation_export_custom_field_2’, ‘shipstation_custom_field_2’ );
 * function shipstation_custom_field_2() {
    return ‘_meta_key’; // Replace this 
   with the key of your custom field }
 * // This is for custom field 3
    add_filter( ‘woocommerce_shipstation_export_custom_field_3’,‘
   shipstation_custom_field_3’ );
 * function shipstation_custom_field_3() {
    return ‘_meta_key_2’; // Replace this
   with the key of your custom field }
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11760802)
 * Actually, I think I found the code for the Shipment Tracking integration in the
   ShipStation plugin. See below. What would need to happen to make this work for
   your plugin?
 * // Tracking information – WC Shipment Tracking extension.
    if ( class_exists(‘
   WC_Shipment_Tracking’ ) ) { if ( function_exists( ‘wc_st_add_tracking_number’)){
   wc_st_add_tracking_number( $order_id, $tracking_number, strtolower( $carrier ),
   $timestamp ); } else { // You’re using Shipment Tracking < 1.4.0. Please update!
   update_post_meta( $order_id, ‘_tracking_provider’, strtolower( $carrier ) ); 
   update_post_meta( $order_id, ‘_tracking_number’, $tracking_number ); update_post_meta(
   $order_id, ‘_date_shipped’, $timestamp ); }
 *  $is_customer_note = 0;
    } else { $is_customer_note = 1; }
 *  $order->add_order_note( $order_note, $is_customer_note );
 *  // Update order status.
    if ( $order_shipped ) { $order->update_status( WC_ShipStation_Integration::
   $shipped_status );
 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11763428)
 * Hi, ok, we created a code snippet that you can use in functions.php and should
   add the tracking info to our plugin fields:
    [https://gist.github.com/zorem/554da02b348474c56280254520d594b6](https://gist.github.com/zorem/554da02b348474c56280254520d594b6)
   Please let me know if this works. Thanks
 *  Thread Starter [jeffherb](https://wordpress.org/support/users/jeffherb/)
 * (@jeffherb)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11764635)
 * Hello!
 * Wow. Thank you so much. I will add the code to functions.php and run a shipment
   batch later today. I’ll let you know how it goes. Again, your support is amazing
   and much appreciated.
 * Jeff
 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/automatically-add-tracking/#post-11765734)
 * Sure 🙂 I close this topic, if it does not work let me know.
    If you enjoy the
   plugin, I will appreciate if you can review it 🙂 [https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/reviews/#new-post](https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/reviews/#new-post)
   Thanks

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/automatically-add-tracking/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/automatically-add-tracking/page/2/?output_format=md)

The topic ‘Automatically Add Tracking’ is closed to new replies.

 * ![](https://ps.w.org/woo-advanced-shipment-tracking/assets/icon-256x256.png?rev
   =2166296)
 * [Advanced Shipment Tracking for WooCommerce](https://wordpress.org/plugins/woo-advanced-shipment-tracking/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-advanced-shipment-tracking/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-advanced-shipment-tracking/reviews/)

 * 17 replies
 * 3 participants
 * Last reply from: [Zorem](https://wordpress.org/support/users/zorem/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/automatically-add-tracking/page/2/#post-11860177)
 * Status: resolved