As discussed here C026HH75ECA/p1632316480025600 it would be great to have a way for obtaining the last origin address used for creating a Shipping Label (WCShip plugin).
Currently, the behavior is different between mobile (iOS/Android) and the web.
On the web, after having purchased a Shipping Label, the "Ship From" address will be the last used for purchasing a shipping label.
On mobile, the address that will populate the "Ship From" form will be always the address of the store, because we don't have an API for accessing that information.
I also noticed that after buying a shipping label from mobile, when I try to create a new shipping label from the web, the "Ship From" address will be the one of the last shipping label purchased (also if it happened from mobile), so I imagine that the origin address is stored somewhere in the DB.
What do we want to accomplish?
The changes I make on the "Ship From" address aren't persisting between labels. We need an API for fetching the last origin address used in a Shipping Label. Ideally, it will return the address of the store if there are no existing shipping labels.
It would be great to follow this JSON format for the address (that we already use in the app, and it's the same format currently used in Orders, ShippingLabels, etc...):
As discussed here C026HH75ECA/p1632316480025600 it would be great to have a way for obtaining the last origin address used for creating a Shipping Label (WCShip plugin).
Currently, the behavior is different between mobile (iOS/Android) and the web. On the web, after having purchased a Shipping Label, the "Ship From" address will be the last used for purchasing a shipping label. On mobile, the address that will populate the "Ship From" form will be always the address of the store, because we don't have an API for accessing that information.
I also noticed that after buying a shipping label from mobile, when I try to create a new shipping label from the web, the "Ship From" address will be the one of the last shipping label purchased (also if it happened from mobile), so I imagine that the origin address is stored somewhere in the DB.
What do we want to accomplish?
The changes I make on the "Ship From" address aren't persisting between labels. We need an API for fetching the last origin address used in a Shipping Label. Ideally, it will return the address of the store if there are no existing shipping labels.
It would be great to follow this JSON format for the address (that we already use in the app, and it's the same format currently used in Orders, ShippingLabels, etc...):