Relative Content

Tag Archive for phpwordpresswoocommercewordpress-rest-apiwoocommerce-rest-api

Change Woocommerce Order Number when Order is Imported via API v3

I am currently importing orders from a marketplace to Woocommerce using the Worpress API. The Marketplace Order ID is added in the Customer Note Field in the Woocommerce order upon import. The Woocommmerce Order number is auto assigned from Woocommerce. I would like to use a Code Snippet to change the Woocommerce order number to the marketplace order ID stored in the Wocommerce Order´s customer Note field when the order is imported to Woocommerce. After reviewing the Wordpress Order API Docu, I am still not sure if I need to update the number or order_key to achieve this. Highlighted in yellow is the number I am looking to replace: