Discount Rules for WooCommerce - Version 1.9.11

Version Description

  • 17/06/20 =
  • Fix - Custom taxonomy doesn't works with conditions.
  • Fix - Email based rule doesn't works with User role on OR condition.
  • Fix - Subtotal based promotion Price is not correct when we give subtotal as decimal value.
  • Fix - Loading strikeout even the rule reached the usage limit.
  • Feature - On sale include/exclude condition for Free shipping discount type.
  • Improvement - Subtotal based promotion enable/disable option
Download this release

Release Info

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

Code changes from version 1.9.10 to 1.9.11

i18n/languages/woo-discount-rules.pot CHANGED
@@ -294,7 +294,7 @@ msgstr ""
294
  #: v1/view/settings_promotion.php:22 v1/view/settings_promotion.php:62
295
  #: v1/view/settings_promotion.php:97 v1/view/settings_promotion.php:132
296
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:250
297
- #: v2/App/Views/Admin/Tabs/settings.php:320
298
  msgid "Disabled"
299
  msgstr ""
300
 
@@ -756,7 +756,7 @@ msgstr ""
756
  #: v1/includes/discount-base.php:1108 v1/view/settings_price_rules.php:208
757
  #: v1/view/settings_price_rules.php:226 v1/view/settings_price_rules.php:244
758
  #: v1/view/settings_price_rules.php:262
759
- #: v2/App/Views/Admin/Tabs/settings.php:499
760
  msgid "Show"
761
  msgstr ""
762
 
@@ -994,7 +994,7 @@ msgid ""
994
  "defined in WooCommerce -> Attributes. <a href=\"%s\">Read docs</a>.</span>"
995
  msgstr ""
996
 
997
- #: v1/includes/discount-base.php:1237 v2/App/Controllers/ManageDiscount.php:767
998
  #, php-format
999
  msgid ""
1000
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
@@ -1258,7 +1258,7 @@ msgstr ""
1258
 
1259
  #: v1/view/cart-rules.php:104 v1/view/cart-rules.php:214
1260
  #: v1/view/pricing-rules.php:134 v1/view/pricing-rules.php:244
1261
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:197
1262
  msgid "Language"
1263
  msgstr ""
1264
 
@@ -1415,7 +1415,7 @@ msgstr ""
1415
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1416
  #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:433
1417
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1418
- #: v2/App/Views/Admin/Rules/Manage.php:174
1419
  msgid "Discount"
1420
  msgstr ""
1421
 
@@ -1597,7 +1597,8 @@ msgstr ""
1597
  #: v2/App/Views/Admin/Tabs/settings.php:158
1598
  #: v2/App/Views/Admin/Tabs/settings.php:253
1599
  #: v2/App/Views/Admin/Tabs/settings.php:270
1600
- #: v2/App/Views/Admin/Tabs/settings.php:347
 
1601
  msgid "Yes"
1602
  msgstr ""
1603
 
@@ -1611,7 +1612,8 @@ msgstr ""
1611
  #: v2/App/Views/Admin/Tabs/settings.php:161
1612
  #: v2/App/Views/Admin/Tabs/settings.php:257
1613
  #: v2/App/Views/Admin/Tabs/settings.php:276
1614
- #: v2/App/Views/Admin/Tabs/settings.php:352
 
1615
  msgid "No"
1616
  msgstr ""
1617
 
@@ -1740,7 +1742,7 @@ msgstr ""
1740
  #: v1/view/settings_price_rules.php:137 v1/view/settings_price_rules.php:211
1741
  #: v1/view/settings_price_rules.php:229 v1/view/settings_price_rules.php:247
1742
  #: v1/view/settings_price_rules.php:265
1743
- #: v2/App/Views/Admin/Tabs/settings.php:502
1744
  msgid "Don't Show"
1745
  msgstr ""
1746
 
@@ -1849,19 +1851,19 @@ msgstr ""
1849
  msgid "Display savings text (for price rules)"
1850
  msgstr ""
1851
 
1852
- #: v1/view/settings_promotion.php:25 v2/App/Views/Admin/Tabs/settings.php:321
1853
  msgid "On each line item"
1854
  msgstr ""
1855
 
1856
- #: v1/view/settings_promotion.php:28 v2/App/Views/Admin/Tabs/settings.php:322
1857
  msgid "On after total"
1858
  msgstr ""
1859
 
1860
- #: v1/view/settings_promotion.php:31 v2/App/Views/Admin/Tabs/settings.php:323
1861
  msgid "Both in line item and after total"
1862
  msgstr ""
1863
 
1864
- #: v1/view/settings_promotion.php:39 v2/App/Views/Admin/Tabs/settings.php:330
1865
  msgid "Savings text to show"
1866
  msgstr ""
1867
 
@@ -1897,19 +1899,19 @@ msgid ""
1897
  "discounts)"
1898
  msgstr ""
1899
 
1900
- #: v1/view/settings_promotion.php:134 v2/App/Views/Admin/Tabs/settings.php:306
1901
  msgid "Shop page"
1902
  msgstr ""
1903
 
1904
- #: v1/view/settings_promotion.php:137 v2/App/Views/Admin/Tabs/settings.php:307
1905
  msgid "Product page"
1906
  msgstr ""
1907
 
1908
- #: v1/view/settings_promotion.php:140 v2/App/Views/Admin/Tabs/settings.php:308
1909
  msgid "Cart page"
1910
  msgstr ""
1911
 
1912
- #: v1/view/settings_promotion.php:143 v2/App/Views/Admin/Tabs/settings.php:309
1913
  msgid "Checkout page"
1914
  msgstr ""
1915
 
@@ -2073,7 +2075,7 @@ msgid "To"
2073
  msgstr ""
2074
 
2075
  #: v1/view/view-cart-rules.php:140 v1/view/view-pricing-rules.php:149
2076
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:132
2077
  #, php-format
2078
  msgid "Current date and time: %s"
2079
  msgstr ""
@@ -2627,7 +2629,7 @@ msgid "Copied!"
2627
  msgstr ""
2628
 
2629
  #: v2/App/Controllers/Admin/Settings.php:423
2630
- #: v2/App/Views/Admin/Tabs/settings.php:462
2631
  msgid "Copy ShortCode"
2632
  msgstr ""
2633
 
@@ -2648,7 +2650,7 @@ msgid "Filter (Buy)"
2648
  msgstr ""
2649
 
2650
  #: v2/App/Controllers/Admin/Settings.php:430
2651
- #: v2/App/Views/Admin/Rules/Manage.php:129
2652
  msgid "Filter"
2653
  msgstr ""
2654
 
@@ -2871,30 +2873,30 @@ msgstr ""
2871
  msgid "Product"
2872
  msgstr ""
2873
 
2874
- #: v2/App/Controllers/Base.php:190 v2/App/Views/Admin/Tabs/DiscountRule.php:189
2875
  msgid "Product Adjustment"
2876
  msgstr ""
2877
 
2878
- #: v2/App/Controllers/Base.php:191 v2/App/Controllers/Base.php:197
2879
  #: v2/App/Helpers/ProOptions.php:332
2880
  msgid "Simple Discount"
2881
  msgstr ""
2882
 
2883
- #: v2/App/Controllers/Base.php:196 v2/App/Views/Admin/Tabs/DiscountRule.php:192
2884
  msgid "Cart Adjustment"
2885
  msgstr ""
2886
 
2887
- #: v2/App/Controllers/Base.php:202 v2/App/Controllers/Base.php:203
2888
  #: v2/App/Helpers/ProOptions.php:338
2889
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:198
2890
  msgid "Bulk Discount"
2891
  msgstr ""
2892
 
2893
- #: v2/App/Controllers/ManageDiscount.php:584
2894
  msgid "cart discount"
2895
  msgstr ""
2896
 
2897
- #: v2/App/Controllers/ManageDiscount.php:781
2898
  msgid "Coupon code applied successfully."
2899
  msgstr ""
2900
 
@@ -3065,14 +3067,14 @@ msgid "Free Shipping - PRO -"
3065
  msgstr ""
3066
 
3067
  #: v2/App/Helpers/ProOptions.php:337
3068
- msgid "Set Discount - PRO -"
3069
  msgstr ""
3070
 
3071
- #: v2/App/Helpers/Rule.php:1129 v2/App/Helpers/Rule.php:1140
3072
  msgid "discount"
3073
  msgstr ""
3074
 
3075
- #: v2/App/Helpers/Rule.php:1200 v2/App/Helpers/Rule.php:1278
3076
  msgid "Untitled Rule"
3077
  msgstr ""
3078
 
@@ -3285,63 +3287,63 @@ msgid ""
3285
  "filters."
3286
  msgstr ""
3287
 
3288
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:20
3289
  msgid "Conditions Relationship "
3290
  msgstr ""
3291
 
3292
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:23
3293
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:110
3294
  msgid "Match All"
3295
  msgstr ""
3296
 
3297
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:25
3298
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:112
3299
  msgid "Many Any"
3300
  msgstr ""
3301
 
3302
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:72
3303
  #: v2/App/Views/Admin/Rules/Others/CommonTemplates.php:87
3304
  msgid "Condition Type"
3305
  msgstr ""
3306
 
3307
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:100
3308
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:120
3309
  msgid "Add condition"
3310
  msgstr ""
3311
 
3312
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:108
3313
  msgid "Conditions Relationship"
3314
  msgstr ""
3315
 
3316
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:130
3317
  msgid "Rule Limits"
3318
  msgstr ""
3319
 
3320
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:142
3321
  msgid "Unlimited"
3322
  msgstr ""
3323
 
