Skip Navigation

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

Problem:
The client needed to synchronize the status of products, such as draft status, across multiple websites. The provided plugin only worked for products whose status changed after the plugin's installation, not for those changed before.

Solution:
1. We recommended adding the following code to the

wp-config.php

file, above the line

/* That's all, stop editing! Happy publishing. */

, to synchronize the status of the "product" post type:

define( 'WPML_SYNCHRONIZE_POST_STATUS_POST_TYPES' , 'post,page,product');

2. We also suggested using the bulk edit feature to update the status of many products at once. It's important to note that the status sync will only occur when the original product is updated.

Please be aware that this solution might be irrelevant if it's outdated or not applicable to your specific case. If the provided solution does not resolve your issue, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please do not hesitate to open a new support ticket. You can reach our support forum here.

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 3 replies, has 2 voices.

Last updated by Long Nguyen 8 months, 1 week ago.

Assisted by: Long Nguyen.

Author Posts
April 3, 2024 at 4:32 pm #15479641

konstantinA-3

Hello, we are contacting second time in regards synchronising product status such as draft. You have suggested plugin to resolve this issue. Unfortunatelly it does not apply to products which status was changed earlier, before we installed plugin. We have 4 websites and have been changing status for many, how would you suggest to fix it now, youe plugin works only for present time?

April 4, 2024 at 2:18 am #15480801

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Konstantin,

Thank you for contacting WPML support, I’m happy to help you with this issue.

The plugin hidden link
works as well on my demo site to sync product status.

You need to add the code below to the file wp-config.php, above the line /* That's all, stop editing! Happy publishing. */ to sync the status of the "product" post type.

define( 'WPML_SYNCHRONIZE_POST_STATUS_POST_TYPES' , 'post,page,product');

You can take a look by accessing the demo site with this link hidden link

Note: the status sync only works when you update the original product.

Looking forward to your reply.
Thanks

April 4, 2024 at 1:39 pm #15483651

konstantinA-3

define( 'WPML_SYNCHRONIZE_POST_STATUS_POST_TYPES' , 'post,page,product');

This only sets the post types for or which the synchronization should be active, but it doesn't address your issue with already changed products.

How would you change about 800 products previsously (before using this plugin) set to draft?

April 8, 2024 at 1:27 am #15492211

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

You can use the bulk edit to update the status of many products. And notice that, if the status of the original product doesn't change, the status of the translation product won't be changed.

Thanks.

Products ‹ Sandbox — WordPress 2024-04-08 08-24-03.png
April 11, 2024 at 5:43 am #15506896

konstantinA-3

Thank you.