Skip Navigation

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
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

Tagged: 

This topic contains 5 replies, has 1 voice.

Last updated by Itamar 3 days, 2 hours ago.

Assisted by: Itamar.

Author Posts
June 17, 2025 at 1:38 am #17140470

kevinR-12

Background of the issue:
I am trying to use the AffiliateWP 'Affiliate Portal' with WPML on a bilingual site where English is the default language and German is the secondary language. In the backend under AffiliateWP > Settings > Affiliates, there are dropdowns to assign the Affiliate Account, Login, and Registration pages. When I’m in the English backend (&lang=en), I can assign the correct pages, and the portal shows fine on /affiliate-area/. However, when switching to the German backend (&lang=de), those dropdowns show 'None' as selected. If I assign the correct translated pages for DE (/de/partner-bereich/ etc.) and save, the English settings are cleared. This issue can be seen on the following pages: EN: hidden link DE: hidden link.

Symptoms:
Only the language where the settings are saved (EN or DE) displays the Portal layout. The other language reverts to the default Affiliate Area layout and the page dropdowns are cleared.

Questions:
How can I ensure that the Affiliate Portal layout is displayed in both languages using the translated Affiliate Area pages in WPML?
Why do the page dropdowns show 'None' when switching to the German backend?

June 19, 2025 at 3:42 pm #17151541

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

Can you please check if this errata helps?

June 20, 2025 at 10:27 am #17153798

kevinR-12

Hi,

Thanks for your reply and for sharing the errata.

I did review the workaround you suggested, but it appears to apply only to the **classic Affiliate Area**, which uses the `[affiliate_area]` shortcode and standard WordPress page templates. That snippet filters `affwp_affiliate_area_page_id`, which the **Affiliate Portal Addon does not use**.

The Affiliate Portal is a **JavaScript-based, full-screen experience** that loads via its own scripts (`core.js`, `sdk.js`, etc.) and uses the REST API under `/wp-json/affwp/v2/portal/...`.

The issue is that under *AffiliateWP > Settings > Affiliates*, I can only assign a **single page globally**. If I assign the English page, the portal works at `/affiliate-area/`. If I then assign the German translated page (`/de/partner-bereich/`), the previous assignment is overwritten, and the portal only works in German.

So the core problem is: **AffiliateWP does not store page assignments in a language-aware way**, and the portal does not respect WPML translations of that assigned page.

Please escalate this to a developer familiar with WPML language mapping and how filters like `affwp_affiliate_area_page_id` relate (or don’t relate) to the Portal Addon. This needs a deeper compatibility layer – one that can dynamically assign the correct portal page per language.

Thanks again,
Kevin

June 23, 2025 at 7:41 pm #17162375

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Kevin.

I'll continue to help you with this issue.

Please note what we state on the plugins page here:
https://wpml.org/plugin/affiliatewp/

AffiliateWP is partially compatible with WPML and we are currently working with their team on finalizing the integration. Please see the documentation for more details.

Further information can be found on their website here: hidden link
For the mentioned Custom Link Generator issue, we have a workaround here.
https://wpml.org/errata/affiliatewp-custom-link-generator-only-works-in-default-language/

If none of the above helps you to solve the problem, then we need to replicate this issue on a fresh WordPress installation. Then I'll be able to escalate it to our compatibility team. To achieve this, I created a test website with a clean WordPress installation. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

Could you please install the AffiliateWP plugin and see if the issue is replicable on a clean WordPress installation?

I already configured WPML to have English as the default language and German as the second language.

Please also make sure that you are installing the latest version of the plugin.

When everything is finished and you can replicate the problem, please let us know.

Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.

Regards,
Itamar.

June 24, 2025 at 12:32 am #17162671

kevinR-12

Dear Itamar,

thanks a lot for the willingness to help provide better compatibility with AffiliateWP and for providing the sandbox.

I already configured everything and recorded a screencast to show you how you can reproduce the issue: hidden link

Please let me know if you have any further questions.

Warm regards,

Kevin

June 24, 2025 at 11:01 am #17164388

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Kevin.

Thanks a lot for replicating the problem on the sandbox site. Additionally, I greatly appreciate the video you shared, as it is beneficial for understanding the situation.

I attempted to find a workaround for this issue by translating system fields using the IDs of the selected page; however, it was unsuccessful. Therefore, I escalated this issue to our compatibility team. I'll keep you updated on any news regarding this issue.

I want to set expectations regarding this issue. We'll do our best to help you with this issue. If our compatibility team finds a workaround, we will share it with you. However, the permanent solution to this issue may not be solely within our control, and we will need the cooperation of the AffiliateWP authors to address this problem.

I appreciate your patience.
Itamar.