method id the same for each rule – woocommerce API output
-
Hi. My problem is hard to describe but i will attempt to word it as best as possible. ??
I have my shop hooked up to an external order management system called linnworks and I can tell linnworks to print the shipping labels for my orders if i map the shipping method used to the shipping carriers that i use in linnworks.
This works fine when using the built in shipping zones / methods in woocommerce 2.6 but when i use your plugin it doesn’t separate out the method ID that the woocommerce API sends over to the order management system.
E.g:
in the default shipping zone setup in woocommerce 2.6. If i add a flat rate more than once to a shipping zone the api will give each flat rate that has been added a unique ID and append it onto the end of the methodID. So when I receive an order in the external order management system it will look something like this:In that picture you can see that it adds an id to the end of the method id.
But with your plugin when i create a number of rules by using the “add free shipping method” button they all end up with the same methodID so i can’t distinguish between them in the external order management system.
The reason i need to distinguish between them is because i need a rule to say free second class delivery on orders over £40 but then another rule for free next day delivery for orders over £100 and these would end up linking through to different mail couriers in the external order management system.
The external order management system needs to have individual method IDs on the orders to allocate the type of shipping labels to print for the order.
Is there any way to achieve this with your plugin?
example json that is produced when order goes through that is over £40 using your plugin
“shipping_lines”: [
{
“id”:59,
“method_id”:”advanced_free_shipping”,
“method_title”:”Free Standard Delivery“,
“total”:”0.00″
}
]example json that is produced when order goes through that is over £100 using your plugin
“shipping_lines”: [
{
“id”: 89,
“method_id”: “advanced_free_shipping”,
“method_title”: “Free Next Day Delivery“,
“total”: “0.00”
}
]The method IDs are the same for both
- The topic ‘method id the same for each rule – woocommerce API output’ is closed to new replies.