mobi001
mobi001

Reputation: 537

A best way to connect woocommerce orders from different site

I am working to build a solution for wooCommerce , in which i am connecting local wooCommerce POS with the online live website.

Basically by this i am achieving that when internet is not working, cashiers can use POS and when internet connected again it sends the order via ajax.

I have successfully build the logic and code, the problem is wooCommerce orders create barcode with order_id, and there are several functions of woocommerce based on order_id, so when i send local POS order to live site, there might be a same order_id so i can not store it with the same order_id, then in this case i can not replace the order_id aswell as POS local order barcode must needs to be matched with the live website, so if any user claim in headoffice or some where else via receipt the same order should open.

i was thinking to add one more column in live datebase with the name POS_order_id where i insert POS order ids, but i am just curious that how many places it would effect.

I would appreciate your suggestions for the best way to integrate it.

Upvotes: 1

Views: 506

Answers (1)

Lille Hummer
Lille Hummer

Reputation: 629

You could use the WooCommerce REST API to create new orders and use the ID that is returned when creating a new order in your local POS instead.

Upvotes: 1

Related Questions