Title: From Custom Field into PluginField
Last modified: December 18, 2021

---

# From Custom Field into PluginField

 *  Resolved [alkula](https://wordpress.org/support/users/alkula/)
 * (@alkula)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/from-custom-field-into-pluginfield/)
 * Hi All,
 * i have a ERP Integration which forward the “DHL” Tracking number into a “Custom
   field” from my order. After that the ERP System sets the Order to complete. This
   works well.
 * My question is if it is possible to transfer the **DHL tracking code** from the
   custom field **automatically **to the necessary plugin field? And also sets the
   one carrier to “DHL Germany”.
 * The only thing that i need is to show the “tracking button” into the order list
   of the user account. I dont need any autamatic emails with the tracking code 
   etc. in this regard. Thank you
 * See also Screenshot what i mean:
    [https://ibb.co/fGhT5yf](https://ibb.co/fGhT5yf)
 * Maybe i can use something like that in the function.php?
 *     ```
       function auf_order_status_completed($order_id) {
   
           if (class_exists('WC_Shipment_Tracking')) {
   
           	if (function_exists('Advanced Shipment Tracking')) {
   
           		$tracking_number = get_post_meta($order_id, 'tracking_id', true);
           		$carrier = get_post_meta($order_id, '_tracking_provider', true);
           		/*$timestamp = get_post_meta($order_id, '_date_shipped', true);*/
   
       			Advanced Shipment Tracking($order_id, $tracking_number, $carrier, $timestamp);
   
       		}
           }
       }
   
       add_action('woocommerce_order_status_completed', 'auf_order_status_completed', 10, 1 );
       ```
   
    -  This topic was modified 4 years, 7 months ago by [alkula](https://wordpress.org/support/users/alkula/).
    -  This topic was modified 4 years, 7 months ago by [alkula](https://wordpress.org/support/users/alkula/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Zorem](https://wordpress.org/support/users/zorem/)
 * (@zorem)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/from-custom-field-into-pluginfield/#post-15183086)
 * Hi, you should ask your ERP integration team to update the tracking using the
   [shipment tracking endpoint](https://www.zorem.com/docs/ast-pro/shipment-tracking-api/)
   that AST adds to the WooCommerce API

Viewing 1 replies (of 1 total)

The topic ‘From Custom Field into PluginField’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Zorem](https://wordpress.org/support/users/zorem/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/from-custom-field-into-pluginfield/#post-15183086)
 * Status: resolved