3324
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:149
3325
  msgid "Maximum usage limit"
3326
  msgstr ""
3327
 
3328
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:157
3329
  msgid "Rule Vaild From"
3330
  msgstr ""
3331
 
3332
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:162
3333
  msgid "Vaild from"
3334
  msgstr ""
3335
 
3336
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:169
3337
  msgid "Rule Valid To"
3338
  msgstr ""
3339
 
3340
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:173
3341
  msgid "Vaild to"
3342
  msgstr ""
3343
 
3344
- #: v2/App/Views/Admin/Rules/Conditions/Main.php:184
3345
  msgid "Select values"
3346
  msgstr ""
3347
 
@@ -3362,7 +3364,7 @@ msgid "Preview"
3362
  msgstr ""
3363
 
3364
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:22
3365
- #: v2/App/Views/Admin/Tabs/settings.php:483
3366
  msgid "Note:"
3367
  msgstr ""
3368
 
@@ -3382,9 +3384,9 @@ msgstr ""
3382
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:71
3383
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:92
3384
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:126
3385
- #: v2/App/Views/Admin/Tabs/settings.php:379
3386
- #: v2/App/Views/Admin/Tabs/settings.php:388
3387
- #: v2/App/Views/Admin/Tabs/settings.php:451
3388
  msgid ""
3389
  "Unlock this feature by <a href='https://www.flycart.org/products/wordpress/"
3390
  "woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>"
@@ -3486,7 +3488,7 @@ msgid "Discount Type"
3486
  msgstr ""
3487
 
3488
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:65
3489
- #: v2/App/Views/Admin/Tabs/settings.php:549
3490
  msgid "Discount Value"
3491
  msgstr ""
3492
 
@@ -3649,21 +3651,25 @@ msgstr ""
3649
  msgid "Cancel"
3650
  msgstr ""
3651
 
3652
- #: v2/App/Views/Admin/Rules/Manage.php:92
 
 
 
 
3653
  msgid "Select Discount Type"
3654
  msgstr ""
3655
 
3656
- #: v2/App/Views/Admin/Rules/Manage.php:131
3657
  msgid ""
3658
  "Choose which <b>gets</b> discount (products/categories/attributes/SKU and so "
3659
  "on )"
3660
  msgstr ""
3661
 
3662
- #: v2/App/Views/Admin/Rules/Manage.php:132
3663
  msgid "Note : You can also exclude products/categories."
3664
  msgstr ""
3665
 
3666
- #: v2/App/Views/Admin/Rules/Manage.php:176
3667
  msgid "Select discount type and its value (percentage/price/fixed price)"
3668
  msgstr ""
3669
 
@@ -3947,7 +3953,7 @@ msgid "Show discount table on product page"
3947
  msgstr ""
3948
 
3949
  #: v2/App/Views/Admin/Tabs/settings.php:162
3950
- #: v2/App/Views/Admin/Tabs/settings.php:479
3951
  msgid "Customize Discount Table"
3952
  msgstr ""
3953
 
@@ -4037,219 +4043,230 @@ msgid "Discount label for combined discounts"
4037
  msgstr ""
4038
 
4039
  #: v2/App/Views/Admin/Tabs/settings.php:300
4040
- msgid "Subtotal based promo text"
4041
  msgstr ""
4042
 
4043
  #: v2/App/Views/Admin/Tabs/settings.php:301
4044
  msgid ""
 
 
 
 
 
 
 
 
 
 
 
4045
  "Subtotal based promo text (available only for subtotal based discounts) "
4046
  msgstr ""
4047
 
4048
- #: v2/App/Views/Admin/Tabs/settings.php:305
4049
  msgid "Select the page to display promotion message"
4050
  msgstr ""
4051
 
4052
- #: v2/App/Views/Admin/Tabs/settings.php:315
4053
  msgid "Display you saved text"
4054
  msgstr ""
4055
 
4056
- #: v2/App/Views/Admin/Tabs/settings.php:316
4057
  msgid "Display you saved text when rule applied"
4058
  msgstr ""
4059
 
4060
- #: v2/App/Views/Admin/Tabs/settings.php:331
4061
  msgid "You save text to show when rule applied"
4062
  msgstr ""
4063
 
4064
- #: v2/App/Views/Admin/Tabs/settings.php:340
4065
  msgid "Show a discount applied message on cart?"
4066
  msgstr ""
4067
 
4068
- #: v2/App/Views/Admin/Tabs/settings.php:341
4069
  msgid "Show message in cart page on rule applied"
4070
  msgstr ""
4071
 
4072
- #: v2/App/Views/Admin/Tabs/settings.php:357
4073
  msgid "Applied rule message text on cart"
4074
  msgstr ""
4075
 
4076
- #: v2/App/Views/Admin/Tabs/settings.php:358
4077
  msgid "Text to show when rule applied"
4078
  msgstr ""
4079
 
4080
- #: v2/App/Views/Admin/Tabs/settings.php:368
4081
  msgid "Banner"
4082
  msgstr ""
4083
 
4084
- #: v2/App/Views/Admin/Tabs/settings.php:375
4085
  msgid "Banner Content"
4086
  msgstr ""
4087
 
4088
- #: v2/App/Views/Admin/Tabs/settings.php:376
4089
  msgid ""
4090
  "A static banner you that you want to display in your storefront. <br><br> "
4091
  "<b>NOTE:</b> It is a static banner. You can use any content or html here."
4092
  msgstr ""
4093
 
4094
- #: v2/App/Views/Admin/Tabs/settings.php:385
4095
  msgid "Banner Content display position"
4096
  msgstr ""
4097
 
4098
- #: v2/App/Views/Admin/Tabs/settings.php:386
4099
  msgid "Choose a display position for the banner in your storefront"
4100
  msgstr ""
4101
 
4102
- #: v2/App/Views/Admin/Tabs/settings.php:397
4103
  msgid "On-Sale page"
4104
  msgstr ""
4105
 
4106
- #: v2/App/Views/Admin/Tabs/settings.php:403
4107
  msgid "Select rules for the On Sale Page"
4108
  msgstr ""
4109
 
4110
- #: v2/App/Views/Admin/Tabs/settings.php:416
4111
  msgid "Type the name of the rule to select it"
4112
  msgstr ""
4113
 
4114
- #: v2/App/Views/Admin/Tabs/settings.php:424
4115
  msgid "All active rules"
4116
  msgstr ""
4117
 
4118
- #: v2/App/Views/Admin/Tabs/settings.php:449
4119
  msgid "Save and Build Index"
4120
  msgstr ""
4121
 
4122
- #: v2/App/Views/Admin/Tabs/settings.php:459
4123
  msgid ""
4124
  "ShortCode to load all products which has discount through Woo Discount Rules"
4125
  msgstr ""
4126
 
4127
- #: v2/App/Views/Admin/Tabs/settings.php:482
4128
  msgid "Settings Saved"
4129
  msgstr ""
4130
 
4131
- #: v2/App/Views/Admin/Tabs/settings.php:483
4132
  msgid " This table contains sample content for design purpose."
4133
  msgstr ""
4134
 
4135
- #: v2/App/Views/Admin/Tabs/settings.php:493
4136
  msgid "Table Header"
4137
  msgstr ""
4138
 
4139
- #: v2/App/Views/Admin/Tabs/settings.php:494
4140
  msgid "Show/Hide table header column names"
4141
  msgstr ""
4142
 
4143
- #: v2/App/Views/Admin/Tabs/settings.php:507
4144
  msgid "Title column Name on table"
4145
  msgstr ""
4146
 
4147
- #: v2/App/Views/Admin/Tabs/settings.php:508
4148
  msgid "Give name for rule title column"
4149
  msgstr ""
4150
 
4151
- #: v2/App/Views/Admin/Tabs/settings.php:519
4152
  msgid "Discount column Name on table"
4153
  msgstr ""
4154
 
4155
- #: v2/App/Views/Admin/Tabs/settings.php:520
4156
  msgid "Give name for discount column"
4157
  msgstr ""
4158
 
4159
- #: v2/App/Views/Admin/Tabs/settings.php:531
4160
  msgid "Range column Name on table"
4161
  msgstr ""
4162
 
4163
- #: v2/App/Views/Admin/Tabs/settings.php:532
4164
  msgid "Give name for range column"
4165
  msgstr ""
4166
 
4167
- #: v2/App/Views/Admin/Tabs/settings.php:543
4168
  msgid "Discount column value on table"
4169
  msgstr ""
4170
 
4171
- #: v2/App/Views/Admin/Tabs/settings.php:544
4172
  msgid "Show Discount value/price in table"
4173
  msgstr ""
4174
 
4175
- #: v2/App/Views/Admin/Tabs/settings.php:552
4176
  msgid "Discounted Price"
4177
  msgstr ""
4178
 
4179
- #: v2/App/Views/Admin/Tabs/settings.php:627
4180
- #: v2/App/Views/Admin/Tabs/settings.php:650
4181
  msgid "Bulk Rule"
4182
  msgstr ""
4183
 
4184
- #: v2/App/Views/Admin/Tabs/settings.php:635
4185
- #: v2/App/Views/Admin/Tabs/settings.php:681
4186
- #: v2/App/Views/Admin/Tabs/settings.php:748
4187
  #: v2/App/Views/Templates/discount_table.php:113
4188
  msgid " flat"
4189
  msgstr ""
4190
 
4191
- #: v2/App/Views/Admin/Tabs/settings.php:641
4192
  msgid "1 - 5"
4193
  msgstr ""
4194
 
