Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Incorrect usage of Woocommerce API for product metadata/attributes #93

Open
madmaxpt opened this issue May 22, 2023 · 0 comments
Open

Comments

@madmaxpt
Copy link

The condition to include product attributes uses the metadata flag from the database (https://github.com/OPEN-DSI/ecommerceng_woosync/blob/2022.5.3/class/data/woocommerce/eCommerceRemoteAccessWoocommerce.class.php#L2778)

When using product metadata, the resulting PUT query to Woocommerce contains a "attributes" array whose values IDs are string litterals, whereas Woocommerce expects an integer ID.

Product synchronisation fails with error message

"{'code':'rest_invalid_param','message':'Paramètre(s) non valide(s) : attributes','data':{'status':400,'params':{'attributes':'Le paramètre attributes[0][id] n’est pas de type integer.'},'details':{'attributes':{'code':'rest_invalid_type','message':'Le paramètre attributes[0][id] n’est pas de type integer.','data':{'param':'attributes[0][id]'}}}}}"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant