Product Icon

B2B for WooCommerce

WooCommerce B2B extension is a complete wholesale solution that allows you to optimize your store for both B2B and B2C customers. Featured in WooCommerce staff picks and trusted by thousands of customers. No need to set up a separate store for your B2B and wholesale customers.

Make compatible with FooSales plugin

Using B2B for WooCommerce breaks FooSales webapp login

https://web.foosales.com/connect

this login does a full user login wp_login.

This triggers the following exception in b2b/woocommerce-request-a-quote:

2022-08-17T18:42:54+00:00 CRITICAL Uncaught Error: Call to a member function get() on null in /nas/content/live/tambourdev1/wp-content/plugins/b2b/woocommerce-request-a-quote/includes/class-af-r-f-q-main.php:118
Stack trace:
#0 /nas/content/live/tambourdev1/wp-includes/class-wp-hook.php(307): AF_R_F_Q_Main->afrfq_update_quote_data_after_login(‘gestion’, Object(WP_User))
#1 /nas/content/live/tambourdev1/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /nas/content/live/tambourdev1/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /nas/content/live/tambourdev1/wp-includes/user.php(110): do_action(‘wp_login’, ‘gestion’, Object(WP_User))
#4 /nas/content/live/tambourdev1/wp-content/plugins/foosales/classes/class-foosales-rest-api.php(177): wp_signon(Array, false)
#5 /nas/content/live/tambourdev1/wp-content/plugins/foosales/classes/class-foosales-rest-api.php(241): FooSales_REST_API->fsfwc_is_authorized_rest_user(Array)
#6 /nas/content/live/tambourdev1/wp-includes/rest-api/class-wp-rest-server.php(1143): FooSales_RE dans /nas/content/live/tambourdev1/wp-content/plugins/b2b/woocommerce-request-a-quote/includes/class-af-r-f-q-main.php à la ligne 118

Easily remedied by adding a check that there’s indeed a user session:

public function afrfq_update_quote_data_after_login( $user_login, $user ) {
if(!WC()->session) { return; }

Author

rngadam

Current Status

Open

Last updated: December 18, 2022

0 comments

Log in to comment on this feature request.