4195
- #: v2/App/Views/Admin/Tabs/settings.php:664
4196
  msgid "11 - 15"
4197
  msgstr ""
4198
 
4199
- #: v2/App/Views/Admin/Tabs/settings.php:673
4200
  msgid "Bulk Flat discount"
4201
  msgstr ""
4202
 
4203
- #: v2/App/Views/Admin/Tabs/settings.php:687
4204
  msgid "50 - 60"
4205
  msgstr ""
4206
 
4207
- #: v2/App/Views/Admin/Tabs/settings.php:696
4208
  msgid "Bulk percentage discount"
4209
  msgstr ""
4210
 
4211
- #: v2/App/Views/Admin/Tabs/settings.php:709
4212
  msgid "70 - 80"
4213
  msgstr ""
4214
 
4215
- #: v2/App/Views/Admin/Tabs/settings.php:718
4216
  #, php-format
4217
  msgid "Bulk % discount"
4218
  msgstr ""
4219
 
4220
- #: v2/App/Views/Admin/Tabs/settings.php:731
4221
  msgid "450 - 500"
4222
  msgstr ""
4223
 
4224
- #: v2/App/Views/Admin/Tabs/settings.php:740
4225
  msgid "Bulk flat"
4226
  msgstr ""
4227
 
4228
- #: v2/App/Views/Admin/Tabs/settings.php:754
4229
  msgid "600 - 700"
4230
  msgstr ""
4231
 
4232
- #: v2/App/Views/Admin/Tabs/settings.php:763
4233
  msgid "set percentage discount"
4234
  msgstr ""
4235
 
4236
- #: v2/App/Views/Admin/Tabs/settings.php:776
4237
  msgid "5"
4238
  msgstr ""
4239
 
4240
- #: v2/App/Views/Admin/Tabs/settings.php:785
4241
  msgid "Fixed discount for set"
4242
  msgstr ""
4243
 
4244
- #: v2/App/Views/Admin/Tabs/settings.php:798
4245
  msgid "10"
4246
  msgstr ""
4247
 
4248
- #: v2/App/Views/Admin/Tabs/settings.php:807
4249
  msgid "set flat discount"
4250
  msgstr ""
4251
 
4252
- #: v2/App/Views/Admin/Tabs/settings.php:820
4253
  msgid "15"
4254
  msgstr ""
4255
 
294
  #: v1/view/settings_promotion.php:22 v1/view/settings_promotion.php:62
295
  #: v1/view/settings_promotion.php:97 v1/view/settings_promotion.php:132
296
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:250
297
+ #: v2/App/Views/Admin/Tabs/settings.php:339
298
  msgid "Disabled"
299
  msgstr ""
300
 
756
  #: v1/includes/discount-base.php:1108 v1/view/settings_price_rules.php:208
757
  #: v1/view/settings_price_rules.php:226 v1/view/settings_price_rules.php:244
758
  #: v1/view/settings_price_rules.php:262
759
+ #: v2/App/Views/Admin/Tabs/settings.php:518
760
  msgid "Show"
761
  msgstr ""
762
 
994
  "defined in WooCommerce -> Attributes. <a href=\"%s\">Read docs</a>.</span>"
995
  msgstr ""
996
 
997
+ #: v1/includes/discount-base.php:1237 v2/App/Controllers/ManageDiscount.php:804
998
  #, php-format
999
  msgid ""
1000
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
1258
 
1259
  #: v1/view/cart-rules.php:104 v1/view/cart-rules.php:214
1260
  #: v1/view/pricing-rules.php:134 v1/view/pricing-rules.php:244
1261
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:199
1262
  msgid "Language"
1263
  msgstr ""
1264
 
1415
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1416
  #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:433
1417
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1418
+ #: v2/App/Views/Admin/Rules/Manage.php:175
1419
  msgid "Discount"
1420
  msgstr ""
1421
 
1597
  #: v2/App/Views/Admin/Tabs/settings.php:158
1598
  #: v2/App/Views/Admin/Tabs/settings.php:253
1599
  #: v2/App/Views/Admin/Tabs/settings.php:270
1600
+ #: v2/App/Views/Admin/Tabs/settings.php:308
1601
+ #: v2/App/Views/Admin/Tabs/settings.php:366
1602
  msgid "Yes"
1603
  msgstr ""
1604
 
1612
  #: v2/App/Views/Admin/Tabs/settings.php:161
1613
  #: v2/App/Views/Admin/Tabs/settings.php:257
1614
  #: v2/App/Views/Admin/Tabs/settings.php:276
1615
+ #: v2/App/Views/Admin/Tabs/settings.php:314
1616
+ #: v2/App/Views/Admin/Tabs/settings.php:371
1617
  msgid "No"
1618
  msgstr ""
1619
 
1742
  #: v1/view/settings_price_rules.php:137 v1/view/settings_price_rules.php:211
1743
  #: v1/view/settings_price_rules.php:229 v1/view/settings_price_rules.php:247
1744
  #: v1/view/settings_price_rules.php:265
1745
+ #: v2/App/Views/Admin/Tabs/settings.php:521
1746
  msgid "Don't Show"
1747
  msgstr ""
1748
 
1851
  msgid "Display savings text (for price rules)"
1852
  msgstr ""
1853
 
1854
+ #: v1/view/settings_promotion.php:25 v2/App/Views/Admin/Tabs/settings.php:340
1855
  msgid "On each line item"
1856
  msgstr ""
1857
 
1858
+ #: v1/view/settings_promotion.php:28 v2/App/Views/Admin/Tabs/settings.php:341
1859
  msgid "On after total"
1860
  msgstr ""
1861
 
1862
+ #: v1/view/settings_promotion.php:31 v2/App/Views/Admin/Tabs/settings.php:342
1863
  msgid "Both in line item and after total"
1864
  msgstr ""
1865
 
1866
+ #: v1/view/settings_promotion.php:39 v2/App/Views/Admin/Tabs/settings.php:349
1867
  msgid "Savings text to show"
1868
  msgstr ""
1869
 
1899
  "discounts)"
1900
  msgstr ""
1901
 
1902
+ #: v1/view/settings_promotion.php:134 v2/App/Views/Admin/Tabs/settings.php:325
1903
  msgid "Shop page"
1904
  msgstr ""
1905
 
1906
+ #: v1/view/settings_promotion.php:137 v2/App/Views/Admin/Tabs/settings.php:326
1907
  msgid "Product page"
1908
  msgstr ""
1909
 
1910
+ #: v1/view/settings_promotion.php:140 v2/App/Views/Admin/Tabs/settings.php:327
1911
  msgid "Cart page"
1912
  msgstr ""
1913
 
1914
+ #: v1/view/settings_promotion.php:143 v2/App/Views/Admin/Tabs/settings.php:328
1915
  msgid "Checkout page"
1916
  msgstr ""
1917
 
2075
  msgstr ""
2076
 
2077
  #: v1/view/view-cart-rules.php:140 v1/view/view-pricing-rules.php:149
2078
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:134
2079
  #, php-format
2080
  msgid "Current date and time: %s"
2081
  msgstr ""
2629
  msgstr ""
2630
 
2631
  #: v2/App/Controllers/Admin/Settings.php:423
2632
+ #: v2/App/Views/Admin/Tabs/settings.php:481
2633
  msgid "Copy ShortCode"
2634
  msgstr ""
2635
 
2650
  msgstr ""
2651
 
2652
  #: v2/App/Controllers/Admin/Settings.php:430
2653
+ #: v2/App/Views/Admin/Rules/Manage.php:130
2654
  msgid "Filter"
2655
  msgstr ""
2656
 
2873
  msgid "Product"
2874
  msgstr ""
2875
 
2876
+ #: v2/App/Controllers/Base.php:194 v2/App/Views/Admin/Tabs/DiscountRule.php:189
2877
  msgid "Product Adjustment"
2878
  msgstr ""
2879
 
2880
+ #: v2/App/Controllers/Base.php:195 v2/App/Controllers/Base.php:201
2881
  #: v2/App/Helpers/ProOptions.php:332
2882
  msgid "Simple Discount"
2883
  msgstr ""
2884
 
2885
+ #: v2/App/Controllers/Base.php:200 v2/App/Views/Admin/Tabs/DiscountRule.php:192
2886
  msgid "Cart Adjustment"
2887
  msgstr ""
2888
 
2889
+ #: v2/App/Controllers/Base.php:206 v2/App/Controllers/Base.php:207
2890
  #: v2/App/Helpers/ProOptions.php:338
2891
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:198
2892
  msgid "Bulk Discount"
2893
  msgstr ""
2894
 
2895
+ #: v2/App/Controllers/ManageDiscount.php:619
2896
  msgid "cart discount"
2897
  msgstr ""
2898
 
2899
+ #: v2/App/Controllers/ManageDiscount.php:818
2900
  msgid "Coupon code applied successfully."
2901
  msgstr ""
2902
 
3067
  msgstr ""
3068
 
3069
  #: v2/App/Helpers/ProOptions.php:337
3070
+ msgid "Bundle (Set) Discount - PRO -"
3071
  msgstr ""
3072
 
3073
+ #: v2/App/Helpers/Rule.php:1161 v2/App/Helpers/Rule.php:1172
3074
  msgid "discount"
3075
  msgstr ""
3076
 
3077
+ #: v2/App/Helpers/Rule.php:1232 v2/App/Helpers/Rule.php:1310
3078
  msgid "Untitled Rule"
3079
  msgstr ""
3080
 
3287
  "filters."
3288
  msgstr ""
3289
 
3290
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:21
3291
  msgid "Conditions Relationship "
3292
  msgstr ""
