Hi,
I'm new here so if this wasn't the right place to post this question, please let me know.
I'm facing one little problem and don't know how or where to solve it (part of the code).
I've written a plugin to extend the order submission, after the creation of the order i do some processing. And for this I have one user to test the order creation with the 'address_user_id' nº 3 (see attachment).
And my assumption at first was that one user can have many addresses but theres one that is the default one, and i was assuming that only one published address can be 'default'.
In one test i made, i had to change one field in the billing address of the user, and hikashop added a new record.
But i got to the situation on the picture i sent you, where i have one address that was added by hikashop when i updated it, but it didn't updated the 'default' field to 1 (like i thought it would). So i get one unpublished address that is the default one, and the last address record not default. And my code expects that the default one must be published..
So, can you point me to a solution to this problem?
I hope i was clear on the explanation.
Thank you,
Pedro Carvalho