Pular para o conteúdo Pular para a barra lateral

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using AffiliateWP with the AffiliateWP Portal addon and WPML, the Affiliate Portal page settings (Affiliate Area, Login, and Registration pages) reset when switching between languages in the WordPress admin. Assigning pages in the secondary language causes the settings for the default language to be cleared, and vice versa.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Go to AffiliateWP > Settings > Affiliates in the default language and resave all your page settings.
  • Then add the following code to your theme’s functions.php file.
    add_filter( 'affwp_affiliate_area_page_id', function( $affiliate_page_id ) {
        if ( class_exists('Sitepress') ) {
            $affiliate_page_id = apply_filters( 'wpml_object_id', $affiliate_page_id, 'page', true );
        }
        return $affiliate_page_id;
    }, 10, 1 );
            

Deixe uma resposta

Por favor, mantenha-se no tópico e seja respeitoso com os outros. Se precisar de ajuda com questões não relacionadas a este post, use nosso Fórum de Suporte para iniciar um chat ou enviar um ticket.

Você pode usar estas tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>