• Resolved ipekarik

    (@ipekarik)


    Hi! I’m having trouble with the plugin.

    While debugging why my wp-cron jobs aren’t firing I discovered this in my server log files when trying to manually trigger wp-cron.php:

    PHP Fatal error: Call to a member function get() on a non-object in …/wp-content/plugins/woocommerce-product-price-based-on-countries/includes/class-wcpbc-customer.php on line 33

    This is line 33:

    $this->_data = WC()->session->get( 'wcpbc_customer' );

    When I turn off your plugin, all my cron jobs start working again. So it seems this error on line 33 breaks the execution of cron jobs for the entire site, which is, as you might gather, quite serious.

    Could you clarify what might be going on?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi, thanks for your feedback.
    To solve this bug replace in “includes/wcpbc-functions.php” the line 135 for this:

    return ! is_bot() && file_exists( WCPBC_GEOIP_DB ) && ( ! is_admin() || ( is_admin() && $is_ajax ) ) && ! defined( 'DOING_CRON' );

    Thread Starter ipekarik

    (@ipekarik)

    Hi, Oscar…

    This seems to have solved the problem, thanks! After updating the file and refreshing the browser window, all cron jobs fired as expected.

    Will this be included in subsequent versions of the plugin, or do I need to remember to edit this file after each update?

    Cheers,
    Ivan

    Plugin Author Oscar Gare

    (@oscargare)

    Hi! version 1.2.5 include the changes that solved this bug.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP fatal error when calling session variable wcpbc_customer’ is closed to new replies.