3293
 
3294
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:24
3295
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:112
3296
  msgid "Match All"
3297
  msgstr ""
3298
 
3299
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:26
3300
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:114
3301
  msgid "Many Any"
3302
  msgstr ""
3303
 
3304
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:74
3305
  #: v2/App/Views/Admin/Rules/Others/CommonTemplates.php:87
3306
  msgid "Condition Type"
3307
  msgstr ""
3308
 
3309
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:102
3310
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:122
3311
  msgid "Add condition"
3312
  msgstr ""
3313
 
3314
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:110
3315
  msgid "Conditions Relationship"
3316
  msgstr ""
3317
 
3318
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:132
3319
  msgid "Rule Limits"
3320
  msgstr ""
3321
 
3322
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:144
3323
  msgid "Unlimited"
3324
  msgstr ""
3325
 
3326
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:151
3327
  msgid "Maximum usage limit"
3328
  msgstr ""
3329
 
3330
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:159
3331
  msgid "Rule Vaild From"
3332
  msgstr ""
3333
 
3334
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:164
3335
  msgid "Vaild from"
3336
  msgstr ""
3337
 
3338
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:171
3339
  msgid "Rule Valid To"
3340
  msgstr ""
3341
 
3342
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:175
3343
  msgid "Vaild to"
3344
  msgstr ""
3345
 
3346
+ #: v2/App/Views/Admin/Rules/Conditions/Main.php:186
3347
  msgid "Select values"
3348
  msgstr ""
3349
 
3364
  msgstr ""
3365
 
3366
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:22
3367
+ #: v2/App/Views/Admin/Tabs/settings.php:502
3368
  msgid "Note:"
3369
  msgstr ""
3370
 
3384
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:71
3385
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:92
3386
  #: v2/App/Views/Admin/Rules/DiscountBatch/Main.php:126
3387
+ #: v2/App/Views/Admin/Tabs/settings.php:398
3388
+ #: v2/App/Views/Admin/Tabs/settings.php:407
3389
+ #: v2/App/Views/Admin/Tabs/settings.php:470
3390
  msgid ""
3391
  "Unlock this feature by <a href='https://www.flycart.org/products/wordpress/"
3392
  "woocommerce-discount-rules' target='_blank'>Upgrading to Pro</a>"
3488
  msgstr ""
3489
 
3490
  #: v2/App/Views/Admin/Rules/Discounts/Bulk.php:65
3491
+ #: v2/App/Views/Admin/Tabs/settings.php:568
3492
  msgid "Discount Value"
3493
  msgstr ""
3494
 
3651
  msgid "Cancel"
3652
  msgstr ""
3653
 
3654
+ #: v2/App/Views/Admin/Rules/Manage.php:89
3655
+ msgid "Choose a discount type"
3656
+ msgstr ""
3657
+
3658
+ #: v2/App/Views/Admin/Rules/Manage.php:93
3659
  msgid "Select Discount Type"
3660
  msgstr ""
3661
 
3662
+ #: v2/App/Views/Admin/Rules/Manage.php:132
3663
  msgid ""
3664
  "Choose which <b>gets</b> discount (products/categories/attributes/SKU and so "
3665
  "on )"
3666
  msgstr ""
3667
 
3668
+ #: v2/App/Views/Admin/Rules/Manage.php:133
3669
  msgid "Note : You can also exclude products/categories."
3670
  msgstr ""
3671
 
3672
+ #: v2/App/Views/Admin/Rules/Manage.php:177
3673
  msgid "Select discount type and its value (percentage/price/fixed price)"
3674
  msgstr ""
3675
 
3953
  msgstr ""
3954
 
3955
  #: v2/App/Views/Admin/Tabs/settings.php:162
3956
+ #: v2/App/Views/Admin/Tabs/settings.php:498
3957
  msgid "Customize Discount Table"
3958
  msgstr ""
3959
 
4043
  msgstr ""
4044
 
4045
  #: v2/App/Views/Admin/Tabs/settings.php:300
4046
+ msgid "Subtotal based promotion"
4047
  msgstr ""
4048
 
4049
  #: v2/App/Views/Admin/Tabs/settings.php:301
4050
  msgid ""
4051
+ "Display subtotal based promotion messages in cart/product/shop pages<br>If "
4052
+ "enabled an option to add promotion message will displays on each rule(when "
4053
+ "subtotal condition is added)"
4054
+ msgstr ""
4055
+
4056
+ #: v2/App/Views/Admin/Tabs/settings.php:319
4057
+ msgid "Subtotal based promo text"
4058
+ msgstr ""
4059
+
4060
+ #: v2/App/Views/Admin/Tabs/settings.php:320
4061
+ msgid ""
4062
  "Subtotal based promo text (available only for subtotal based discounts) "
4063
  msgstr ""
4064
 
4065
+ #: v2/App/Views/Admin/Tabs/settings.php:324
4066
  msgid "Select the page to display promotion message"
4067
  msgstr ""
4068
 
4069
+ #: v2/App/Views/Admin/Tabs/settings.php:334
4070
  msgid "Display you saved text"
4071
  msgstr ""
4072
 
4073
+ #: v2/App/Views/Admin/Tabs/settings.php:335
4074
  msgid "Display you saved text when rule applied"
4075
  msgstr ""
4076
 
4077
+ #: v2/App/Views/Admin/Tabs/settings.php:350
4078
  msgid "You save text to show when rule applied"
4079
  msgstr ""
4080
 
4081
+ #: v2/App/Views/Admin/Tabs/settings.php:359
4082
  msgid "Show a discount applied message on cart?"
4083
  msgstr ""
4084
 
4085
+ #: v2/App/Views/Admin/Tabs/settings.php:360
4086
  msgid "Show message in cart page on rule applied"
4087
  msgstr ""
4088
 
4089
+ #: v2/App/Views/Admin/Tabs/settings.php:376
4090
  msgid "Applied rule message text on cart"
4091
  msgstr ""
4092
 
4093
+ #: v2/App/Views/Admin/Tabs/settings.php:377
4094
  msgid "Text to show when rule applied"
4095
  msgstr ""
4096
 
4097
+ #: v2/App/Views/Admin/Tabs/settings.php:387
4098
  msgid "Banner"
4099
  msgstr ""
4100
 
4101
+ #: v2/App/Views/Admin/Tabs/settings.php:394
4102
  msgid "Banner Content"
4103
  msgstr ""
4104
 
4105
+ #: v2/App/Views/Admin/Tabs/settings.php:395
4106
  msgid ""
4107
  "A static banner you that you want to display in your storefront. <br><br> "
4108
  "<b>NOTE:</b> It is a static banner. You can use any content or html here."
4109
  msgstr ""
4110
 
4111
+ #: v2/App/Views/Admin/Tabs/settings.php:404
4112
  msgid "Banner Content display position"
4113
  msgstr ""
4114
 
4115
+ #: v2/App/Views/Admin/Tabs/settings.php:405
4116
  msgid "Choose a display position for the banner in your storefront"
4117
  msgstr ""
4118
 
4119
+ #: v2/App/Views/Admin/Tabs/settings.php:416
4120
  msgid "On-Sale page"
4121
  msgstr ""
4122
 
4123
+ #: v2/App/Views/Admin/Tabs/settings.php:422
4124
  msgid "Select rules for the On Sale Page"
4125
  msgstr ""
4126
 
4127
+ #: v2/App/Views/Admin/Tabs/settings.php:435
4128
  msgid "Type the name of the rule to select it"
4129
  msgstr ""
4130
 
4131
+ #: v2/App/Views/Admin/Tabs/settings.php:443
4132
  msgid "All active rules"
4133
  msgstr ""
4134
 
4135
+ #: v2/App/Views/Admin/Tabs/settings.php:468
4136
  msgid "Save and Build Index"
4137
  msgstr ""
4138
 
4139
+ #: v2/App/Views/Admin/Tabs/settings.php:478
4140
  msgid ""
4141
  "ShortCode to load all products which has discount through Woo Discount Rules"
4142
  msgstr ""
4143
 
4144
+ #: v2/App/Views/Admin/Tabs/settings.php:501
4145
  msgid "Settings Saved"
4146
  msgstr ""
4147
 
4148
+ #: v2/App/Views/Admin/Tabs/settings.php:502
4149
  msgid " This table contains sample content for design purpose."
4150
  msgstr ""
4151
 
4152
+ #: v2/App/Views/Admin/Tabs/settings.php:512
4153
  msgid "Table Header"
4154
  msgstr ""
4155
 
4156
+ #: v2/App/Views/Admin/Tabs/settings.php:513
4157
  msgid "Show/Hide table header column names"
4158
  msgstr ""
4159
 
4160
+ #: v2/App/Views/Admin/Tabs/settings.php:526
4161
  msgid "Title column Name on table"
4162
  msgstr ""
4163
 
4164
+ #: v2/App/Views/Admin/Tabs/settings.php:527
4165
  msgid "Give name for rule title column"
4166
  msgstr ""
4167
 
4168
+ #: v2/App/Views/Admin/Tabs/settings.php:538
4169
  msgid "Discount column Name on table"
4170
  msgstr ""
4171
 
4172
+ #: v2/App/Views/Admin/Tabs/settings.php:539
4173
  msgid "Give name for discount column"
4174
  msgstr ""
4175
 
4176
+ #: v2/App/Views/Admin/Tabs/settings.php:550
4177
  msgid "Range column Name on table"
4178
  msgstr ""
4179
 
4180
+ #: v2/App/Views/Admin/Tabs/settings.php:551
4181
  msgid "Give name for range column"
4182
  msgstr ""
4183
 
4184
+ #: v2/App/Views/Admin/Tabs/settings.php:562
4185
  msgid "Discount column value on table"
4186
  msgstr ""
4187
 
4188
+ #: v2/App/Views/Admin/Tabs/settings.php:563
4189
  msgid "Show Discount value/price in table"
4190
  msgstr ""
4191
 
4192
+ #: v2/App/Views/Admin/Tabs/settings.php:571
4193
  msgid "Discounted Price"
4194
  msgstr ""
4195
 
4196
+ #: v2/App/Views/Admin/Tabs/settings.php:646
4197
+ #: v2/App/Views/Admin/Tabs/settings.php:669
4198
  msgid "Bulk Rule"
4199
  msgstr ""
4200
 
4201
+ #: v2/App/Views/Admin/Tabs/settings.php:654
4202
+ #: v2/App/Views/Admin/Tabs/settings.php:700
4203
+ #: v2/App/Views/Admin/Tabs/settings.php:767
4204
  #: v2/App/Views/Templates/discount_table.php:113
4205
  msgid " flat"
4206
  msgstr ""
4207
 
4208
+ #: v2/App/Views/Admin/Tabs/settings.php:660
4209
  msgid "1 - 5"
4210
  msgstr ""
4211
 
4212
+ #: v2/App/Views/Admin/Tabs/settings.php:683
4213
  msgid "11 - 15"
4214
  msgstr ""
4215
 
4216
+ #: v2/App/Views/Admin/Tabs/settings.php:692
4217
  msgid "Bulk Flat discount"
4218
  msgstr ""
4219
 
4220
+ #: v2/App/Views/Admin/Tabs/settings.php:706
4221
  msgid "50 - 60"
4222
  msgstr ""
4223
 
4224
+ #: v2/App/Views/Admin/Tabs/settings.php:715
4225
  msgid "Bulk percentage discount"
4226
  msgstr ""
4227
 
4228
+ #: v2/App/Views/Admin/Tabs/settings.php:728
4229
  msgid "70 - 80"
4230
  msgstr ""
4231
 
4232
+ #: v2/App/Views/Admin/Tabs/settings.php:737
4233
  #, php-format
4234
  msgid "Bulk % discount"
4235
  msgstr ""
4236
 
4237
+ #: v2/App/Views/Admin/Tabs/settings.php:750
4238
  msgid "450 - 500"
4239
  msgstr ""
4240
 
4241
+ #: v2/App/Views/Admin/Tabs/settings.php:759
4242
  msgid "Bulk flat"
4243
  msgstr ""
4244
 
4245
+ #: v2/App/Views/Admin/Tabs/settings.php:773
4246
  msgid "600 - 700"
4247
  msgstr ""
4248
 
4249
+ #: v2/App/Views/Admin/Tabs/settings.php:782
4250
  msgid "set percentage discount"
4251
  msgstr ""
4252
 
4253
+ #: v2/App/Views/Admin/Tabs/settings.php:795
4254
  msgid "5"
4255
  msgstr ""
4256
 
4257
+ #: v2/App/Views/Admin/Tabs/settings.php:804
4258
  msgid "Fixed discount for set"
4259
  msgstr ""
4260
 
4261
+ #: v2/App/Views/Admin/Tabs/settings.php:817
4262
  msgid "10"
4263
  msgstr ""
4264
 
4265
+ #: v2/App/Views/Admin/Tabs/settings.php:826
4266
  msgid "set flat discount"
4267
  msgstr ""
4268
 
4269
+ #: v2/App/Views/Admin/Tabs/settings.php:839
4270
  msgid "15"
4271
  msgstr ""
4272
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flycart.org/
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
  Tested up to: 5.4
7
- Stable tag: 1.9.10
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -336,6 +336,14 @@ Discount - Enter minimum & Maximum quantity -> Adjustment Type -> Product Discou
336
 
337
  == Changelog ==
338
 
 
 
 
 
 
 
 
 
339
  = 1.9.10 - 10/06/20 =
340
  * Fix - Showing duplicate strikeout.
341
  * Fix - Showing discount table even the rule disabled.
4
  Tags: woocommerce, coupons, discounts, dynamic pricing, Buy One Get One Free, pricing deals, bulk discount, discount
5
  Requires at least: 4.4.1
6
  Tested up to: 5.4
7
+ Stable tag: 1.9.11
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
336
 
337
  == Changelog ==
338
 
339
+ = 1.9.11 - 17/06/20 =
340
+ * Fix - Custom taxonomy doesn't works with conditions.
341
+ * Fix - Email based rule doesn't works with User role on OR condition.
342
+ * Fix - Subtotal based promotion Price is not correct when we give subtotal as decimal value.
343
+ * Fix - Loading strikeout even the rule reached the usage limit.
344
+ * Feature - On sale include/exclude condition for Free shipping discount type.
345
+ * Improvement - Subtotal based promotion enable/disable option
346
+
347
  = 1.9.10 - 10/06/20 =
348
  * Fix - Showing duplicate strikeout.
349
  * Fix - Showing discount table even the rule disabled.
v2/App/Conditions/CartLineItemsCount.php CHANGED
@@ -24,7 +24,7 @@ class CartLineItemsCount extends Base
24
  }
