WPIntell

Source evidence

Wrong redirect

B2BKing — Ultimate WooCommerce B2B and Wholesale Plugin — Wholesale Prices, Bulk Order Form & More · support · 2026-06-01T08:45:00+00:00

mixedsentiment
mediumseverity
0.85relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 23 rows with source links

17.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
thomas83at resolved
Hello B2BKing Support, we found a compatibility issue between B2BKing and WooCommerce (latest version) when manually creating a new order in the WooCommerce admin. When opening this WooCommerce admin URL: /wp-admin/admin.php?page=wc-orders&action=new the request is incorrectly redirected to: /wp-admin/edit.php?post_type=b2bking_group We debugged the redirect using a wp_redirect backtrace. The redirect is triggered here: /wp-content/plugins/b2bking-wholesale-for-woocommerce/admin/class-b2bking-admin.php:1638 B2bkingcore_Admin->b2bking_save_groups_metaboxes() The backtrace shows that WooCommerce creates/saves the new order via HPOS, then WooCommerce creates a backup post via wp_insert_post(), and during that process the B2BKing group metabox save handler is executed. Relevant call chain: WooCommerce PageController->setup_action_new_order() WC_Order->save() OrdersTableDataStore->maybe_create_backup_post() wp_insert_post() do_action() B2bkingcore_Admin->b2bking_save_groups_metaboxes() wp_redirect() So it looks like the B2BKing group metabox save handler is running during WooCommerce order creation, although it should only run for the B2BKing group post type. As a temporary workaround, we solved the issue by blocking only this specific wrong redirect with the following snippet: add_filter('wp_redirect', function ($location, $status) { $request_uri = $_SERVER['REQUEST_URI'] ?? ''; $is_new_wc_order_screen = is_admin() && strpos($request_uri, 'admin.php?page=wc-orders') !== false && strpos($request_uri, 'action=new') !== false; $is_wrong_b2bking_redirect = strpos($location, 'edit.php?post_type=b2bking_group') !== false; if ($is_new_wc_order_screen && $is_wrong_b2bking_redirect) { return false; } return $location; }, 999999, 2); This workaround prevents the wrong redirect and allows the WooCommerce “new order” screen to load correctly. However, this is only a temporary workaround. The proper fix should be inside B2BKing: the function b2bking_save_groups_metaboxes() should return early unless the current saved post is actually a b2bking_group post type. For example, something like: if (get_post_type($post_id) !== 'b2bking_group') { return; } Please check why B2BKing performs a redirect to edit.php?post_type=b2bking_group during WooCommerce HPOS order creation and restrict this handler/redirect to the B2BKing group post type only. – All other plugins was disabled. – Default htacces – No caching enabled – Default wp theme – tested in private tab. Thank you. BR Tommy This topic was modified 1 month ago by thomas83at . Hi Tommy, Thank you for using our plugin, This issue is related to one of the restrictions in our Core vs. Pro plugin. The Core (free) plugin enforces a limit of maximum 2 B2B groups and it does not allow creating more, by redirecting during group creation. This should not be interfering with orders, so that part of it is indeed a bug – we are looking at addressing this issue shortly and thank you for reporting it. However, the problem suggests you have more than 2 groups on Core, which should not be possible. Please check: if you are also using B2BKing Pro, it’s possible you may have accidentally deactivated it. We will look at releasing an update shortly addressing the orders conflict, I will update you once that’s released, Stefan Hello, we only using B2B King free edition. Any cacne to get a quick fix? Its an absolute no go that your plugin cause a issue in one of the most important options of woocommerce: admin can not create an order when B2B King free edition is enabled. BR Tommy Hi again, We’ve released an update now, version 5.2.30, with a fix. Let me know if you have any further issues after updating,

Comments

3 shown
Stefan 2026-06-01T19:44:00+00:00

Hi Tommy, Thank you for using our plugin, This issue is related to one of the restrictions in our Core vs. Pro plugin. The Core (free) plugin enforces a limit of maximum 2 B2B groups and it does not allow creating more, by redirecting during group creation. This should not be interfering with orders, so that part of it is indeed a bug – we are looking at addressing this issue shortly and thank you for reporting it. However, the problem suggests you have more than 2 groups on Core, which should not be possible. Please check: if you are also using B2BKing Pro, it’s possible you may have accidentally deactivated it. We will look at releasing an update shortly addressing the orders conflict, I will update you once that’s released, Stefan

thomas83at 2026-06-01T20:19:00+00:00

Hello, we only using B2B King free edition. Any cacne to get a quick fix? Its an absolute no go that your plugin cause a issue in one of the most important options of woocommerce: admin can not create an order when B2B King free edition is enabled. BR Tommy

Stefan 2026-06-01T21:21:00+00:00

Hi again, We’ve released an update now, version 5.2.30, with a fix. Let me know if you have any further issues after updating,