Перейти к содержимому Перейти к боковой панели
Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Часовой пояс службы поддержки: Asia/Karachi (GMT+05:00)

Помечено: 

Эта тема содержит 0 ответ, имеет 1 voices.

Последнее обновление: rebeccaH-12 1 год, 2 месяца назад.

При содействии: Noman.

Автор Сообщения
1 августа, 2024 в 2:20 пп #16030261

rebeccaH-12

Background of the issue:
I'm developing a custom solution to push posts from a staging site to a production site, including their translations. I'm currently using a custom function that makes a POST request to '/wp-json/wpml/v1/translations' on the production site to link translations.

Symptoms:
I'm encountering a 404 error indicating that no route was found matching the URL and request method. The error message I'm receiving is: {"code":"rest_no_route", "message":"No route was found matching the URL and request method.", "data":{"status":404}}

Questions:
Is there a specific REST API endpoint for linking translations on a remote site?
What is the correct method and data structure for linking translations via the API?
Are there any special configurations or permissions needed to enable this functionality?
If the REST API approach is not recommended, what alternative method would you suggest for programmatically linking translations on a remote production site?
Could you please provide or direct me to any relevant documentation about using WPML's API for remote operations, specifically for linking translations?

Тема '[Закрытые] Pushing posts, including translation posts, from staging to production' закрыта для новых ответов.