تخطي التنقل

Waiting for author

Topic Tags: Bug

Overview of the issue

When using the Give – Donation Plugin with WPML, the Donor Dashboard iframe is always displayed on the default language.

Workaround

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

  • Open …/wp-content/plugins/give/src/DonorDashboards/App.php file.
  • Look for line 36.
  • Replace:
            $url = get_site_url() . '/?give-embed=donor-dashboard';
    
  • For:
            $wpml_default_lang = apply_filters('wpml_default_language', NULL);
            $wpml_current_lang = apply_filters('wpml_current_language', NULL);
    
            if (apply_filters('wpml_setting', false, 'language_negotiation_type') == 1) {
                $url = get_home_url() . '/?give-embed=donor-dashboard';
            } elseif (apply_filters('wpml_setting', false, 'language_negotiation_type') == 3 and ($wpml_default_lang != $wpml_current_lang)) {
                $url = get_home_url() . '&give-embed=donor-dashboard';
            } else {
                $url = get_site_url() . '/?give-embed=donor-dashboard';
            }
    

اترك ردًا

الرجاء البقاء في الموضوع واحترام الآخرين. إذا كنت بحاجة إلى مساعدة في مشكلات غير متعلقة بهذا المنشور، استخدم منتدى الدعم الخاص بنا لبدء محادثة أو إرسال تذكرة.

يمكنك استخدام هذه العلامات:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>