Okay
  Public Ticket #3531422
Shipping method by role
Closed

Comments

  •  6
    Mark started the conversation

    Hi, I have a requirement where B2B customers will be offered Standard and Expedited shipping methods, while B2C and Guests will get Free Shipping and Expedited as options.  I need to exclude 'Standard' shipping method to roles B2c and Guests, how would I do this, is there s filter?

  •  2,218
    WebWizards replied

    Hi Mark,

    There is a built-in feature for this.

    You can go to B2BKing -> Groups and click on Logged Out, B2C, as well as on each B2B business group, and control which shipping or payment methods are available.

    We have more information here: https://woocommerce-b2b-plugin.com/docs/how-to-enable-disable-payment-and-shipping-methods-based-on-users-or-groups/


    Please let me know if you encounter any issues while setting that up,


    Kind regards,

    Stefan

  •  6
    Mark replied

    Yes, but since I"m using an integration to Shippo, the shipping methods for Shippo are not listed there, only Local Pickup and Free Shipping are listed, what do you suggest in this case as solution when using the Shippo api ?  sorry I failed to mention that one first post of query.

  •  2,218
    WebWizards replied

    Thank you for clarifying,

    We still have a login to your site so I looked into that directly. I think I managed to get that to work using some group specific CSS ( I added it to Appearance -> Customize -> Custom CSS ).

    I think it's working. Please check and let me know if you see any issues. If you do, it would help if you could share a screenshot so I know where to look.

  •  6
    Mark replied

    Cool, thanks for doing that.

  •  6
    Mark replied

    Do you think they would be an issue if I moved this to code snippet?

  •  2,218
  •  6
    Mark replied

    Thank you,  I have come across an issue, where for some reason shipping methods are defaulting and in a test case even though the Standard shipping method is hidden on ui, it is being used to get live rate, I don't believe this is a b2bking issue, I think it is something related Shippo plugin / Fluid checkout plugin, we are trying to investigate. I though if I share the screenshot here you might have some knowledge from seeing this before, see attached. 

    We have just noticed shipping methods beginning to default on checkout form, I think this is source of issue.

    Attached files:  2023-12-08 12_40_53-Screen Recorder.png

  •  2,218
    WebWizards replied

    Hi Mark,

    It is possible that the problem is as you mentioned, that the checkout may be defaulting to the method which the code snippet I added hides.

    I think a solution might be to try and make sure that method is never the default. I'm not entirely sure how the default method is chosen. I wonder whether this may be controllable through Shippo settings: perhaps some kind of mechanism to move methods up and down to determine which ones are the default. 


    If that's not possible, we can check to see whether we can expand that code snippet and also make it somehow check if that method is selected and change it, but it's a bit complex so it would be great if there was a simpler solution.