I am using the free version of Orders Tracking for WooCommerce (Versione 1.2.17) and I’m trying to integrate it with an external shipping platform (Qapla) via Webhook.
The carrier we are using is GLS Italy, and the specific slug for your plugin is gls-it.
I need to programmatically insert the tracking number and carrier slug into your plugin’s ‘graphical box’ when an order is updated. Currently, I am using update_post_meta for the following keys, but the data does not appear in the order tracking box in the backend:
_vi_wot_order_item_tracking_data
_vi_wot_order_track_number
_vi_wot_order_carrier_slug
I have already tried to manually update the meta key _vi_wot_order_item_tracking_data using an array, but the tracking info doesn’t appear in the ‘Order Tracking’ box on the WooCommerce Order page.
My questions are:
What is the correct meta key or function to use in the Free version to ensure the tracking number is correctly saved and visible in your plugin’s UI?
Is there a specific action or hook I should trigger to ‘refresh’ the tracking data and send the tracking email automatically once the meta data is updated via code?
(In my next message, I will include the snippet that I use but that does not work as I want it to.)
Thank you for your support! Best regards.
The page I need help with: [log in to see the link]
add_action(‘init’, ‘ascolta_webhook_diretto_qapla’, 20); // Priorità bassa per caricare dopo i plugin function ascolta_webhook_diretto_qapla() { if (isset($_GET[‘ascolta_qapla’])) { $json = file_get_contents(‘php://input’); $data = json_decode(trim($json), true);
if (!$data || !isset($data[‘orders’][0])) { status_header(400); die(‘Errore JSON’); }
if ($order_id && $tracking_code) { $order = wc_get_order($order_id); if (!$order) { status_header(400); die(‘Ordine non trovato’); }
// 1. Prepariamo il dato per il box grafico (FORMATO ARRAY SERIALIZZATO) $tracking_array = array( array( ‘tracking_number’ => $tracking_code, ‘carrier_slug’ => $courier_slug, ‘carrier_name’ => ‘GLS IT’, ‘tracking_url’ => ”, ‘status’ => ‘1’, ‘time’ => current_time(‘mysql’) ) );
// 2. Scrittura diretta nei Meta Fields (Nessun rischio di crash) update_post_meta($order_id, ‘_vi_wot_order_item_tracking_data’, $tracking_array); update_post_meta($order_id, ‘_vi_wot_order_status’, ‘1’);
// 3. Forziamo il caricamento del numero nel campo semplice del plugin update_post_meta($order_id, ‘_vi_wot_order_track_number’, $tracking_code); update_post_meta($order_id, ‘_vi_wot_order_carrier_slug’, $courier_slug);
// 4. CAMBIO STATO E NOTA // Cambiare lo stato a ‘completed’ DOPO aver scritto il tracking è ciò che scatena le email di WooCommerce $order->update_status(‘completed’, “Tracking $tracking_code inserito correttamente.”);
// 5. Nota di conferma finale $order->add_order_note(“ZIG RECOVERY: Tracking $tracking_code salvato con successo.”);
We have a few methods that you can use to be compatible with our orders tracking plugin. However, these features are not currently available in the basic version.
If you’d like to be compatible with this version, you will need to customize it on your side. We’re afraid that we cannot provide support for this case.
Good morning, I just purchased the WooCommerce Orders Tracking – SMS – PayPal Tracking Autopilot plug-in. I am trying to use the snippet above, but the tracking code is written as a note but is not copied to the plugin selector, so the tracking is not inserted and the email does not start. Can u help with this version?
hanks for your purchase, and I’m sorry for the trouble you’re running into.
Since this is a premium plugin, could you please open a ticket on our premium support forum? That’s where we’re able to provide full support for Pro versions, including tracking and email-related issues.
Once you post there, the team will be happy to help you take a closer look.
Thank you for your understanding, and sorry for the inconvenience.