add_filter('wpcargo_locate_template_result', 'dpd_override_wpcargo_result_template', 10, 2); function dpd_override_wpcargo_result_template($template, $template_name) { // Custom inline renderer for Hello Elementor without child theme add_action('wpcargo_track_result_form', 'dpd_render_custom_tracking_dashboard', 1); // Hide standard default WPCargo result output remove_action('wpcargo_track_result_form', 'wpcargo_track_result_form_callback', 10); return $template; } function dpd_render_custom_tracking_dashboard() { global $wpcargo; $shipment_id = get_the_ID(); if (!$shipment_id) return; $tracking_number = get_the_title($shipment_id); $current_status = get_post_meta($shipment_id, 'wpcargo_status', true); $updated_date = get_the_modified_date('M j, Y - h:i A', $shipment_id); // 7 Exact Workflow Steps $steps = array( 'Order Confirmed', 'Picked by Courier', 'On The Way', 'Refundable Insurance Fee (RIF) Required', 'Custom Fee', 'On Hold', 'Delivered' ); $current_index = array_search($current_status, $steps); if ($current_index === false) { $current_index = 0; } ?>
Name:
Address:
Name:
Address:
Weight: kg
Type:
Current Loc:
Est. Delivery: