How to exclude Products from rules using Dynamic Pricing and Discounts Plugin for WooCommerce?

There may be instances where you configure some rules for dynamic pricing or discounts for products on your store, and would like to exempt some products from these rules. You can achieve this in Dynamic Pricing and Discounts Plugin for WooCommerce with the following code snippets for different cases.

Case 1: Skipping products from specific rule type

With Dynamic Pricing and Discounts Plugin for WooCommerce, you can create product rules, combinational rules, category rules, cart rules, and buy & get offers. You can skip certain product(s) from these rule types by specifying product ID(s) and rule type in the code snippet.

Consider the following category rule configured in the plugin:

Dynamic Pricing and Discounts - Category Rule

Category Rule

Based on the above category rule, if a minimum of two items of category Clothing are bought, then a percentage discount of value 10 is applied. The discounted rate on the products can be seen on the cart page as shown below:

Dynamic Pricing and Discounts - Prices in Cart

Category rule applied on Cart page

To skip a product from category rule, say Hoodie (product ID: 2500)include the following code snippet in the functions.php file of your respective website theme folder.

Once the code snippet is added, you can see the applicable changes on the cart page as shown in the screenshot below:

Dynamic Pricing and Discounts - Applied Category rule

Product skipped from Category rule

 

Case 2: Skipping products based on rule number of specific rule type

You can skip products based on rule number of specific rule type by specifying rule number, product ID and respective rule type.

Consider the category rule configured in the plugin, as explained in the earlier part of this article. The discounted rate on the products can be seen on the cart page as shown below:

Dynamic Pricing and Discounts - Prices in Cart

Category rule applied on Cart page

To skip a product based on rule number from category rule, say rule number of category Clothing and product Hoodie (product ID: 2500)include the following code snippet in the functions.php file of your respective website theme folder.

Once the code snippet is added, you can see the applicable changes on the cart page as shown in the screenshot below:

Dynamic Pricing and Discounts - Prices in Cart

Product skipped from rule 1 of Category rule(s)

 

To know more about the product, checkout Dynamic Pricing and Discounts Plugin for WooCommerce.

To know more about other features of the plugin, read product setting up article.

Or checkout documentation section for more related articles.

Leave a Reply