Skip Navigation

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

Problem:
Customer has a membership site with WooCommerce Subscriptions, Memberships and Teams for Memberships and has started experiencing various issues related to content restriction on custom post types. These issues only occur when WPML is active. When restricting a post within a custom post type for a membership, all posts are restricted for unauthenticated users, appearing that the entire post type is restricted, not just the individual post.

Solution:
We recommend checking the errata related to this issue at https://wpml.org/errata/woocommerce-memberships-restrict-content-conditions-applies-to-all-pages-across-the-site/ and applying the workaround provided there. Also, we inform the customer that this issue will be fixed in a future version of WooCommerce Multilingual, possibly version 5.5.0, although we cannot guarantee that it will be included in this specific version. We recommend following the status of the errata for updates.

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.

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by Marcel 2 weeks ago.

Assisted by: Marcel.

Author Posts
September 20, 2023 at 7:39 am #14427107

martinH-119

This relates to issue: post-14426983

We run a membership site with WooCommerce Subscriptions, Memberships and Teams for Memberships. We have begun to experience several issues that was not there when we site was set up. They all seem to relate to WPML as they are not there when WPML is not active.

The site is set up, so that you purchase a membership for the main language and then also gain access to the English translation.
We have a staging site where you have access on the other ticket to test any solutions.

This issue arises when one post within a custom post type is restricted to them membership. When the post is added to the membership as restricted content all posts are restricted when the user is not logged in. It seems that the full CPT is restricted, not the single post. One thing to note is that in the backend the post is added twice for both the main language and English.

September 20, 2023 at 11:59 am #14429913

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello, welcome to the WPML support Forum!

This seems related to the following issue: https://wpml.org/errata/woocommerce-memberships-restrict-content-conditions-applies-to-all-pages-across-the-site/

Could you please check if the workaround from the errata also fixes the issue for you?

September 20, 2023 at 6:29 pm #14432959

martinH-119

Hi Diego,

Does this solution not mean, that we cannot update the plugin in the future without reverting the issue or having to implement it again?

Thanks

September 21, 2023 at 9:09 am #14436221

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

the linked solution is a temporary workaround. This will be fixed with a future version of WooCommerce Multilingual. As far as I see on the board, it's planned to be released with WooCommerce Multilingual 5.5.0. I can not guarantee that it will be included in this version, but I will let you know once the version is available.

You can also see the state of the erratum. If something changes, it will be updated too.

Best Regards
Marcel

February 12, 2025 at 12:12 pm #16696235

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

This issue has been resolved this week with WPML 4.7 and WooCommerce Multilingual 5.4.0.

If you have any questions, please open a new ticket, and we'll be happy to assist you there.

Best regards,
Marcel