25
  if (isset($options->operator) && $options->value) {
26
  $operator = sanitize_text_field($options->operator);
27
- $value = sanitize_key($options->value);
28
  if($options->calculate_from == 'from_filter'){
29
  $line_items = DiscountCalculator::getFilterBasedCartQuantities('cart_line_items_count', $this->rule);
30
  }else{
24
  }
25
  if (isset($options->operator) && $options->value) {
26
  $operator = sanitize_text_field($options->operator);
27
+ $value = $options->value;
28
  if($options->calculate_from == 'from_filter'){
29
  $line_items = DiscountCalculator::getFilterBasedCartQuantities('cart_line_items_count', $this->rule);
30
  }else{
v2/App/Conditions/CartSubTotal.php CHANGED
@@ -45,7 +45,7 @@ class CartSubTotal extends Base
45
  }
46
  if (isset($options->operator) && $options->value) {
47
  $operator = sanitize_text_field($options->operator);
48
- $value = sanitize_key($options->value);
49
  $status = $this->doComparisionOperation($operator, $cart_sub_total, $value);
50
  if(!$status){
51
  $this->processPromotion($operator, $options, $cart_sub_total, $value);
45
  }
46
  if (isset($options->operator) && $options->value) {
47
  $operator = sanitize_text_field($options->operator);
48
+ $value = $options->value;
49
  $status = $this->doComparisionOperation($operator, $cart_sub_total, $value);
50
  if(!$status){
51
  $this->processPromotion($operator, $options, $cart_sub_total, $value);
v2/App/Controllers/Admin/Settings.php CHANGED
@@ -222,7 +222,7 @@ class Settings extends Base
222
  'lists' => $preloaded_lists,
223
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
224
  'localization_data' => $localization_data,
225
- 'enable_subtotal_promo_text' => $conig->getConfig('show_promo_text', ''),
226
  'rule_id' => $this->input->get('task', 'create'),
227
  );
228
  wp_localize_script(WDR_SLUG . '-admin', 'wdr_data', $wdr_data);
222
  'lists' => $preloaded_lists,
223
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
224
  'localization_data' => $localization_data,
225
+ 'enable_subtotal_promo_text' => $conig->getConfig('show_subtotal_promotion', ''),
226
  'rule_id' => $this->input->get('task', 'create'),
227
  );
228
  wp_localize_script(WDR_SLUG . '-admin', 'wdr_data', $wdr_data);
v2/App/Controllers/Base.php CHANGED
@@ -149,10 +149,14 @@ class Base
149
  {
150
  $sortedConditionsTypes = $cart_item_condition = $billing = $customer = array();
151
  $ruleConditionsTypes = array();
 
152
  foreach ($this->available_conditions as $condition_key => $condition_item) {
153
- $group = $condition_item['group'];
154
  $ruleConditionsTypes[$group][$condition_key] = $condition_item;
155
  }
 
 
 
156
  foreach ($ruleConditionsTypes as $key => $options){
157
  if(!empty($options) && is_array($options)) {
158
  if ($key === "Cart") {
149
  {
150
  $sortedConditionsTypes = $cart_item_condition = $billing = $customer = array();
151
  $ruleConditionsTypes = array();
152
+
153
  foreach ($this->available_conditions as $condition_key => $condition_item) {
154
+ $group = empty($condition_item['group']) ? 'remove_index' : $condition_item['group'];
155
  $ruleConditionsTypes[$group][$condition_key] = $condition_item;
156
  }
157
+ if(isset($ruleConditionsTypes['remove_index'])){
158
+ unset($ruleConditionsTypes['remove_index']);
159
+ }
160
  foreach ($ruleConditionsTypes as $key => $options){
161
  if(!empty($options) && is_array($options)) {
162
  if ($key === "Cart") {
v2/App/Controllers/ManageDiscount.php CHANGED
@@ -204,7 +204,7 @@ class ManageDiscount extends Base
204
  }
205
  if ($ajax_price) {
206
  $price_html = $initial_price_html;
207
- if(!$price_html || empty($product_price) || !$product_price){
208
  return false;
209
  }
210
  }
204
  }
205
  if ($ajax_price) {
206
  $price_html = $initial_price_html;
207
+ if(!$price_html){
208
  return false;
209
  }
210
  }
v2/App/Helpers/Rule.php CHANGED
@@ -377,7 +377,8 @@ class Rule
377
  $filter_helper = new Filter();
378
  $filter_passed = $filter_helper->matchFilters($product, $filters, $sale_badge);
379
  $conditions = $this->getConditions();
380
- $filter_passed_user_role = $filter_passed_user_list = $user_role_passed = $user_list_passed = false;
 
381
  if($filter_passed){
382
  if(!empty($conditions)){
383
  foreach($conditions as $condition){
@@ -398,12 +399,22 @@ class Rule
398
  $filter_passed_user_list = $this->available_conditions[$condition_type]['object']->check($cart, $options);
399
  }
400
  }
 
 
 
401
  }
402
  }
403
  if($user_role_passed || $user_list_passed){
404
  if($filter_passed_user_role || $filter_passed_user_list){
405
  } else {
406
- $filter_passed = false;
 
 
 
 
 
 
 
407
  }
408
  }
409
  }
@@ -1015,19 +1026,41 @@ class Rule
1015
  if (!empty($type) && !empty($options)) {
1016
  //if condition available, then check the cart against the condition
1017
  if (isset($this->available_conditions[$type]['object'])) {
1018
- $this->available_conditions[$type]['object']->rule = $this;
1019
- $is_condition_passed = $this->available_conditions[$type]['object']->check($cart, $options);
1020
-
 
 
 
 
 
 
 
1021
  }elseif(!isset($this->available_conditions[$type]['object'])){
1022
- $object_not_available = apply_filters('advanced_woo_discount_rules_condition_object_not_available', false, $cart, $this, $condition_relationship);
1023
- if($object_not_available){
1024
- $is_condition_passed = apply_filters('advanced_woo_discount_rules_set_condition_status', false, $cart, $this, $condition_relationship);
 
 
 
 
 
 
 
 
 
 
 
 
 
1025
  }else{
1026
- continue;
 
 
 
 
 
1027
  }
1028
- } elseif (isset($this->available_conditions['cart_item_products_taxonomy']['object'])) {
1029
- $this->available_conditions['cart_item_products_taxonomy']['object']->rule = $this;
1030
- $is_condition_passed = $this->available_conditions['cart_item_products_taxonomy']['object']->check($cart, $options);
1031
  } else {
1032
  $is_condition_passed = false;
1033
  }
@@ -1043,15 +1076,9 @@ class Rule
1043
  if (isset($is_condition_passed) && !$is_condition_passed) {
1044
  $conditions_result[] = false;
1045
  }
1046
-
1047
- } else {
1048
- //echo "<pre>"; var_dump($is_condition_passed); echo "</pre>";
1049
- //return false when particular condition not available
1050
- return false;
1051
  }
1052
  }
1053
  }
1054
-
1055
  if (in_array(false, $conditions_result)) {
1056
  return false;
1057
  }
377
  $filter_helper = new Filter();
378
  $filter_passed = $filter_helper->matchFilters($product, $filters, $sale_badge);
379
  $conditions = $this->getConditions();
380
+ $filter_passed_user_role = $filter_passed_user_list = $user_role_passed = $user_list_passed = $has_other_conditions = false;
381
+ $condition_relationship = $this->getRelationship('condition', 'and');
382
  if($filter_passed){
383
  if(!empty($conditions)){
384
  foreach($conditions as $condition){
399
  $filter_passed_user_list = $this->available_conditions[$condition_type]['object']->check($cart, $options);
400
  }
401
  }
402
+ if( !empty($condition_type) && !in_array($condition_type, array('user_role', 'user_list'))){
403
+ $has_other_conditions = true;
404
+ }
405
  }
406
  }
407
  if($user_role_passed || $user_list_passed){
408
  if($filter_passed_user_role || $filter_passed_user_list){
409
  } else {
410
+ if($condition_relationship == 'or'){
411
+ if($has_other_conditions){
412
+ } else {
413
+ $filter_passed = false;
414
+ }
415
+ } else {
416
+ $filter_passed = false;
417
+ }
418
  }
419
  }
420
  }
1026
  if (!empty($type) && !empty($options)) {
1027
  //if condition available, then check the cart against the condition
1028
  if (isset($this->available_conditions[$type]['object'])) {
1029
+ if(is_object($this->available_conditions[$type]['object'])){
1030
+ $this->available_conditions[$type]['object']->rule = $this;
1031
+ if(method_exists($this->available_conditions[$type]['object'], 'check')){
1032
+ $is_condition_passed = $this->available_conditions[$type]['object']->check($cart, $options);
1033
+ } else {
1034
+ $is_condition_passed = false;
1035
+ }
1036
+ } else {
1037
+ $is_condition_passed = false;
1038
+ }
1039
  }elseif(!isset($this->available_conditions[$type]['object'])){
1040
+ $is_custom_taxonomy = strpos($type, "wdr_cart_item_"); //wdr_cart_item_
1041
+ if ( $is_custom_taxonomy === (int) 0 && $is_custom_taxonomy !== false && isset($this->available_conditions['cart_item_products_taxonomy']['object'])) {
1042
+ $custom_taxonomy = str_replace("wdr_cart_item_", "", $type);
1043
+ if(is_object($this->available_conditions['cart_item_products_taxonomy']['object'])){
1044
+ $this->available_conditions['cart_item_products_taxonomy']['object']->rule = $this;
1045
+ if(method_exists($this->available_conditions['cart_item_products_taxonomy']['object'], 'check')){
1046
+ $options = (array)$options;
1047
+ $options['custom_taxonomy'] = $custom_taxonomy;
1048
+ $options = (object)$options;
1049
+ $is_condition_passed = $this->available_conditions['cart_item_products_taxonomy']['object']->check($cart, $options);
1050
+ } else {
1051
+ $is_condition_passed = false;
1052
+ }
1053
+ } else {
1054
+ $is_condition_passed = false;
1055
+ }
1056
  }else{
1057
+ $object_not_available = apply_filters('advanced_woo_discount_rules_condition_object_not_available', false, $cart, $this, $condition_relationship);
1058
+ if($object_not_available){
1059
+ $is_condition_passed = apply_filters('advanced_woo_discount_rules_set_condition_status', false, $cart, $this, $condition_relationship);
1060
+ }else{
1061
+ continue;
1062
+ }
1063
  }
 
 
 
1064
  } else {
1065
  $is_condition_passed = false;
1066
  }
1076
  if (isset($is_condition_passed) && !$is_condition_passed) {
1077
  $conditions_result[] = false;
1078
  }
 
 
 
 
 
1079
  }
1080
  }
1081
  }
 
1082
  if (in_array(false, $conditions_result)) {
1083
  return false;
1084
  }
v2/App/Models/DBTable.php CHANGED
@@ -117,6 +117,33 @@ class DBTable
117
  }
118
  }
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  /**
121
  * get all available rules
122
  * @param null $rule_id
@@ -128,10 +155,13 @@ class DBTable
128
  {
129
  global $wpdb;
130
  $rules_table_name = $wpdb->prefix . self::RULES_TABLE_NAME;
 
 
 
131
  /**
132
  * Need for Frontend
133
  */
