How do I detect b2b user with a php function so that I can modify checkout fields for them?
detect b2b user
Closed
Comments
HI 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
Yes, that is what what I was asking for. Thank You!
1