WebWizards
Forum Replies Created
-
By default we do not remove the ‘customer’ role, because normally every customer in WooCommerce (b2c or b2b customer) should also have the ‘customer’ role. So we give the user multiple roles.
If you want to remove the ‘customer’ role for B2B users, you could use this snippet:
This snippet removes the customer role, but it will work only for users who register with MANUAL approval. The snippet works during user registration.
add_action('woocommerce_created_customer', function($user_id){ $user_status = get_user_meta($user_id, 'b2bking_account_approved', true); if($user_status === 'no'){ $user_obj = new WP_User($user_id); $user_obj->remove_role('customer'); } }, 10000, 1);Hi there,
Thanks for using our plugin,
I’m afraid this is not currently possible. It is possible only to disallow the vendor group from adding new attributes (this is done in MarketKing -> Groups).
I see how this would be useful. I have noted your feedback and I believe we can add this in the next few updates,
Thank you for getting back to me,
By default B2BKing does not use WP roles like ‘customer’, ‘subscriber’, etc.
Did you already follow the guide here to make it use WP roles? https://woocommerce-b2b-plugin.com/docs/how-to-use-wp-roles-with-b2bking/
Hi there,
Are you using B2BKing’s WP Roles? Or do you have a custom role named ‘B2B’ for example?
If you have a custom role named B2B, and you want to give all b2b users that register this role, you can simply use this PHP code snippet:
add_action('woocommerce_created_customer', function($user_id){ $user_status = get_user_meta($user_id, 'b2bking_account_approved', true); if($user_status === 'no'){ $user_obj = new WP_User($user_id); $user_obj->add_role('b2b_role'); } }, 10000, 1);This snippet does not depend on the group. It will give every user with ‘manual approval’ the ‘b2b_role’ role. (you need to rename ‘b2b_role’ to the name of your desired role)
Thank you very much for letting us know,
I did see an issue as well. We are looking into this urgently,
Hi there,
I understand that you are using the ‘B2BKing Pro’ plugin. I would like to let you know that for support for B2BKing Pro, we have a dedicated support platform here at https://webwizards.ticksy.com – here you can open tickets with us.
Regarding the specific issue you reported, some things to check:
-> Make sure you’re already using the latest version of the plugin, currently 4.4.10 (there have been recent changes to this so it could be relevant)
-> Try to change the theme to the default Storefront theme to see if that has any effect on this.
-> Make sure that in your dynamic rule, each variation is selected INDIVIDUALLY – in other words, if you want it to apply to each variation, you cannot select the parent variable products – instead, you should select each individual variation.
Glad to hear that’s working,
It would be possible to do what you described through custom coding, by editing the PHP template files of the edit-product page.
For example you could see our guide here for ‘How to integrate a plugin’: https://woocommerce-multivendor.com/docs/developer-documentation-functions-hooks-custom-code-plugin-integrations/
We are open to adding that kind of integration directly to our plugin ourselves, but it is not something we could work on immediately. It would be something for future development.
Thanks for getting back to me,
I looked into it and I think I found the problem – the tinymce scripts were not getting rendered. I believe I fixed it.I released update 1.4.50 for MarketKing Core – please update and check again after updating.
It may be related to your theme then. Does it work if you change it to the default ‘storefront’ theme? If so, which theme are you using?
If you find it’s not related to the theme, we can check the issue directly for you if you’d like. For that, we’d need a backend login to the site (or a staging clone site). You can submit a private ticket with that info to our support site at https://webwizards.ticksy.com – feel free to open it in the ‘pre-sales’ categories.
Hi there,
I am not able to replicate the issue with the latest versions of MarketKing and Flatsome. I believe this likely has to do with some kind of plugin conflict with another plugin on your site.
I would suggest to please try and deactivate all other plugins to see if that resolves it / helps you identify which plugin conflicts.
If so, let me know which plugin it is, we may be able to find a solution to the conflict.
Hi there,
I checked that file and I believe I’ve found the issue. I released a plugin update for MarketKing Core (1.4.45) and I believe it’s now resolved.
Please update and make sure to clear caches / try in incognito mode to get the new JS file.
Hi again,
I was able to check this on a WPML sandbox now with the latest versions of these plugins: https://prnt.sc/aCnXXt_VXRvk
I am not able to see any error in the backend, either generally or on MarketKing pages.
I’m sure they happen in your setup for some reason but I can’t tell why at this point. If you could share a backend login to a staging clone site, that would be great, so we could check it directly.
Thank you,
Thank you so much! 🙂
Glad to hear that is working!
If the plugin is useful to you, please consider leaving us a review here:
https://ww.wp.xz.cn/support/plugin/b2bking-wholesale-for-woocommerce/reviews/
That is a great help to us in supporting the plugin,
Have a nice day!
Hi there,
Just to be sure it’s clear, it’s the vendor dashboard, not the plugin itself which is separate from the theme.
I don’t have a way to change that – that’s fundamental to how the plugin is built.
Choosing to do that was a decision that involved some trade-offs. We wanted to have a beautifully designed dashboard, but we also wanted the plugin to work with all themes.
If the theme and dashboard would work together, then there would be a lot of styling conflicts, and we would have to say that the plugin is compatible “with only these specific themes”. Also the dashboard design would need to be relatively ‘simple’ / ‘plain’, so that it could adapt to the theme – we would not be able to have more complex design elements.
Perhaps in the future we will add a setting for a new dashboard option that would try to integrate with the theme – but that’s not available right now.