Okay
  Public Ticket #3737282
Disable plugin for B2B user
Closed

Comments

  •  1
    Kate started the conversation

    Hi

    I'm considering your plugin to convert my B2C shop to a hybrid B2B/ B2C.  It looks like it could solve a lot of my problems!

    Is it possible to disable certain plugins for B2B customers?  Specifically, I have WooCommerce Estimated Shipping Date Per Product (to display estimated delivery date per product) and I would like to make that invisible to B2B customers.

    Thank you,

    Kate

  •  2,212
    WebWizards replied

    Hi Kate,

    Thank you for getting in touch with us,

     

    I don't believe there is a way to actually disable plugins for specific users or programmatically unfortunately.

    However, based on what you described, I think we may be able to just hide the specific areas which display that delivery date. B2BKing does add some special B2B / B2C classes and we can use them to apply CSS for a specific users group ( https://woocommerce-b2b-plugin.com/docs/shortcode-to-restrict-content-to-b2b-b2c-user-groups-specific-users/#2-toc-title ). We can use this to make design / styling changes for B2B users only (which includes hiding various elements).

     

    I looked over your site, e.g. at the page here https://katewoodjewellery.com/product/trio-blue-sapphire-beaded-necklace/

    I see there's an area that says "Dispatches by 09 October 2024".

    We can hide that for B2B users, by adding this CSS to the site:

    .b2bking_b2b_user .rp_estimated_date, .b2bking_b2b_user .rp_combine_estimated_date {
        display:none !important;
    }

    I believe the above will also hide it on the cart page. Not sure if there's any other area which shows that.

     

    Kind regards,

    Stefan

  •  1
    Kate replied

    Thanks for your detailed reply, that sounds like a good workaround.

  •  1
    Kate replied

    The 'dispatch by' message also appears on the email confirmation.  Would the CSS remove the message from the emails as well?  Or can I configure separate B2B emails?

  •  2,212
    WebWizards replied

    Hi again,

    In the email confirmation, CSS would not work, as that only works on pages of the site itself.

    In that case, it is generally possible to modify emails to send different content to B2B / B2C users. We would do that by editing the email's .php template. It can depend a bit on how each email works, depending on the plugin that adds it.

    If you'd like, we can look into that directly on your site and try to set it up for you, as part of our support service. We would need a backend access to the site, or a staging clone site we can work on.

     

    Kind regards,

    Stefan