Support » Plugin: PayPal for WooCommerce » WMPL locale notice

  • Resolved alfajors

    (@alfajors)


    Hey guys!
    I’m having this notice in the log:
    [01-Jun-2017 16:48:43 UTC] PHP Notice: Undefined index: locale in *****/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 1160

    This line and it’s predecesor have this code:

    1159 - $details = $sitepress->get_language_details(ICL_LANGUAGE_CODE);
    1160 - $locale = $details['locale'];

    In a var_dump of $locale, I get this:
    array(10) { ["code"]=> string(2) "en" ["id"]=> string(1) "1" ["english_name"]=> string(7) "English" ["native_name"]=> string(7) "English" ["major"]=> string(1) "1" ["active"]=> string(1) "1" ["default_locale"]=> string(5) "en_US" ["encode_url"]=> string(1) "0" ["tag"]=> string(2) "en" ["display_name"]=> string(7) "English" }

    TL;DR

    • Apparently the index is ‘default_locale’ and not ‘locale’.
    • I have WPML Multilingual version 3.7.1 (along with a few other WMPL plugins).
    • I’ve changed the code and the notice disappears.
    • It’s just a notice and, apparently, isn’t interfering with anything, but still I think it’s worth checking it out.

    Will be this fixed in any coming version? I have edited it myself, but obviously I’m not comfortable with this solution.

    Thanks!

    • This topic was modified 3 years, 4 months ago by alfajors.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Oliver

    (@angelleyesupport)

    Hi @alfajors,

    We believe we have this resolved in our release branch on GitHub, and it will be fixed in the 1.4.5 update coming soon. If you would like to grab the updated copy of the plugin you can download it here: Release Branch. You’ll just need to extract the files, and then upload them to your server so they overwrite the existing plugin files.

    Please let me know if you have any questions about that. Thanks!

    Plugin Contributor Oliver

    (@angelleyesupport)

    I have not heard back from you on this, so I’m going to go ahead and close this thread, but please let me know if you have more questions or concerns.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WMPL locale notice’ is closed to new replies.