francescozig
Forum Replies Created
-
I had problem to create ticket on villatheme support
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?https://codecanyon.net/item/woocommerce-orders-tracking/26062993?ref=villatheme&irgwc=1&afsrc=1&clickid=3zAVXgSazxycWf5yXWQW7SfOUku0WSTXnSbuRE0&iradid=275988&irpid=1257925&iradtype=ONLINE_TRACKING_LINK&irmptype=mediapartner&mp_value1=&utm_campaign=af_impact_radius_1257925&utm_medium=affiliate&utm_source=impact_radius&clickthrough_id=1438683244&redirect_back=true
Is this purchase link valid for upgrading the plugin?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’);
}
$order_data = $data[‘orders’][0];
$order_id = trim($order_data[‘reference’]);
$tracking_code = trim($order_data[‘trackingNumber’]);
$courier_slug = ‘gls-it’;
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.”);
status_header(200);
die(‘OK’);
}
status_header(400); die(‘Dati insufficienti’);
}
}Forum: Plugins
In reply to: [Advanced Woo Search - Product Search for WooCommerce] Graphic templateGreat, thanks
Forum: Plugins
In reply to: [Advanced Woo Search - Product Search for WooCommerce] Graphic templateIf you look at the searches of the two sites, they are graphically different. The biz dot has the corporate colours while the it dot is the standard one. I have to make .it like .biz