• Hi, we use the free version (3.2.7) and getting this in our error logs daily:

    WooCommerce-Extended-Coupon-Features-2021-07-29-a6656a853f357332e82e9b788720eab9.log

    ERROR wp_footer WJECF_Controller::get_session Trying to access WC()->session while it was not yet initialized.

    Also, possibly related, we’re noticing that customers using coupons on their orders are having their user roles unset so from being a ‘Customer’ they are being set to:

    subscriber
    no role for this site

    and then show in a ‘no role’ column in the Users section. We have to manually go in and set them back.

    This has only started happening recently. We’re on version 5.2.2 of Woocommerce.

    Thanks

    Dan

    • This topic was modified 3 years, 7 months ago by dankuwp.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dankuwp

    (@dankuwp)

    Also, looking at the Apache error logs getting this:

    mod_fcgid: stderr: id was called incorrectly. Coupon properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_update_order_review'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::update_order_review, WC_Cart->calculate_totals, do_action('woocommerce_after_calculate_totals'), WP_Hook->do_action, WP_Hook->apply_filters, WJECF_Autocoupon->maybe_update_matched_autocoupons, WJECF_Autocoupon->update_matched_autocoupons, WJECF_Autocoupon->get_valid_auto_coupons, WJECF_Autocoupon->get_all_auto_coupons, WC_Coupon->__construct, WC_Coupon->read_object_from_database, WC_Data_Store->read, WC_Coupon_Data_Store_CPT->read, do_action('woocommerce_coupon_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Restrict_Coupons->woocommerce_coupon_loaded, WC_Legacy_Coupon->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: https://www.mydomain.com/checkout/

    I can now make it happen if I make a test order, it is unsetting the role at the point the user clicks the button to move onto the payment portal e.g. Paypal etc

    Plugin Author Soft79

    (@josk79)

    Are you using a very old plugin ‘WooCommerce-Role-Based-Coupons’ by any chance? I suspect this is causing the issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ERROR wp_footer WJECF_Controller::get_session Trying to access WC()->session’ is closed to new replies.