Call the order ID in shipstation export custom field
-
I am using the following code but it looks like $ order_id is unavailable.
add_filter( ‘woocommerce_shipstation_export_custom_field_2’, ‘shipstation_custom_field_2’ );
function shipstation_custom_field_2() {
$order = wc_get_order($order_id);
if($order->get_billing_country() == ‘CA’) {
return ‘_requested_ship_date’;
}
else {
if(get_field(‘sf_customization_options’, ‘option’) == ‘delivery’) {
return ‘_requested_delivery_date’;
}
else {
return ‘_requested_ship_date’;
}
}
}How can I call the order ID at this hook?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Call the order ID in shipstation export custom field’ is closed to new replies.