I have a client that uses WP All Import and WPML in order to create and update their products.
They now need to create a bridge with the software that handles their stock in order to update the current products and create new ones.
There is no issue when updating a product, in English or Greek. When creating a new product though, the new product is created successfully in English, but when trying to create it's Greek translation we get an error that the sku is invalid or already exists.
The code that we run to create the translation is the following:
{"name": "Elastique pour Cheveux Black","type": "simple","regular_price": "0","sale_price": "0","description": "A handcrafted hair elastic made from durable cellulose acetate designed with the Balmain’s signature 18K gold plated B logo.
The extremely strong yet flexible material is hypoallergenic and gentle to the hair and scalp. The hair elastic is specially designed to accentuate one of the iconic Balmain hairstyles∶ the ponytail.",
"short_description": "A handcrafted hair elastic made from durable cellulose acetate designed with the Balmain’s signature 18K gold plated B logo. The extremely strong yet flexible material is hypoallergenic and gentle to the hair and scalp.
The hair elastic is specially designed to accentuate one of the iconic Balmain hairstyles∶ the ponytail.","sku": "1870687.0","lang":"el","categories": [{ "id":556}],"translation_of":24327}
When WPML manages the translation of a product, it copies some of the properties of the original product, SKU among them. As these are actually the same product, just in a different language, they will share the same SKU, inventory and price.
Please try running the same code, without the "SKU" field in the request.
Thank you for your assistance Eran, seems to be working now.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.