hi
please, use field “Shipping method title” (>Setup fields>Cart).
+ all fields “USER_xxx” are empty for guests .
thanks, Alex
Thanks for the quick reply, Alex.
However, since posting my question, I’ve now come to understand that what it needs is actually the service code for the chosen delivery method.
So, I think I need to be a bit more clever about this.
Delivery method title may be ‘Royal Mail 24hr’ but the service code needed for the export into Royal Mail’s software would be ‘TPN24’ so, I need to figure out how to get that into the data, so the plugin can export it.
Appreciate the tip for the shipping method titles, tho.
Del.
hi Del
so you should just rename exported text ?
please, visit page https://algolplus.com/plugins/code-samples/ and try code “remap shipping method titles”
thanks, Alex
Ah, I see.
So, the following would populate the shipping method column with entries… ’32’ and ‘TPN24’ in the example below?
// remap shipping method titles
add_filter('woe_get_order_value_shipping_method_title', function ($value, $order, $fieldname) {
if($value == 'Flat rate') // copy these 2 lines for other mappings
$value = 'DPD Next Day';
return $value = '32';
$value = 'Royal Mail 24 (Tracked. Deliveries Mon - Sat)';
return $value = 'TPN24;
}, 10, 3);
Thanks,
Del.
adjusted code
// remap shipping method titles
add_filter('woe_get_order_value_shipping_method_title', function ($value, $order, $fieldname) {
if($value == 'DPD Next Day') // copy these 2 lines for other mappings
$value = '32';
if($value == 'Royal Mail 24 (Tracked. Deliveries Mon - Sat)') // copy these 2 lines for other mappings
$value = 'TPN24';
return $value;
}, 10, 3);
Aha… great. I’ll give that a try and let you know if it works.
Thanks Alex.
Del.
Initial test seems to have worked.
Will see what happens tomorrow when we’ll have orders with multiple different delivery options, and see if it correctly puts the service codes in for the method title.
Looks good so far though.
Thank you Alex!
Del.