Add Dual Pricing Per Product in WooCommerce

The code in this download folder enables you to add a 2nd price for each simple product and product variation. The 2nd price is displayed for logged in users with the custom role named wholesaler. Everyone else is displayed the regular price.

Add different price for simple products in woocommerce :

Add 2nd wholesale price for simple products in woocommerce

Add different prices for variable products in woocommerce :

Add 2nd wholesale price for variable products in woocommerce

Different Price Per Product Based on Role

In this example we use the code to create a custom role for wholesale customers and add a price field to all simple product and product variations which is displayed when users with the wholesaler role login and browse products. When logged out, the regular price is shown.

Demo Video

Installation

Install the zip folder as a new plugin or copy & paste the PHP code from the functions file to the end of your child themes functions.php file or custom functionality plugin.

Download Folder

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.