Title: Plugin doesn&#8217;t check for active session
Last modified: December 17, 2020

---

# Plugin doesn’t check for active session

 *  Resolved [werfu](https://wordpress.org/support/users/werfu/)
 * (@werfu)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/plugin-doesnt-check-for-active-session/)
 * I’m getting an null error on line 318 of class-hubwoo-public.php
 * `if ( ! empty( WC()->session->get( 'mwb_guest_user_email' ) ) && empty( WC()-
   >session->get( 'hs_form_user_tracked' ) ) ) {`
 * During a REST call, using WPML, if for whatever reason the session hasn’t been
   initialized, WC()->session is null, and the get call cause an error. Please add
   a check on WC()->session before.
 * `if ( WC()->session && ! empty( WC()->session->get( 'mwb_guest_user_email' ) )&&
   empty( WC()->session->get( 'hs_form_user_tracked' ) ) ) {`

Viewing 1 replies (of 1 total)

 *  Plugin Author [MakeWebBetter](https://wordpress.org/support/users/makewebbetter/)
 * (@makewebbetter)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/plugin-doesnt-check-for-active-session/#post-13806230)
 * Hello [@werfu](https://wordpress.org/support/users/werfu/)
 * Thank you so much for your suggestion.
 * We have already added this check in the updated version of our plugin that we
   are going to release by today.

Viewing 1 replies (of 1 total)

The topic ‘Plugin doesn’t check for active session’ is closed to new replies.

 * ![](https://ps.w.org/makewebbetter-hubspot-for-woocommerce/assets/icon-128x128.
   png?rev=2294178)
 * [MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics](https://wordpress.org/plugins/makewebbetter-hubspot-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/makewebbetter-hubspot-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/makewebbetter-hubspot-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/makewebbetter-hubspot-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/makewebbetter-hubspot-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/makewebbetter-hubspot-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [MakeWebBetter](https://wordpress.org/support/users/makewebbetter/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/plugin-doesnt-check-for-active-session/#post-13806230)
 * Status: resolved