• Resolved abdnad89

    (@abdnad89)


    Hello B2BKing Support,

    I hope you’re well.

    I’m currently using the B2BKing plugin (free version) and would like to know if there’s a built-in way—either through settings —to disable or hide all shipping methods for users marked as B2B (e.g., through a B2B user role or group).

    Specifically, my goal is to:

    • Prevent B2B users from seeing or selecting any shipping method at checkout.
    • Either hide the shipping step completely or replace it with a custom message (e.g., “We will contact you regarding delivery.”)

    Could you please confirm:

    • If this is possible in the free version, or
    • Whether this can be done using the premium version’s dynamic rules

    Any recommended approach would be greatly appreciated.

    Thanks in advance for your help!

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Stefan

    (@stefanst1)

    Hi there,

    While it’s technically possible to disable shipping methods per group in B2BKing -> Groups, this would prevent orders from being placed completely, which isn’t ideal.

    Based on your goal of contacting customers later to confirm delivery, I believe the best solution may be to use B2BKing’s Invoice Payment Gateway (available in the premium version): https://woocommerce-b2b-plugin.com/docs/invoice-payment-gateway/

    This would allow you to:

    1. Let customers place orders without immediate payment
    2. Review the orders and add appropriate shipping costs
    3. Contact customers to finalize the order details

    As a practical implementation, you could:

    • Create a “free shipping” method and rename it to something like “Shipping to be calculated later”
    • This would show during checkout, making it clear to customers that shipping details will be confirmed separately
    • Use the invoice gateway to manage the complete order process

    Let me know if I can help,

    Kind regards,
    Stefan

    Thread Starter abdnad89

    (@abdnad89)

    Hello Stefan,

    Thank you very much for your response and helpful suggestions.

    We’ve decided to implement a shipping method without any calculation rules, which we’ll label something like “Shipping to be calculated later”. This method will be visible only to B2B customers, which aligns perfectly with our intention to handle shipping arrangements manually after the order is placed.
    ( we’ve also noticed that it’s technically possible to place an order without any shipping method at all.)

    We have a technical question :
    Could you please advise on how to retrieve the B2B roles’ IDs , set by B2BKing?
    We’d like to use them in a custom script to display specific notices only to logged-in users with a B2B role.

    Also, are these roles automatically recognized by other WooCommerce plugins, or would it be advisable to create aliases to ensure compatibility?

    We’re also planning to upgrade to the premium version of your plugin to take full advantage of its extended features.

    Thanks again for the excellent support and the great quality of your plugin.

    Best regards,

    Plugin Support Stefan

    (@stefanst1)

    Hi again,

    B2BKing actually uses its own internal group system rather than traditional WordPress roles. However, I can provide you with a code snippet that will help you check the user’s B2BKing group and apply specific functionality based on that:

    $user_id = get_current_user_id();
    $is_b2b = get_user_meta($user_id, 'b2bking_b2buser', true);
    if ($is_b2b === 'yes'){
        $group_id = intval(get_user_meta($user_id, 'b2bking_customergroup', true));
        $group_name = get_the_title($group_id);
    
        if (strtolower($group_name) === strtolower('Resellers')){
            // your code for users in the Resellers group here
    
        }
    
        if (strtolower($group_name) === strtolower('VIP Users')){
            // your code for users in the VIP users group here
    
        }
    }

    You can use this code as part of a custom PHP code snippet, to apply different code for different user groups.

    If you prefer to use traditional WordPress roles instead, we actually have a guide that shows how to create a WordPress role for each B2BKing group: https://woocommerce-b2b-plugin.com/docs/how-to-use-wp-roles-with-b2bking/

    Let me know if you need any clarification!

    Kind regards,
    Stefan

    Thread Starter abdnad89

    (@abdnad89)

    Thank you very much for your detailed response and the helpful code snippet .

    I have a quick follow-up question: within a specific B2BKing group (for example, “Resellers”), is it possible to differentiate between specific roles or sub-types of users and apply functionality based on those distinctions? In other words, can we target specific roles within a B2B group, and if so, how would you recommend implementing that?

    Thanks again for your support!

    Best regards,

    Plugin Support Stefan

    (@stefanst1)

    Hi again,

    Currently, B2BKing doesn’t have a built-in feature for sub-groups or roles within a specific group. The smallest organizational unit available is a group itself.

    As a workaround, you would need to create separate groups to achieve this kind of differentiation. For example, instead of having just “Resellers”, you could create groups like:

    • Resellers-Gold
    • Resellers-Silver
    • Resellers-Bronze

    Each of these groups can then have their own specific rules, pricing, and functionality applied to them.

    Kind regards,
    Stefan

    Thread Starter abdnad89

    (@abdnad89)

    Hi Stefan,

    Thank you very much for your clarification and quick response!

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Disable all shipping methods for B2B users’ is closed to new replies.