Require Capability to View Woocommerce Product

My guess is that your problem is here:

if (is_product_category('b2b'))

Taking a look at the Woocommerce Documention for Conditional Tags is_product_category() will return true on product category archives. Therefore, it will never be true on the single product page.

What I think you need instead is has_term() which checks a post for a particular term. Therefore I would suggest you change your conditional to:

<?php if (has_term('b2b', 'product_cat')) && if current_user_can('read_b2b') { ?>