Title: PHP fatal error when calling session variable wcpbc_customer
Last modified: August 24, 2016

---

# PHP fatal error when calling session variable wcpbc_customer

 *  Resolved [ipekarik](https://wordpress.org/support/users/ipekarik/)
 * (@ipekarik)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-when-calling-session-variable-wcpbc_customer/)
 * 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](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-when-calling-session-variable-wcpbc_customer/#post-5974288)
 * 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](https://wordpress.org/support/users/ipekarik/)
 * (@ipekarik)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-when-calling-session-variable-wcpbc_customer/#post-5974359)
 * 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](https://wordpress.org/support/users/oscargare/)
 * (@oscargare)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-when-calling-session-variable-wcpbc_customer/#post-5974527)
 * 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.

 * ![](https://ps.w.org/woocommerce-product-price-based-on-countries/assets/icon-
   256x256.png?rev=1976858)
 * [Price Based on Country for WooCommerce](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-product-price-based-on-countries/reviews/)

## Tags

 * [fatal](https://wordpress.org/support/topic-tag/fatal/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 3 replies
 * 2 participants
 * Last reply from: [Oscar Gare](https://wordpress.org/support/users/oscargare/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-when-calling-session-variable-wcpbc_customer/#post-5974527)
 * Status: resolved