Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Author RealMag777

    (@realmag777)

    Hello
    This is a ghost error and I’ve heard about it but can not catch it on my side

    Write me PM please here: https://codecanyon.net/item/woocommerce-currency-switcher/8085217/support with link to this forum and wp-admin access

    Plugin Author RealMag777

    (@realmag777)

    Hello

    I found receipt

    find code block beginning from if ($this->storage->get_val(‘woocs_first_unique_visit’) == 0) and replace it to next code: (all blocke)

    //WELCOME USER CURRENCY ACTIVATION
            if ($this->storage->get_val('woocs_first_unique_visit') == 0)
            {
                //$this->storage->set_val('woocs_first_unique_visit', 0);
                $this->is_first_unique_visit = true;
                $this->storage->set_val('woocs_current_currency', $this->get_welcome_currency());
                $file_path = ABSPATH . 'wp-content/plugins/woocommerce/includes/class-wc-geolocation.php';
                if (file_exists($file_path))
                {
                    if (!function_exists('wc_clean'))
                    {
    
                        function wc_clean($var)
                        {
                            return sanitize_text_field($var);
                        }
    
                    }
                    include_once($file_path);
                    $this->init_geo_currency();
                    runkit_function_remove('wc_clean');
                }
            }
    Plugin Author RealMag777

    (@realmag777)

    kwojniak

    (@kwojniak)

    We’re having this same issue.

    This seems like this might fix it, but shouldn’t runkit_function_remove() only be used if the function doesn’t exist? Right now it’s always used, so it will remove the function that already pre-existed.

    Plugin Author RealMag777

    (@realmag777)

    @kwojniak
    You are right, so I added flag $wc_clean_is_defined to avoid it. Use next code please:

    if ($this->storage->get_val('woocs_first_unique_visit') == 0)
            {
                //$this->storage->set_val('woocs_first_unique_visit', 0);
                $this->is_first_unique_visit = true;
                $this->storage->set_val('woocs_current_currency', $this->get_welcome_currency());
                $file_path = WP_PLUGIN_DIR . '/woocommerce/includes/class-wc-geolocation.php';
                if (file_exists($file_path))
                {
                    $wc_clean_is_defined = true;
                    if (function_exists('runkit_function_remove'))
                    {
                        if (!function_exists('wc_clean'))
                        {
    
                            $wc_clean_is_defined = false;
    
                            function wc_clean($var)
                            {
                                return sanitize_text_field($var);
                            }
    
                        }
                    }
                    //***
                    include_once($file_path);
                    $this->init_geo_currency();
                    //***
                    if (function_exists('runkit_function_remove') AND ! $wc_clean_is_defined)
                    {
                        runkit_function_remove('wc_clean');
                    }
                }
            }
    kwojniak

    (@kwojniak)

    Looks good. Thanks!

    Plugin Author RealMag777

    (@realmag777)

    Great! Welcome …

    uffesgjutformar

    (@uffesgjutformar)

    Hello!

    I get this error after update to WC 2.4.9.
    But ONLY on my iPad and mobile phone. The computer works normally.

    Since I have no idea what to do, even after reading the solution at the top, I’ve deactivated the plugin and are awaiting a fixed version.

    Thanks a lot for fixing this soon! ??

    /Uffe

    uffesgjutformar

    (@uffesgjutformar)

    This is the exact error I get on mobile devices:

    Fatal error: Class ‘WC_Logger’ not found in /home/uffe/data/www/uffesgjutformar.se/wp-content/plugins/woocommerce/includes/class-wc-geo-ip.php on line 1117

    Thanks again.

    uffesgjutformar

    (@uffesgjutformar)

    Never mind. After new update to WC 2.4.10 it works. Was a bug in WC. ??

    Plugin Author RealMag777

    (@realmag777)

    @uffesgjutformar
    Hello. Hehe, and such things happens too ??

    skaye234

    (@skaye234)

    I tried with free currency switcher plugin on my site. While I was using, there was no problem on my site. but Whenver I use the plugin, after a few hours, I could not access to my website. and displaying fatal eroor(….). I am sure this plugin caused the trouble, but I make sure this plugins need to be checked before I buy the plugin. please let me know that ASAP

    Plugin Author RealMag777

    (@realmag777)

    @skaye234
    Update to the latest woocommerce version, woo 2.4.3.9 had a bug

    brunostersa

    (@brunostersa)

    Hi guys.
    Please, I have the same problem in localhost.
    Where do i put this code? What file?

    Plugin Author RealMag777

    (@realmag777)

    @brunostersa

    Hello Bruno

    In index.php, use text text searching + I answered your PM

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Fatal error…class-wc-geolocation.php on line 105’ is closed to new replies.