Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 27 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 2 months ago.

Assisted by: Mateus Getulio.

Author Posts
April 19, 2024 at 7:51 pm #15545040

ericH-23

Hi,
In the sandbox the member with the free membership bought a premium membership. He gots two! The DE and the EN membership. That is false, he don't need two but only one, which shows the texts of the membership in the current language.

At the moment the Membership Plans are set to "translation", that was the standard.

I don't change this now, because I would like to show you the current situation.

I know, if I change the Membership Plans to "non translation", the names cannot be translated and are shown only in the standard language, so here in my eyes following could be done:

I have the idea, that a fix like in https://wpml.org/forums/topic/buddyboss-profile-types-cannot-be-translated-with-wpml/ could be added so that the Membership Plans name and description can be translated. But please take a look and decide the next steps.

Together with a further fix regarding the restrictions the Woocommerce Membership plugin could be working. At the moment - unfortunately - this is not the case.

Thanks, kind regards

membership bought, every language one membership.png
April 22, 2024 at 1:06 pm #15550602

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hello and thank you for your patience.

I have escalated this to our Compatibility team. I will be working with the developers to find the cause and resolution and will keep you updated here. Please keep in mind that a solution may depend on the plugin author's response. Thanks for your patience while we continue to troubleshoot.

We'll keep you posted with our progress while investigating it.

Thank you,
Mateus

April 29, 2024 at 11:22 am #15576811

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hello there,

Thank you for your patience while we worked on this.

We checked it and this issue has been reported previously. We have an open ticket within our developers to analyze and eventually change this behavior.

Upon further review, we were able to find a workaround that might help mitigate the issue in the meantime.

This could be done with the following steps:

- Open the app/public/wp-content/plugins/woocommerce-memberships/templates/myaccount/my-memberships.php file
- Replace the following snippet (around line 76):

<?php foreach ( $customer_memberships as $customer_membership ) : ?>

	<?php if ( ! $customer_membership->get_plan() ) { continue; } ?>

- With:

<?php foreach ( $customer_memberships as $customer_membership ) : ?>

	<?php if ( ! $customer_membership->get_plan() ) { continue; } ?>

	<?php 
		// WPML Workaround for compsupp-7163
		if ( class_exists('Sitepress') ) {
			$wpml_current_lang = apply_filters( 'wpml_current_language', NULL );
			$membership_wpml_language_details = apply_filters( 'wpml_post_language_details', NULL, $customer_membership->plan_id ) ;

			if ( $wpml_current_lang != $membership_wpml_language_details['language_code'] ) {
				continue;
			}
		} 
	?>

But please note that this can also have side effects. For example, if you cancel a membership in the original language, you will not be automatically cancelling the memberships in secondary languages, and they will also not be available in that screen (unless you switch the language).

I tested it in the sandbox I provided you with and it seems to be working properly in there.

Can you please make a full backup of the live site and test the workaround above?

Thank you, please let us know.
Mateus

April 29, 2024 at 1:02 pm #15577300

ericH-23

Hi,
Thank you very much! But I have a question:

You wrote: "For example, if you cancel a membership in the original language, you will not be automatically cancelling the memberships in secondary languages, and they will also not be available in that screen (unless you switch the language)."

In my eyes the error begins with: a user buys a membership and gets not the one he bought but this membership in every language. So he have 4 memberships if you have 4 languages active. Thats makes absolutely no sense.

The user should buy a membership and that's it. The normal behavior as without WPML, but then with WPML only the name and the slug should be translatable. And the given restriction rights with this membership must be valid in every language.

Is it possible, that this can be achieved please?

Thanks, kind regards

April 29, 2024 at 5:22 pm #15578415

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hello there,

This is the behavior of the workaround above.

For a definitive solution I'm afraid we need to wait on our developers to analyze this request and eventually implement the needed changes.

I'll keep you posted.

Mateus

April 29, 2024 at 8:15 pm #15578674

ericH-23

Hi,

Yes, I thank you for the workaround for the moment!

Hope that at the end only the translation of name and slug is possible, no futher memberships are created with a translation and that the restriction rights work in every language.

All the best and thank you for your fantastic help!

May 17, 2024 at 10:58 am #15638955

ericH-23

Hi,

Let me add the last answer of my conversation with Skyverge hereto:

"..... However, if the restrictions are not working in this case, then it seems there's an incompatibility between the two plugins, and we would need to wait for the WPML developers to see if they can figure this out since the issue has been escalated.

To my knowledge, they still haven't reached out to our team, so if they'd like to work together with our developers, they should reach out to us at support@skyverge.com."

So Skyverge is aware already of this topic.

Would be great to have here a solution soon.

As I said: the easiest and best way would be, to have the restrictions problem fixed and don't create extra memberships for every language but offer only a translation of the name.

Thanks again, kind regards

June 6, 2024 at 12:03 pm #15710914

ericH-23

Hi,
I am waiting now for more than 2 months and would like to ask for a result here. I cannot use Skyverge Woo Memberships with WPML and that is a main problem. Please improve this here as soon as you can. Thanks you. Kind regards

June 6, 2024 at 4:20 pm #15712639

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hi Eric,

Thank you for your patience while we continue to investigate this issue.

I wanted to provide an update on the current status. Our developers are still working on a permanent fix for the issue with WooCommerce Memberships and WPML. I'm afraid we don't have a precisa ETA for when this fix will be available.

In the meantime, while we understand it is not perfect, the workaround provided earlier remains the only mitigation we have. This workaround can help ensure that the product restrictions work as expected across different languages, although it does require manual adjustments and has some limitations.

We appreciate your understanding and patience. If there are any further updates or if our developers come up with a better solution, we will notify you immediately.

Kind regards,
Mateus

June 6, 2024 at 6:27 pm #15713073

ericH-23

Hi Mateus,
Thanks for your answer! I understand and I am waiting further. Hope it can be published in the next 2 months. The workaround is not the right workflow for me but thanks for this solution anyway.
Kind regards
Eric

July 7, 2024 at 10:06 am #15906932

ericH-23

Hi,
I am waiting since April here on a fix. Thats too long, really! And this with a "compatible" plugin, that is not good.

Can you suggest to switch to another membership/subscription system that works well with WPML? Paid Membership Pro is not possible because they have too less function in VAT calculation for EU. What about YITH Membership/Subscriptions? Or do you have a further idea, what is working together with Woocommerce?

The best would be, to have here the Skyverge/Woo membership/subscription working but how long shall I wait further on it????
Thanks, kind regards
Eric

July 12, 2024 at 3:20 pm #15943221

ericH-23

Hi,
PLEASE, I need an answer here. Thanks, kind regards
Eric

July 15, 2024 at 12:39 pm #15954410

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hi Eric,

I apologize for the prolonged delay and understand your frustration with the current situation.

I have requested further feedback from our developers, but unfortunately, a definitive fix for the WooCommerce Memberships and WPML compatibility issue is still in the works, and we do not have an ETA at this time.

In the meantime, I have conducted a search to find alternative membership/subscription systems that are known to work well with WPML. Here are some options you might consider:

https://wpml.org/plugin/buddypress/
https://wpml.org/plugin/buddyboss-platform/
https://wpml.org/plugin/wp-user-manager/
https://wpml.org/plugin/membership-for-woocommerce/

I hope one of these alternatives can meet your needs while we continue to work on a permanent solution for the WooCommerce Memberships issue. If you have any other questions or need further assistance, please let me know.

Thank you for your understanding and patience.

Kind regards,
Mateus