134
- if (!is_admin()) {
135
  if(isset(self::$rules['front_end']) && $cache === true){
136
  return self::$rules['front_end'];
137
  }
@@ -361,7 +391,7 @@ class DBTable
361
  */
362
  public function updateTable(){
363
  //Version of currently activated plugin
364
- $current_version = '1.9.10';
365
  //Database version - this may need upgrading.
366
  $installed_version = get_option('awdr_activity_log_version');
367
  if( $installed_version != $current_version ){
117
  }
118
  }
119
 
120
+ protected static function isFrontEndRequest(){
121
+ $is_front_end_request = false;
122
+ if(is_ajax()){
123
+ $is_front_end_request = true;
124
+ if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'wdr_ajax'){
125
+ $wdr_ajax_methods = array('get_price_html');
126
+ $wdr_ajax_methods = apply_filters('advanced_woo_discount_rules_wdr_ajax_methods_for_frontend', $wdr_ajax_methods);
127
+ if(isset($_REQUEST['method']) && is_array($wdr_ajax_methods) && !empty($wdr_ajax_methods)){
128
+ if(!in_array($_REQUEST['method'], $wdr_ajax_methods)){
129
+ $is_front_end_request = false;
130
+ }
131
+ }
132
+ }
133
+ $back_end_ajax_actions = array();
134
+ $back_end_ajax_actions = apply_filters('advanced_woo_discount_rules_backend_end_ajax_actions', $back_end_ajax_actions);
135
+ if(!empty($back_end_ajax_actions) && is_array($back_end_ajax_actions)){
136
+ if(isset($_REQUEST['action'])){
137
+ if(in_array($_REQUEST['action'], $back_end_ajax_actions)){
138
+ $is_front_end_request = false;
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ return apply_filters('advanced_woo_discount_rules_is_front_end_request_for_fetching_rules', $is_front_end_request);
145
+ }
146
+
147
  /**
148
  * get all available rules
149
  * @param null $rule_id
155
  {
156
  global $wpdb;
157
  $rules_table_name = $wpdb->prefix . self::RULES_TABLE_NAME;
158
+
159
+ $is_front_end_request = self::isFrontEndRequest();
160
+
161
  /**
162
  * Need for Frontend
163
  */
164
+ if (!is_admin() || $is_front_end_request) {
165
  if(isset(self::$rules['front_end']) && $cache === true){
166
  return self::$rules['front_end'];
167
  }
391
  */
392
  public function updateTable(){
393
  //Version of currently activated plugin
394
+ $current_version = '1.9.11';
395
  //Database version - this may need upgrading.
396
  $installed_version = get_option('awdr_activity_log_version');
397
  if( $installed_version != $current_version ){
v2/App/Router.php CHANGED
@@ -78,20 +78,23 @@ class Router
78
  }
79
  }
80
 
81
- $show_promo_message = $manage_discount_class::$config->getConfig('show_promo_text', '');
82
- if(!empty($show_promo_message) && is_array($show_promo_message)){
83
- if(in_array('shop_page', $show_promo_message)){
84
- add_action('woocommerce_before_shop_loop', array(self::$manage_discount, 'displayPromotionMessages'), 10);
85
- }
86
- if(in_array('product_page', $show_promo_message)){
87
- add_action('woocommerce_before_single_product', array(self::$manage_discount, 'displayPromotionMessages'), 10);
88
- }
89
- if(in_array('cart_page', $show_promo_message)){
90
- add_action('woocommerce_before_cart', array(self::$manage_discount, 'displayPromotionMessages'), 10);
91
- }
92
- if(in_array('checkout_page', $show_promo_message)){
93
- add_action('woocommerce_before_checkout_form', array(self::$manage_discount, 'displaySubTotalPromotionMessagesInCheckoutContainer'), 10);
94
- add_action('woocommerce_review_order_before_cart_contents', array(self::$manage_discount, 'displaySubTotalPromotionMessagesInCheckout'), 10);
 
 
 
95
  }
96
  }
97
 
78
  }
79
  }
80
 
81
+ $show_subtotal_promotion = $manage_discount_class::$config->getConfig('show_subtotal_promotion', '');
82
+ if($show_subtotal_promotion == 1){
83
+ $show_promo_message = $manage_discount_class::$config->getConfig('show_promo_text', '');
84
+ if(!empty($show_promo_message) && is_array($show_promo_message)){
85
+ if(in_array('shop_page', $show_promo_message)){
86
+ add_action('woocommerce_before_shop_loop', array(self::$manage_discount, 'displayPromotionMessages'), 10);
87
+ }
88
+ if(in_array('product_page', $show_promo_message)){
89
+ add_action('woocommerce_before_single_product', array(self::$manage_discount, 'displayPromotionMessages'), 10);
90
+ }
91
+ if(in_array('cart_page', $show_promo_message)){
92
+ add_action('woocommerce_before_cart', array(self::$manage_discount, 'displayPromotionMessages'), 10);
93
+ }
94
+ if(in_array('checkout_page', $show_promo_message)){
95
+ add_action('woocommerce_before_checkout_form', array(self::$manage_discount, 'displaySubTotalPromotionMessagesInCheckoutContainer'), 10);
96
+ add_action('woocommerce_review_order_before_cart_contents', array(self::$manage_discount, 'displaySubTotalPromotionMessagesInCheckout'), 10);
97
+ }
98
  }
99
  }
100
 
v2/App/Views/Admin/Rules/Conditions/Main.php CHANGED
@@ -12,7 +12,8 @@ if (!defined('ABSPATH')) {
12
  <div class="wdr-rule-options-con"><?php
13
  if ($conditions = $rule->getConditions()) {
14
  $condition_relationship = $rule->getRelationship('condition', 'and');
15
- $wdr_product_conditions = $base->getProductConditionsTypes();?>
 
16
  <!--Product Condition Start promo_show_hide_-->
17
  <div class="wdr-condition-template">
18
  <div class="wdr-block">
@@ -31,7 +32,9 @@ if (!defined('ABSPATH')) {
31
  $render_saved_condition = false;
32
  foreach ($conditions as $condition) {
33
  $type = isset($condition->type) ? $condition->type : NULL;
34
- //echo "<pre>"; print_r($type); echo "</pre>"; die;
 
 
35
  if (!empty($type) && isset($rule->available_conditions[$type]['object'])) {
36
  $template = $rule->available_conditions[$type]['template'];
37
  $extra_params = isset($rule->available_conditions[$type]['extra_params']) ? $rule->available_conditions[$type]['extra_params'] : array();
@@ -47,9 +50,8 @@ if (!defined('ABSPATH')) {
47
  ?>
48
  <optgroup
49
  label="<?php _e($wdr_condition_key, WDR_TEXT_DOMAIN); ?>"><?php
50
- foreach ($wdr_condition_value as $key => $value) {
51
- ?>
52
- <option
53
  <?php
54
  if(isset($value['enable']) && $value['enable'] === false){
55
  ?>
@@ -81,8 +83,8 @@ if (!defined('ABSPATH')) {
81
  </div>
82
  </div><?php
83
  $config = new \Wdr\App\Controllers\Configuration();
84
- $subtotal_promo = $config->getConfig("show_promo_text", '');
85
- if($type == 'cart_subtotal' && !empty($subtotal_promo)){
86
  $operator = isset($options->operator) ? $options->operator : 'less_than';?>
87
  <div class="wdr-grid wdr-conditions-container wdr-condition-group <?php echo 'promo_show_hide_'.$i; ?>" data-index="<?php echo $i; ?>" style="<?php echo ($operator == 'greater_than_or_equal' || $operator == 'greater_than') ? '': 'display: none'; ?>">
88
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
12
  <div class="wdr-rule-options-con"><?php
13
  if ($conditions = $rule->getConditions()) {
14
  $condition_relationship = $rule->getRelationship('condition', 'and');
15
+ $wdr_product_conditions = $base->getProductConditionsTypes();
16
+ $awdr_discount_type = $rule->getRuleDiscountType();?>
17
  <!--Product Condition Start promo_show_hide_-->
18
  <div class="wdr-condition-template">
19
  <div class="wdr-block">
32
  $render_saved_condition = false;
33
  foreach ($conditions as $condition) {
34
  $type = isset($condition->type) ? $condition->type : NULL;
35
+ if($awdr_discount_type != 'wdr_free_shipping' && $type == 'cart_item_product_onsale'){
36
+ continue;
37
+ }
38
  if (!empty($type) && isset($rule->available_conditions[$type]['object'])) {
39
  $template = $rule->available_conditions[$type]['template'];
40
  $extra_params = isset($rule->available_conditions[$type]['extra_params']) ? $rule->available_conditions[$type]['extra_params'] : array();
50
  ?>
51
  <optgroup
52
  label="<?php _e($wdr_condition_key, WDR_TEXT_DOMAIN); ?>"><?php
53
+ foreach ($wdr_condition_value as $key => $value) {?>
54
+ <option class="<?php echo ($awdr_discount_type != 'wdr_free_shipping' && $key == 'cart_item_product_onsale') ? 'wdr-hide awdr-free-shipping-special-condition' : 'awdr-free-shipping-special-condition'; ?>"
 
55
  <?php
56
  if(isset($value['enable']) && $value['enable'] === false){
57
  ?>
83
  </div>
84
  </div><?php
85
  $config = new \Wdr\App\Controllers\Configuration();
86
+ $subtotal_promo = $config->getConfig("show_subtotal_promotion", '');
87
+ if($type == 'cart_subtotal' && $subtotal_promo == 1){
88
  $operator = isset($options->operator) ? $options->operator : 'less_than';?>
89
  <div class="wdr-grid wdr-conditions-container wdr-condition-group <?php echo 'promo_show_hide_'.$i; ?>" data-index="<?php echo $i; ?>" style="<?php echo ($operator == 'greater_than_or_equal' || $operator == 'greater_than') ? '': 'display: none'; ?>">
90
  <?php include(WDR_PLUGIN_PATH . 'App/Views/Admin/Rules/Others/SubtotalPromotion.php'); ?>
v2/App/Views/Admin/Rules/Others/CommonTemplates.php CHANGED
@@ -64,7 +64,7 @@ if (!defined('ABSPATH')) {
64
  <optgroup label="<?php echo $wdr_condition_key; ?>"><?php
65
  foreach ($wdr_condition_value as $key => $value) {
66
  ?>
67
- <option
68
  <?php
69
  if(isset($value['enable']) && $value['enable'] === false){
70
  ?>
64
  <optgroup label="<?php echo $wdr_condition_key; ?>"><?php
65
  foreach ($wdr_condition_value as $key => $value) {
66
  ?>
67
+ <option class="<?php echo ( $key == 'cart_item_product_onsale') ? 'wdr-hide awdr-free-shipping-special-condition' : ''; ?>"
68
  <?php
69
  if(isset($value['enable']) && $value['enable'] === false){
70
  ?>
v2/App/Views/Admin/Tabs/settings.php CHANGED
@@ -296,6 +296,25 @@
296
  <table class="wdr-general-setting form-table">
297
  <tbody style="background-color: #fff;">
298
  <tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  <td scope="row">
300
  <label for="show_promo_text" class="awdr-left-align"><?php _e('Subtotal based promo text', WDR_TEXT_DOMAIN) ?></label>
301
  <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Subtotal based promo text (available only for subtotal based discounts) ', WDR_TEXT_DOMAIN); ?></span>
296
  <table class="wdr-general-setting form-table">
297
  <tbody style="background-color: #fff;">
298
  <tr>
299
+ <td scope="row">
300
+ <label for="" class="awdr-left-align"><?php _e('Subtotal based promotion', WDR_TEXT_DOMAIN) ?></label>
301
+ <span class="wdr_settings_desc_text awdr-clear-both"><?php _e('Display subtotal based promotion messages in cart/product/shop pages<br>If enabled an option to add promotion message will displays on each rule(when subtotal condition is added)', WDR_TEXT_DOMAIN); ?></span>
302
+ </td>
303
+ <td>
304
+ <input type="radio" name="show_subtotal_promotion" id="show_subtotal_promotion"
305
+ data-name="show_promo_text_con"
306
+ value="1"
307
+ class="settings_option_show_hide" <?php echo($configuration->getConfig('show_subtotal_promotion', 0) ? 'checked' : '') ?>><label
308
+ for="show_subtotal_promotion"><?php _e('Yes', WDR_TEXT_DOMAIN); ?></label>
309
+
310
+ <input type="radio" name="show_subtotal_promotion" id="dont_show_subtotal_promotion"
311
+ data-name="show_promo_text_con"
312
+ value="0"
313
+ class="settings_option_show_hide" <?php echo(!$configuration->getConfig('show_subtotal_promotion', 0) ? 'checked' : '') ?>><label
314
+ for="dont_show_subtotal_promotion"><?php _e('No', WDR_TEXT_DOMAIN); ?></label>
315
+ </td>
316
+ </tr>
317
+ <tr class="show_promo_text_con" style="<?php echo(!$configuration->getConfig('show_subtotal_promotion', 0) ? 'display:none' : '') ?>">
318
  <td scope="row">
319
  <label for="show_promo_text" class="awdr-left-align"><?php _e('Subtotal based promo text', WDR_TEXT_DOMAIN) ?></label>
320
  <span class="wdr_settings_desc_text awdr-clear-both"><?php esc_attr_e('Subtotal based promo text (available only for subtotal based discounts) ', WDR_TEXT_DOMAIN); ?></span>
v2/Assets/Js/admin_script.js CHANGED
@@ -108,7 +108,7 @@ jQuery(document).ready(function ($) {
108
  newIndex: last_index
109
  });
110
 
111
- if(wdr_data.enable_subtotal_promo_text != ''){
112
  wdr_buildrule.wdr_clone_field({
113
  addConditionType: 'empty-promo',
114
  addFilterMethod: '.wdr-subtotal-promo-messeage-main',
@@ -121,7 +121,7 @@ jQuery(document).ready(function ($) {
121
 
122
  $(document).on('change', '.subtotal_operator', function () {
123
  // alert($(this).val());
124
- if(wdr_data.enable_subtotal_promo_text != '') {
125
  let subtotal_operator = $(this).val();
126
  let current_promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
127
  if (subtotal_operator == 'greater_than_or_equal' || subtotal_operator == 'greater_than') {
@@ -139,7 +139,7 @@ jQuery(document).ready(function ($) {
139
  parentsRow: ".wdr-conditions-container",
140
  thisObject: this,
141
  });
142
- if(wdr_data.enable_subtotal_promo_text != '') {
143
  let condition_type = $(this).parent('.wdr-btn-remove').siblings('.wdr-condition-type').find('.wdr-product-condition-type').val();
144
  if (condition_type == 'cart_subtotal') {
145
  let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
@@ -2221,6 +2221,10 @@ jQuery(document).ready(function ($) {
2221
  ruleAppendTo: '.' + data_placement,
2222
  addDiscountType: 'enable',
2223
  });
 
 
 
 
2224
  $(".calculate_cart_from option[value='from_filter']").show();
2225
  $('.adv-msg-discount, .adv-msg-discount-price').show();
2226
 
@@ -2240,19 +2244,36 @@ jQuery(document).ready(function ($) {
2240
  $('.awdr-rules-content').html(wdr_data.localization_data.common_rules_description);
2241
 
2242
  if($(this).val() == 'wdr_buy_x_get_y_discount'){
 
 
 
 
2243
  make_wdr_select2_search($('.' + data_placement ).find('[data-list="product_category"]'));
2244
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2245
  }
2246
  if($(this).val() == 'wdr_buy_x_get_x_discount'){
 
 
 
 
2247
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2248
  }
2249
  if ($(this).val() == 'wdr_bulk_discount') {
2250
- $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').show();
 
 
 
 
2251
  } else if ($(this).val() == 'wdr_set_discount') {
2252
- $('.adv-msg-min-qty, .adv-msg-discount, .adv-msg-discount-price').show();
2253
- $('.adv-msg-max-qty').hide();
 
 
 
 
2254
  }
2255
  } else if ($(this).val() == 'wdr_free_shipping') {
 
2256
  $('.awdr-hidden-new-rule').fadeIn(500);
2257
  $('.awdr-filter-section').fadeOut();
2258
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", false).removeClass("wdr_save_btn_disabled");
@@ -2261,6 +2282,10 @@ jQuery(document).ready(function ($) {
2261
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2262
  $(".calculate_cart_from option[value='from_filter']").hide();
2263
  } else {
 
 
 
 
2264
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", true).addClass("wdr_save_btn_disabled");
2265
  $('.awdr-hidden-new-rule').fadeOut(500);
2266
  }
@@ -2268,6 +2293,19 @@ jQuery(document).ready(function ($) {
2268
  $(this).trigger("advanced_woo_discount_rules_on_change_adjustment_type", [$(this).val()]);
2269
  });
2270
  $(".awdr-product-discount-type").trigger('change');
 
 
 
 
 
 
 
 
 
 
 
 
 
2271
  if (wdr_data.rule_id == "view") {
2272
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", false).removeClass("wdr_save_btn_disabled");
2273
  } else {
108
  newIndex: last_index
109
  });
110
 
111
+ if(wdr_data.enable_subtotal_promo_text == '1'){
112
  wdr_buildrule.wdr_clone_field({
113
  addConditionType: 'empty-promo',
114
  addFilterMethod: '.wdr-subtotal-promo-messeage-main',
121
 
122
  $(document).on('change', '.subtotal_operator', function () {
123
  // alert($(this).val());
124
+ if(wdr_data.enable_subtotal_promo_text == '1') {
125
  let subtotal_operator = $(this).val();
126
  let current_promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
127
  if (subtotal_operator == 'greater_than_or_equal' || subtotal_operator == 'greater_than') {
139
  parentsRow: ".wdr-conditions-container",
140
  thisObject: this,
141
  });
142
+ if(wdr_data.enable_subtotal_promo_text == '1') {
143
  let condition_type = $(this).parent('.wdr-btn-remove').siblings('.wdr-condition-type').find('.wdr-product-condition-type').val();
144
  if (condition_type == 'cart_subtotal') {
145
  let promo_index = $(this).parents('.wdr-conditions-container').attr("data-index");
2221
  ruleAppendTo: '.' + data_placement,
2222
  addDiscountType: 'enable',
2223
  });
2224
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2225
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2226
+ }
2227
+ awdrRemoveOnSaleCondition();
2228
  $(".calculate_cart_from option[value='from_filter']").show();
2229
  $('.adv-msg-discount, .adv-msg-discount-price').show();
2230
 
2244
  $('.awdr-rules-content').html(wdr_data.localization_data.common_rules_description);
2245
 
2246
  if($(this).val() == 'wdr_buy_x_get_y_discount'){
2247
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2248
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2249
+ }
2250
+ awdrRemoveOnSaleCondition();
2251
  make_wdr_select2_search($('.' + data_placement ).find('[data-list="product_category"]'));
2252
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2253
  }
2254
  if($(this).val() == 'wdr_buy_x_get_x_discount'){
2255
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2256
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2257
+ }
2258
+ awdrRemoveOnSaleCondition();
2259
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2260
  }
2261
  if ($(this).val() == 'wdr_bulk_discount') {
2262
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2263
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2264
+ }
2265
+ awdrRemoveOnSaleCondition();
2266
+ $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').show();
2267
  } else if ($(this).val() == 'wdr_set_discount') {
2268
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2269
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2270
+ }
2271
+ awdrRemoveOnSaleCondition();
2272
+ $('.adv-msg-min-qty, .adv-msg-discount, .adv-msg-discount-price').show();
2273
+ $('.adv-msg-max-qty').hide();
2274
  }
2275
  } else if ($(this).val() == 'wdr_free_shipping') {
2276
+ $('.awdr-free-shipping-special-condition').removeClass('wdr-hide');
2277
  $('.awdr-hidden-new-rule').fadeIn(500);
2278
  $('.awdr-filter-section').fadeOut();
2279
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", false).removeClass("wdr_save_btn_disabled");
2282
  $('.adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price').hide();
2283
  $(".calculate_cart_from option[value='from_filter']").hide();
2284
  } else {
2285
+ if(!$(".awdr-free-shipping-special-condition").hasClass("wdr-hide")){
2286
+ $('.awdr-free-shipping-special-condition').addClass('wdr-hide');
2287
+ }
2288
+ awdrRemoveOnSaleCondition();
2289
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", true).addClass("wdr_save_btn_disabled");
2290
  $('.awdr-hidden-new-rule').fadeOut(500);
2291
  }
2293
  $(this).trigger("advanced_woo_discount_rules_on_change_adjustment_type", [$(this).val()]);
2294
  });
2295
  $(".awdr-product-discount-type").trigger('change');
2296
+
2297
+ function awdrRemoveOnSaleCondition() {
2298
+ $('.wdr-condition-group').each(function (index,element) {
2299
+ let condition_type = $(element).find('.wdr-product-condition-type').val();
2300
+ if (typeof condition_type !== 'undefined') {
2301
+ switch (condition_type) {
2302
+ case 'cart_item_product_onsale':
2303
+ $(this).remove();
2304
+ break;
2305
+ }
2306
+ }
2307
+ });
2308
+ }
2309
  if (wdr_data.rule_id == "view") {
2310
  $("button.wdr_save_stay, button.wdr_save_close").attr("disabled", false).removeClass("wdr_save_btn_disabled");
2311
  } else {
woo-discount-rules.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
- * Version: 1.9.10
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart Technologies LLP
7
  * Author URI: https://www.flycart.org
8
+ * Version: 1.9.11
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/