Okay
  Public Ticket #3987538
Check if user is B2C or B2B
Open

Comments

  •  7
    Miguel Zenha started the conversation

    Hi, Stefan!

    We are now changing the store to a hybrid B2B & B2C shop and we are facing some issues.

    I want to build a shortcode to check if the user is a B2C or B2B

    If the user role is null or it's not logged in, then we assume that it is a B2C guest. 

     After that, we want to show the B2C or B2C price ($product->get_regular_price() / $product->get_sale_price()).

    How can we do this code snippet in PHP? 

     Best regards and thanks.