Restrict content wont work with WPML
-
Hi! I use Buddyboss, WPML and PMPRO, Woo subscriptions
It seems that restricted content options doesnt work as intended with WPML, my main language is english and it works fine but on the french side nothing is working and every content is shown for logged-out users.
I use PMPRO to hide
– Specific buddypress features (cant do anything)
– Pages (I can do a workaround)
It seems that the restrict content options are not applied to the french side, like the membership levels are not synced.The page I need help with: [log in to see the link]
-
For example, i can do some workaround with the restrict content shortcode on pages https://ofccommunity.com/fr/repertoire-des-evenements/
but even that, the warning message cant be translated also via *string translations*
Thanks a lot!Hi there, thank you for reaching out to the Paid Memberships Pro team.
Paid Memberships Pro isn’t fully WPML compatible and because warning messages and other strings may be returned from the database or an API response, those won’t translate out of the box – further development is required to integrate WPML into the plugin to make it work with those dynamic strings.
After switching to the French site and editing a page, are the same membership levels available in the Require Membership metabox?
Kind Regards,
Jarryd
Support Manager at Paid Memberships ProHey Jarryd!
Hope you are well, thank your for your quick response, this is gladly appreciated! Love the plugin by the way!
Yeah, i just saw that you were incompatitble with WPML after finishing my whole setup, but i think we might be able to work with it still. (Hope so!)
To Answer your question, yes the meta box is still avalaible on the FRENCH side with the same memberships levels but they are leave unchecked, the problem is that since they are not sync. I dont need to translate the membership levels so their ID in the database should the same even on the FRENCH side?
When i checked again the membership levels in the meta box and save the page, now it works perfectly on both side in ENGLISH and FRENCH and i can live with that, but my configuration goes further and does need a way to sync the memberships levels.
When a user register on the website, they buy a wocommerce subscription product, this product is assign to a memberhsip level of PMPRO, the membership level then assign the good member/profile type in Buddyboss, the member/profile type then assign the good wordpress role.
PMPRO also use your Buddypress integration to restrict some Buddyboss features, again everything works on ENGLISH but not on FRENCH.
Since i do not need to translate PMPRO, can we at least make it work on both side with the membership levels and their restricted content features?
Thanks a lot!Sorry just want to reiterate with correction my second paragraph, i wrote too fast :
To Answer your question, yes the meta box is still avalaible on the FRENCH side with the same memberships levels but they are leave unchecked, i think the problem is that they are not sync.
I dont need to translate the membership levels, so their ID in the database should be the same even on the FRENCH side, am i right so it should work still?Thank you so much for your kind words @antsthereal321 , I’m so glad to hear you’re enjoying Paid Memberships Pro.
From my understanding with plugins such as WPML, switching between two languages results in the site behaving (almost) as two different sites. By selecting levels in the Require Membership metabox in English, you would need to do the same in French so that it can still protect those pages when the language has been switched.
Please give this a try and let me know if this works for you?
Kind Regards,
Jarryd
Support Manager at Paid Memberships ProHi again!
Thanks again for your response, yeah as is said earlier it can be done like that for the pages but not for the buddypress restricted content since you can’t use the meta box.
Hi again!
I’ve talked with WPML and there are on something but i’m not sure what i should *COPY* exactly, here is the message i’ve received :I understand the issue you’re facing. It seems that the translation preference for the custom fields, containing the restriction rules might not be set to “Copy”(to sync across languages), which is why the restriction rules aren’t being applied correctly to the French language.
If you can identify the field where you’re adding the restrictions (by using the browser inspector to check the field name), try the following steps to see if they resolve the issue:
– Go to WPML > Settings and scroll down to the ‘Custom Field Translation’ section.
– Click on the “Show system fields” link.
– After the page refreshes, scroll back to the ‘Custom Field Translation’ section and enter the field name in the search box.
– If the field appears in the results, set its translation preference to “Copy.” Do this for all fields where you’re adding the rules.
– Save the changes.
– Open the page where you’ve applied the restrictions, make a small change to the title, and save it.
– Update the translation.
______________________________________________
I went into the settings that they are talking about but not sure on what to *COPY* exactlyThank you for your feedback. Our plugin hooks into the BuddyPress pages and determines access from there (based on core PMPro settings). These options won’t show up in this list because the tables PMPro use to determine if a section on a site has access or not aren’t stored in meta tables such as those shown in the screenshot above.
Kind Regards,
Jarryd
Support Manager at Paid Memberships ProBecause there have not been any recent updates to this topic, we will be changing the status to resolved. If you have any other questions regarding this issue please start a new topic for each question to ensure we can provide the best support possible.
Kind Regards,
Jarryd
Support Manager at Paid Memberships Pro
- You must be logged in to reply to this topic.