Quantcast
Channel: Active questions tagged usergroups - Stack Overflow
Viewing all articles
Browse latest Browse all 34

Show or Hide Text added after pricing depending on User Group or login status

$
0
0

I am using a B2B plugin that allows me to create different pricing for different user groups. The standard pricing is shown for all users until they sign up and account and are added to a group with better pricing (for wholesale customers etc).

I have added some code to say Retail Pricing after the standard pricing. The problem is I don't want this suffix to show once a user is logged in OR to certain user groups as the pricing is no longer retail for these customers, its wholesale.

The code I used is:

function woo_text_after_price( $price ) {    $price .= ' Retail Price';    return $price;}add_filter( 'woocommerce_get_price_html', 'woo_text_after_price' );add_filter( 'woocommerce_cart_item_price', 'woo_text_after_price' );

The B2B plugin I am using is called WooCommerce B2B and was purchased from Code Canyon developed by code4lifeitalia.

Thank you in advance.

I have not tried any resolution yet as I don't know what to try. I know I would need some kind of filter or rule but I don't know how to create one.


Viewing all articles
Browse latest Browse all 34

Latest Images

Trending Articles





Latest Images