Discount Rules for WooCommerce - Version 1.4.30

Version Description

  • 05/12/17 =
  • Feature - Apply rule for variant products
Download this release

Release Info

Developer flycart
Plugin Icon 128x128 Discount Rules for WooCommerce
Version 1.4.30
Comparing to
See all releases

Code changes from version 1.4.29 to 1.4.30

assets/js/app.js CHANGED
@@ -163,7 +163,7 @@ function validateFields(){
163
  '<input type="text" name="discount_range[' + count + '][to_discount]" class="form-control price_discount_amount" value="" placeholder="ex. 50"> ';
164
  form += '<div class="price_discount_product_list_con hide">' +
165
  ' Apply for <select class="" name="discount_range['+count+'][discount_product_option]"><option value="all">All selected</option><option value="any_cheapest">Any one cheapest </option>' +
166
- '</select><select class="product_list selectpicker price_discount_product_list" multiple name="discount_range[' + count + '][discount_product][]">';
167
  /* $("#product_list select.product_list option").each(function()
168
  {
169
  form += '<option value="'+$(this).val()+'">'+$(this).html()+'</option>';
163
  '<input type="text" name="discount_range[' + count + '][to_discount]" class="form-control price_discount_amount" value="" placeholder="ex. 50"> ';
164
  form += '<div class="price_discount_product_list_con hide">' +
165
  ' Apply for <select class="" name="discount_range['+count+'][discount_product_option]"><option value="all">All selected</option><option value="any_cheapest">Any one cheapest </option>' +
166
+ '</select><select class="product_list selectpicker price_discount_product_list" data-live-search="true" multiple name="discount_range[' + count + '][discount_product][]">';
167
  /* $("#product_list select.product_list option").each(function()
168
  {
169
  form += '<option value="'+$(this).val()+'">'+$(this).html()+'</option>';
helper/general-helper-3.php CHANGED
@@ -105,15 +105,17 @@ if ( ! class_exists( 'woo_dicount_rules_generalHelper' ) ) {
105
  $products = array();
106
  $posts_raw = get_posts(array(
107
  'posts_per_page' => -1,
108
- 'post_type' => 'product',
109
  'post_status' => $postStatus,
110
  'fields' => 'ids',
111
  ));
112
 
113
  foreach ($posts_raw as $post_id) {
114
- $products[$post_id] = '#' . $post_id . ' ' . get_the_title($post_id);
 
 
115
  }
116
-
117
  return $products;
118
  }
119
 
@@ -269,11 +271,7 @@ if ( ! class_exists( 'woo_dicount_rules_generalHelper' ) ) {
269
  if ($is_id) {
270
  $id = $item;
271
  } else {
272
- //for variant product
273
- $id = $item['data']->get_parent_id();
274
- if(!$id){
275
- $id = $item['data']->get_id();
276
- }
277
  }
278
  $id = intval($id);
279
  if (!$id) return false;
105
  $products = array();
106
  $posts_raw = get_posts(array(
107
  'posts_per_page' => -1,
108
+ 'post_type' => array('product', 'product_variation'),
109
  'post_status' => $postStatus,
110
  'fields' => 'ids',
111
  ));
112
 
113
  foreach ($posts_raw as $post_id) {
114
+ $product = wc_get_product($post_id);
115
+ $products[$post_id] = $product->get_formatted_name();
116
+ //$products[$post_id] = '#' . $post_id . ' ' . get_the_title($post_id);
117
  }
118
+ asort($products);
119
  return $products;
120
  }
121
 
271
  if ($is_id) {
272
  $id = $item;
273
  } else {
274
+ $id = $item['data']->get_id();
 
 
 
 
275
  }
276
  $id = intval($id);
277
  if (!$id) return false;
helper/general-helper.php CHANGED
@@ -105,15 +105,15 @@ if ( ! class_exists( 'woo_dicount_rules_generalHelper' ) ) {
105
  $products = array();
106
  $posts_raw = get_posts(array(
107
  'posts_per_page' => -1,
108
- 'post_type' => 'product',
109
  'post_status' => $postStatus,
110
  'fields' => 'ids',
111
  ));
112
 
113
  foreach ($posts_raw as $post_id) {
114
- $products[$post_id] = '#' . $post_id . ' ' . get_the_title($post_id);
 
115
  }
116
-
117
  return $products;
118
  }
119
 
@@ -269,11 +269,7 @@ if ( ! class_exists( 'woo_dicount_rules_generalHelper' ) ) {
269
  if ($is_id) {
270
  $id = $item;
271
  } else {
272
- //for variant product
273
- $id = $item['data']->parent_id;
274
- if(!$id){
275
- $id = $item['data']->id;
276
- }
277
  }
278
  $id = intval($id);
279
  if (!$id) return false;
105
  $products = array();
106
  $posts_raw = get_posts(array(
107
  'posts_per_page' => -1,
108
+ 'post_type' => array('product', 'product_variation'),
109
  'post_status' => $postStatus,
110
  'fields' => 'ids',
111
  ));
112
 
113
  foreach ($posts_raw as $post_id) {
114
+ $product = wc_get_product($post_id);
115
+ $products[$post_id] = $product->get_formatted_name();
116
  }
 
117
  return $products;
118
  }
119
 
269
  if ($is_id) {
270
  $id = $item;
271
  } else {
272
+ $id = $item['data']->id;
 
 
 
 
273
  }
274
  $id = intval($id);
275
  if (!$id) return false;
includes/pricing-rules-3.php CHANGED
@@ -465,7 +465,12 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
465
  //check if product already in cart
466
  if ( sizeof( WC()->cart->get_cart() ) > 0 ) {
467
  foreach ($free_products as $productId => $free_product_detail) {
468
- WC()->cart->add_to_cart($productId, $free_product_detail['count']);
 
 
 
 
 
469
  $found = false;
470
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
471
  $_product = $values['data'];
@@ -663,7 +668,6 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
663
  switch ($rule['apply_to']) {
664
 
665
  case 'specific_products':
666
-
667
  if ($this->isItemInProductList($rule['type']['specific_products'], $item)) {
668
  $applied_rules[$i]['amount'] = $this->getAdjustmentAmount($quantity, $this->array_first($rule['discount']));
669
  $applied_rules[$i]['name'] = $rule['name'];
@@ -949,8 +953,7 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
949
  }
950
 
951
  public function getProductIdFromCartProduct($product){
952
- $id = $product->get_parent_id();
953
- if(!$id) $id = $product->get_id();
954
  return $id;
955
  }
956
 
@@ -990,8 +993,10 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
990
  public function isItemInProductList($product_list, $product)
991
  {
992
  if (!isset($product['product_id'])) return false;
 
 
993
  if (!is_array($product_list)) $product_list = (array)$product_list;
994
- if (count(array_intersect($product_list, array($product['product_id']))) == 1) {
995
  return true;
996
  } else {
997
  return false;
465
  //check if product already in cart
466
  if ( sizeof( WC()->cart->get_cart() ) > 0 ) {
467
  foreach ($free_products as $productId => $free_product_detail) {
468
+ $product = wc_get_product($productId);
469
+ if($product->get_parent_id()){
470
+ WC()->cart->add_to_cart($product->get_parent_id(), $free_product_detail['count'], $productId, $product->get_attributes());
471
+ } else {
472
+ WC()->cart->add_to_cart($productId, $free_product_detail['count']);
473
+ }
474
  $found = false;
475
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
476
  $_product = $values['data'];
668
  switch ($rule['apply_to']) {
669
 
670
  case 'specific_products':
 
671
  if ($this->isItemInProductList($rule['type']['specific_products'], $item)) {
672
  $applied_rules[$i]['amount'] = $this->getAdjustmentAmount($quantity, $this->array_first($rule['discount']));
673
  $applied_rules[$i]['name'] = $rule['name'];
953
  }
954
 
955
  public function getProductIdFromCartProduct($product){
956
+ $id = $product->get_id();
 
957
  return $id;
958
  }
959
 
993
  public function isItemInProductList($product_list, $product)
994
  {
995
  if (!isset($product['product_id'])) return false;
996
+ $product_ids = array($product['product_id']);
997
+ if(!empty($product['variation_id'])) $product_ids[] = $product['variation_id'];
998
  if (!is_array($product_list)) $product_list = (array)$product_list;
999
+ if (count(array_intersect($product_list, $product_ids)) == 1) {
1000
  return true;
1001
  } else {
1002
  return false;
includes/pricing-rules.php CHANGED
@@ -437,7 +437,9 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
437
  $found = false;
438
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
439
  $_product = $values['data'];
440
- if ($_product->id == $productId){
 
 
441
  $_quantity = $values['quantity'];
442
  $_cart_item_key = $cart_item_key;
443
  $found = true;
@@ -470,7 +472,9 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
470
  $found = false;
471
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
472
  $_product = $values['data'];
473
- if ($_product->id == $productId){
 
 
474
  $freeProductRule[0]['amount'] = array('price_discount' => $_product->get_price());
475
  $freeProductRule[0]['name'] = $free_product_detail['rule_name'];
476
  $freeProductRule[0]['item'] = $cart_item_key;
@@ -679,6 +683,7 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
679
 
680
  case 'specific_category':
681
  if ($this->isItemInCategoryList($rule['type']['specific_category'], $item)) {
 
682
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
683
  $totalQuantityInThisCategory = $this->getProductQuantityInThisCategory($rule['type']['specific_category']);
684
  $quantity = $totalQuantityInThisCategory;
@@ -731,7 +736,9 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
731
  foreach ($applyToProducts as $key => $productId) {
732
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
733
  $_product = $values['data'];
734
- if ($_product->id == $productId){
 
 
735
  $applied_rules_new = array();
736
  $applied_rules_new['amount'] = $applyPercent;
737
  $applied_rules_new['name'] = $rule['name'];
@@ -752,7 +759,9 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
752
  foreach ($checkRuleMatches['apply_to']['products'] as $key => $productId) {
753
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
754
  $_product = $values['data'];
755
- if ($_product->id == $productId){
 
 
756
  $applied_rules_new = array();
757
  $applied_rules_new['amount'] = $checkRuleMatches['amount'];
758
  $applied_rules_new['name'] = $rule['name'];
@@ -807,7 +816,9 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
807
  foreach ($product_to_buy as $key => $productId) {
808
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
809
  $_product = $values['data'];
810
- if ($_product->id == $productId){
 
 
811
  $_quantity[$productId] = $values['quantity'];
812
  }
813
  }
@@ -953,8 +964,7 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
953
  }
954
 
955
  public function getProductIdFromCartProduct($product){
956
- $id = $product->parent_id;
957
- if(!$id) $id = $product->id;
958
  return $id;
959
  }
960
 
@@ -994,8 +1004,10 @@ if (!class_exists('woo_dicount_rules_pricingRules')) {
994
  public function isItemInProductList($product_list, $product)
995
  {
996
  if (!isset($product['product_id'])) return false;
 
 
997
  if (!is_array($product_list)) $product_list = (array)$product_list;
998
- if (count(array_intersect($product_list, array($product['product_id']))) == 1) {
999
  return true;
1000
  } else {
1001
  return false;
437
  $found = false;
438
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
439
  $_product = $values['data'];
440
+ $_product_id = $_product->id;
441
+ if(isset($_product->variation_id)) $_product_id = $_product->variation_id;
442
+ if ($_product_id == $productId){
443
  $_quantity = $values['quantity'];
444
  $_cart_item_key = $cart_item_key;
445
  $found = true;
472
  $found = false;
473
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
474
  $_product = $values['data'];
475
+ $_product_id = $_product->id;
476
+ if(isset($_product->variation_id)) $_product_id = $_product->variation_id;
477
+ if ($_product_id == $productId){
478
  $freeProductRule[0]['amount'] = array('price_discount' => $_product->get_price());
479
  $freeProductRule[0]['name'] = $free_product_detail['rule_name'];
480
  $freeProductRule[0]['item'] = $cart_item_key;
683
 
684
  case 'specific_category':
685
  if ($this->isItemInCategoryList($rule['type']['specific_category'], $item)) {
686
+ $alreadyExists = 0;
687
  if(isset($rule['type']['is_cumulative']) && $rule['type']['is_cumulative']){
688
  $totalQuantityInThisCategory = $this->getProductQuantityInThisCategory($rule['type']['specific_category']);
689
  $quantity = $totalQuantityInThisCategory;
736
  foreach ($applyToProducts as $key => $productId) {
737
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
738
  $_product = $values['data'];
739
+ $_product_id = $_product->id;
740
+ if(isset($_product->variation_id)) $_product_id = $_product->variation_id;
741
+ if ($_product_id == $productId){
742
  $applied_rules_new = array();
743
  $applied_rules_new['amount'] = $applyPercent;
744
  $applied_rules_new['name'] = $rule['name'];
759
  foreach ($checkRuleMatches['apply_to']['products'] as $key => $productId) {
760
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
761
  $_product = $values['data'];
762
+ $_product_id = $_product->id;
763
+ if(isset($_product->variation_id)) $_product_id = $_product->variation_id;
764
+ if ($_product_id == $productId){
765
  $applied_rules_new = array();
766
  $applied_rules_new['amount'] = $checkRuleMatches['amount'];
767
  $applied_rules_new['name'] = $rule['name'];
816
  foreach ($product_to_buy as $key => $productId) {
817
  foreach (WC()->cart->get_cart() as $cart_item_key => $values) {
818
  $_product = $values['data'];
819
+ $_product_id = $_product->id;
820
+ if(isset($_product->variation_id)) $_product_id = $_product->variation_id;
821
+ if ($_product_id == $productId){
822
  $_quantity[$productId] = $values['quantity'];
823
  }
824
  }
964
  }
965
 
966
  public function getProductIdFromCartProduct($product){
967
+ $id = $product->id;
 
968
  return $id;
969
  }
970
 
1004
  public function isItemInProductList($product_list, $product)
1005
  {
1006
  if (!isset($product['product_id'])) return false;
1007
+ $product_ids = array($product['product_id']);
1008
+ if(!empty($product['variation_id'])) $product_ids[] = $product['variation_id'];
1009
  if (!is_array($product_list)) $product_list = (array)$product_list;
1010
+ if (count(array_intersect($product_list, $product_ids)) == 1) {
1011
  return true;
1012
  } else {
1013
  return false;
readme.txt CHANGED
@@ -4,30 +4,53 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, ecommerce, discounts, coupons, promotion, campaigns, sales, price rules, advanced coupons, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
- Stable tag: 1.4.29
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
  Create simple to complex discount rules, promotions for your WooCommerce online store.
12
  == Description ==
13
 
14
- WooCommerce discount rules helps you to create any type of bulk discounts, dynamic pricing and advanced discount rules in your WooCommerce store. Offer Product quantity based discounts, cart based discounts at a percentage or fixed amount or Buy One Get one (BOGO) deals. Increase your sales multifold by offering flexible discounts based on Categories, user roles, Cart items and much more.
15
 
16
- Discount will be visible in Product Page, Product details page, Cart and in email invoices.
 
 
17
 
18
  Display the Pricing discount table beautifully On the product Page.
19
 
20
- [View Demo](http://demo.flycart.org/woo-discount-rules) | [Documentation with real examples](https://www.flycart.org/docs/wordpress/woo-discount-rules) | [Ask Questions](https://www.flycart.org/support) | [PRO version](https://www.flycart.org/products/wordpress/woocommerce-discount-rules)
21
 
22
- = Discount Types =
23
 
24
- * Percentage based Discount
25
- * Price based Discount
26
- * Product based discount
27
- * Buy One Get One Discount(BOGO Deals)
 
 
 
 
 
 
 
 
28
 
29
  == Examples ==
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  = Product Dependant rule: =
32
 
33
  * Buy Product A and get 50% discount in Product B
@@ -37,17 +60,14 @@ Display the Pricing discount table beautifully On the product Page.
37
 
38
  = BOGO deals: =
39
 
40
- * Buy one get one free of the same product
41
  * Buy X get Y product free Eg: Buy 3 product and get a pendrive free
42
- * Buy Any 2 items from Category X, and get a Product free Category B
43
-
44
- = Category Discount Rules: =
45
-
46
- * Buy T-shirts from Category Apparel and save 10% – [Video](https://www.youtube.com/watch?v=OEWc7fL3qeM)
47
- * Get 30% off on Category A & Category B
48
 
49
  = Cart Discount Rules: =
50
 
 
 
51
  * All orders above $500 will get 15% discount – [Video](https://www.youtube.com/watch?v=RSU0zuvx_Yg)
52
  * Buy 5 products and get 10% discount – [Video](https://www.youtube.com/watch?v=84VL6Wwf1DI&t=15s)
53
 
@@ -88,14 +108,14 @@ Conditions can be based products, categories, customers, customer roles, shippin
88
  * All products
89
  * Customer purchase history
90
  * Specific products / Selected products
91
- * All categories ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
92
- * Selected categories ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
93
- * All customers ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
94
- * Selected customers ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
95
- * All customer roles ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
96
- * Selected customer roles ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
97
- * All Shipping locations ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
98
- * Selected shipping locations ([PRO feature](https://www.flycart.org/products/wordpress/woocommerce-discount-rules))
99
 
100
  = Rules apply based on =
101
 
@@ -109,20 +129,28 @@ Conditions can be based products, categories, customers, customer roles, shippin
109
 
110
  = PRO only features =
111
 
112
- * Fixed price discount for Quantity based discount conditions ( Get $9 discount for purchasing over 6 items)
113
- * Category specific discount conditions ( Get 25 % off on all items under Summer Collection )
114
- * Applying multiple discount rules in a purchase (Get 5% for order above $500 and 10 % for buying more than 6 items)
115
- * Cart discounts by sum of item quantities in cart (Order more than 10 items from any category and get 15 % discount)
116
- * Cart discounts by selected customers (John gets 25% life time discount. Ellen gets 10 % limited period offer)
117
- * Cart discounts by fixed price discounts (Flat $50 discount for all orders today)
 
 
 
 
 
 
 
 
118
 
119
  = Website =
120
 
121
- https://www.flycart.org/products/wordpress/woocommerce-discount-rules
122
 
123
  = Documentation =
124
 
125
- https://www.flycart.org/docs/wordpress/woo-discount-rules
126
 
127
  == Installation ==
128
  Just use the WordPress installer or upload to the /wp-content/plugins folder. Then Activate the WooCommerce Email Builder and Customizer plugin.
@@ -205,6 +233,9 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
205
 
206
  == Changelog ==
207
 
 
 
 
208
  = 1.4.29 - 01/12/17 =
209
  * Fix - Cart price strike out even discount not applied in some case
210
 
4
  Tags: woocommerce, ecommerce, discounts, coupons, promotion, campaigns, sales, price rules, advanced coupons, advanced discounts
5
  Requires at least: 4.4.1
6
  Tested up to: 4.9
7
+ Stable tag: 1.4.30
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
  Create simple to complex discount rules, promotions for your WooCommerce online store.
12
  == Description ==
13
 
14
+ WooCommerce discount rules helps you to create any type of bulk discounts, dynamic pricing and advanced discount rules in your WooCommerce store. Offer Product quantity based discounts, cart based discounts at a percentage or fixed amount or Buy One and Get one (BOGO) deals. Increase your sales multifold by offering flexible discounts based on Categories, user roles, Cart items and much more.
15
 
16
+ Now you can set Bulk Discounts for each Product Variations.
17
+
18
+ Discounts will be visible in Product Page, Product details page, Cart and in email invoices.
19
 
20
  Display the Pricing discount table beautifully On the product Page.
21
 
22
+ [View Demo](http://demo.flycart.org/woo-discount-rules) | [Documentation with real examples](https://www.flycart.org/docs/wordpress/woo-discount-rules) | [Ask Questions](https://www.flycart.org/support) | [PRO version](https://www.flycart.org/products/wordpress/woocommerce-discount-rules) | [Examples](https://www.flycart.org/woocommerce-discount-rules-examples)
23
 
24
+ = DISCOUNT TYPES AND FEATURES =
25
 
26
+ * Percentage based Discounts
27
+ * Price based Discounts
28
+ * Product based discounts
29
+ * Option to set discounts for each Product Variants
30
+ * Buy One and Get One Discounts (BOGO Deals)
31
+ * Option to set discount for each product variant.
32
+ * Option to set Discount for All Products or Global Discount
33
+ * Display or hide the Discount table in Product Page
34
+ * Option to show or hide the discounted price
35
+ * Multiple Discount rules can be created
36
+ * Set Discount expiry date
37
+ * Priority support for PRO version
38
 
39
  == Examples ==
40
 
41
+ = Category Discount Rules: =
42
+
43
+ * Buy T-shirts from Category Apparel and save 10% – [Video](https://www.youtube.com/watch?v=OEWc7fL3qeM)
44
+ * Get 30% off on Category A & Category B
45
+ * Purchase any 6 items from Category A and get 25% discount on total cart value.
46
+ * Purchase 1 product from Category A, 2 Products from Category B and get 20% discount valid from dd/mm/yyyy to dd/mm/yyyy
47
+
48
+ = Product Variant Discounts: =
49
+
50
+ * Get 50% off on Nike T-shirts Small and Large Sizes
51
+ * Buy a Small Size Tee and get a small Size shorts free
52
+ * You can customise the Variants discounts in several combinations
53
+
54
  = Product Dependant rule: =
55
 
56
  * Buy Product A and get 50% discount in Product B
60
 
61
  = BOGO deals: =
62
 
63
+ * Buy one and get one free of the same product
64
  * Buy X get Y product free Eg: Buy 3 product and get a pendrive free
65
+ * Buy Any 2 items from Category X, and get a Product free from Category B
 
 
 
 
 
66
 
67
  = Cart Discount Rules: =
68
 
69
+ * Add two to six products in cart and get flat $30 discount.
70
+ * 10% discount for all retailers (User Role specific discount)
71
  * All orders above $500 will get 15% discount – [Video](https://www.youtube.com/watch?v=RSU0zuvx_Yg)
72
  * Buy 5 products and get 10% discount – [Video](https://www.youtube.com/watch?v=84VL6Wwf1DI&t=15s)
73
 
108
  * All products
109
  * Customer purchase history
110
  * Specific products / Selected products
111
+ * All categories
112
+ * Selected categories
113
+ * All customers
114
+ * Selected customers
115
+ * All customer roles
116
+ * Selected customer roles
117
+ * All Shipping locations
118
+ * Selected shipping locations
119
 
120
  = Rules apply based on =
121
 
129
 
130
  = PRO only features =
131
 
132
+ * Fixed price discount for Quantity based discount conditions ( Get $9 discount for purchasing over 6 items)
133
+ * Category specific discount conditions ( Get 25 % off on all items under Summer Collection )
134
+ * Applying multiple discount rules in a purchase (Get 5% for order above $500 and 10 % for buying more than 6 items)
135
+ * Cart discounts by sum of item quantities in cart (Order more than 10 items from any category and get 15 % discount)
136
+ * Cart discounts by selected customers (John gets 25% life time discount. Ellen gets 10 % limited period offer)
137
+ * Cart discounts by fixed price discounts (Flat $50 discount for all orders today)
138
+ * Product dependant Rules - Buy Product A, get 10% off on Product B
139
+ * Buy 3 units of Product A and get flat $25 discount
140
+ * Add 3 products to the cart and get the Cheapest Item free
141
+ * Buy any 2 products from Specific category and get a Product Free from Category B
142
+ * Buy Product A and Product B from Category Electronics and get a free product from category Accessories
143
+ * Buy any Product from Category Mobile and choose a free product from Category Hard Cases
144
+ * Option to offer free products only from certain category
145
+
146
 
147
  = Website =
148
 
149
+ [https://www.flycart.org/products/wordpress/woocommerce-discount-rules](https://www.flycart.org/products/wordpress/woocommerce-discount-rules)
150
 
151
  = Documentation =
152
 
153
+ [https://www.flycart.org/docs/wordpress/woo-discount-rules](https://www.flycart.org/docs/wordpress/woo-discount-rules)
154
 
155
  == Installation ==
156
  Just use the WordPress installer or upload to the /wp-content/plugins folder. Then Activate the WooCommerce Email Builder and Customizer plugin.
233
 
234
  == Changelog ==
235
 
236
+ = 1.4.30 - 05/12/17 =
237
+ * Feature - Apply rule for variant products
238
+
239
  = 1.4.29 - 01/12/17 =
240
  * Fix - Cart price strike out even discount not applied in some case
241
 
woo-discount-rules.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.4.29
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1
5
  * Description: Simple Discount Rules for WooCommerce.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.4.30
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Requires at least: 4.6.1