Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: Translating Attributes and Taxonomies via the REST API

Solution: Product Categories can be read using the REST API but not updated or modified. I don't see support for Product Attributes over REST API currently.

Relevant Documentation: https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 3 voices.

Last updated by Izzi Hassan 1 year, 7 months ago.

Assigned support staff: Izzi Hassan.

Author Posts
October 30, 2019 at 4:33 pm #4857915

Gianluigi

hello
I am trying to translate product attributes and product categories using REST

But i read topics regarding this issue from several years ago and the issue has not still be solved, as for now this plugin is not complete, is this going to be fixed?

I have categories and attributes in 2 languages which i have to save using REST

How can i do this?

November 1, 2019 at 8:28 am #4868715

Izzi Hassan

Hi,

Thank you for reaching out to WPML Support.

Product Categories can be read using the REST API but not updated or modified. I don't see support for Product Attributes over REST API currently.

I can add a request for more information but at the moment I don't believe you are able to do this via REST API and WCML.

November 6, 2019 at 3:53 pm #4900031

Gianluigi

Is there any news about this issue? How come this is not implemented, translating taxonomies and terms should be a basic feature not something special.

November 7, 2019 at 8:58 am #4903707

Izzi Hassan

Hi,

I checked our internal systems and we are currently working on implementing these features. We do not have a timeframe set for this at the moment.

Translating taxonomies and terms are indeed core features and WPML does allow you to do so. However, the WooCommerce REST API integration with WPML does pose some extra challenges and we have to maintain compatibility of any feature we introduce with all the other plugins that we have certified as compatible. This is usually why some features can be challenging, or even impossible, until other plugins introduce updates.

I would recommend waiting for the next updates to WooCommerce Multilingual and checking the Changelog to see if this gets implemented in the next cycle, but if it is crucial to your project, you may need a custom workaround to achieve REST translation of categories, attributes or terms.

I'm sorry I wasn't able to provide you with a solution currently.

June 18, 2020 at 5:17 pm #6406261

giuseppeS-33

Hi, Is there any news about this issue?
Thank you

June 19, 2020 at 5:29 am #6409605

Izzi Hassan

Hi @guiseppeS-33,

Yes, we actually do have this as an ongoing development as part of our integration with WooCommerce's REST API. It did not make it into the current release cycle since there was more demand for "Country Based" features.

I do not have a timeframe for you at the moment but some of our clients have had success with using WooCommerce's API along with a workaround to add the language information to newly created product categories.

If you get the correct translated "Object IDs" using WPML and WCML hooks, you should be able to work with products, categories and other elements via WC's API. For example:
https://wpml.org/forums/topic/category-translations-using-the-rest-api/#post-4244043

I hope this is helpful. I will update this ticket when there's more news to share about the REST implementation.

Thank you!