1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Prices Premium
  4. Wholesale Pricing
  5. How To Change The “Wholesale Price: ” Text On The Front End
  1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Prices
  4. Wholesale Pricing
  5. How To Change The “Wholesale Price: ” Text On The Front End

How To Change The “Wholesale Price: ” Text On The Front End

One common thing people want to do is change the bit of text that shows before the price on your wholesale prices. This defaults to “Wholesale Price:”

In the WooCommerce Wholesale Prices Premium plugin, you can change this text to anything you want. For example, Reseller Price.

You can find this option in WooCommerce > Settings > Wholesale Prices > Price > Wholesale Price Text.

If you have a multiple user role and would like to customize this text for each roles, you can use the following snippet:

add_filter('wwp_filter_wholesale_price_title_text', 'override_wholesale_text', 10, 1);
 
function override_wholesale_text($wholesaletext) {
    global $current_user;

    if (isset($current_user) && class_exists('WWP_Wholesale_Roles')) {
        $wwp_wholesale_roles = WWP_Wholesale_Roles::getInstance();
            $wwp_wholesale_role = $wwp_wholesale_roles->getUserWholesaleRole();

          if (!empty($wwp_wholesale_role) && in_array('wholesale_customer', $wwp_wholesale_role)) {
        // Where 'wholesale_customer' is the name of the wholesale role you want to target
                return 'Wholesale Price:';
            }

         if (!empty($wwp_wholesale_role) && in_array('wholesale_vip', $wwp_wholesale_role)) {
        // Where 'wholesale_vip' is the name of the wholesale role you want to target
                return 'VIP Price:';

            }

        }
    }  
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Complete Your Purchase