// 1. TRIGGER: On Status Change
add_action('woocommerce_order_status_processing', 'throttlerz_run_automation', 10, 1);
// 2. TRIGGER: On Manual Update (For testing existing orders)
add_action('woocommerce_process_shop_order_meta', 'throttlerz_manual_test_trigger', 10, 1);
function throttlerz_manual_test_trigger($order_id) {
$order = wc_get_order($order_id);
if ($order->get_status() === 'processing') {
throttlerz_run_automation($order_id);
}
}
function throttlerz_run_automation($order_id) {
$order = wc_get_order($order_id);
// Get Product Details
$items = $order->get_items();
$p_name = 'Items'; $p_qty = 0;
foreach ($items as $item) {
$p_name = $item->get_name();
$p_qty += $item->get_quantity();
break; // Just get the first item
}
$city = $order->get_billing_city() ? $order->get_billing_city() : 'Address';
throttlerz_do_send(
$order->get_billing_phone(),
get_option('cm_temp_final'),
$order->get_billing_first_name(), // {{1}}
$p_name, // {{2}}
(string)$p_qty, // {{3}}
(string)$order->get_order_number(),// {{4}}
$city, // {{5}}
'4-5 Working Days', // {{6}}
$p_name, // {{7}}
get_bloginfo('name') // {{8}}
);
}
// ... Keep the throttlerz_do_send function and UI code from version 6.2 exactly as is ...
SUZUKI – Performance Bikes
Showing 1–16 of 101 resultsSorted by latest
Sort:
Show:
₹2,250.01 In Stock
| Weight |
0.0 kg |
| BMW |
BMW S1000R, G310GS, G310R
|
| TVS |
APACHE RR 310
|
| Royal Enfield |
CLASSIC 350, GUERRILLA 450, HIMALAYAN 450, HUNTER 350, INTERCEPTOR 650, METEOR 350, REBORN, THUNDERBIRD 350
|
| SUZUKI |
V STORM 250
|
| HONDA |
CBR 250R
|
| TRIUMPH |
SCRAM 400, SPEED 400X
|
| JAWA |
JAWA 42
|
| YEZDI |
ADVENTURE, ROADSTAR
|
| BAJAJ |
DOMINAR 400, PULSAR 220, PULSAR NS200, PULSAR RS 200
|
| KTM |
ADV 250, ADV 390, DUKE 125, DUKE 200, DUKE 250, DUKE 390, RC 125, RC 200, RC390
|
₹1,400.00 In Stock
| Weight |
0.0 kg |
| BAJAJ |
DOMINAR 400, PULSAR 220, PULSAR NS200, PULSAR RS 200
|
| KTM |
ADV 250, ADV 390, DUKE 125, DUKE 200, DUKE 250, DUKE 390, RC 125, RC 200, RC390
|
| ATHER |
ATHER 450X
|
| YEZDI |
ADVENTURE, ROADSTAR
|
| JAWA |
JAWA 42
|
| TRIUMPH |
SCRAM 400, SPEED 400X
|
| HONDA |
CBR 250R
|
| SUZUKI |
GIXXER, V STORM 250
|
| TVS |
APACHE RR 310
|
| BMW |
BMW S1000R, G310GS, G310R
|
| Royal Enfield |
CLASSIC 350, GUERRILLA 450, HIMALAYAN 450, HUNTER 350, INTERCEPTOR 650, METEOR 350, REBORN, THUNDERBIRD 350
|