• Resolved alkula

    (@alkula)


    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

    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 2 years, 11 months ago by alkula.
    • This topic was modified 2 years, 11 months ago by alkula.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘From Custom Field into PluginField’ is closed to new replies.