Comments 3Grzegorz started the conversationJune 21, 2023 at 6:48pmHow do I detect b2b user with a php function so that I can modify checkout fields for them? 2,285WebWizards repliedJune 21, 2023 at 11:02pmHI Grzegorz,In the latest plugin version, you can simply use: if (b2bking()->is_b2b_user()){ // code for b2b users only } This would check if the current user is B2B or not.Alternatively, you can specify a user ID to check: if (b2bking()->is_b2b_user($user_id)){ // code for b2b users only } Let me know if I can help with anything, or if you have any questions, Kind regards, Stefan 3Grzegorz repliedJune 22, 2023 at 3:12pmYes, that is what what I was asking for. Thank You!1 Like Sign in to reply ...
How do I detect b2b user with a php function so that I can modify checkout fields for them?
HI Grzegorz,
In the latest plugin version, you can simply use:
This would check if the current user is B2B or not.
Alternatively, you can specify a user ID to check:
Let me know if I can help with anything, or if you have any questions,
Kind regards,
Stefan
Yes, that is what what I was asking for. Thank You!