Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant