Discount Rules for WooCommerce - Version 2.3.13

Version Description

  • 09/02/22 =
  • Feature - Apply coupon through URL option.
  • Improvement - Compatible option for Multi-Currency by WPML.
  • Improvement - Compatible for WooCommerce Multi-Currency by TIV.NET.
  • Improvement - Compatible for WooCommerce Price Based on Country by Oscar Gare.
  • Improvement - Quantity calculation for Cart Item Product Combination Condition on having multiple product with same Id.
  • Improvement - PHP 8 compatible.
  • Improvement - Event advanced_woo_discount_rules_calculate_discount_for_cart_item.
  • Fix - BXGY categories are not displaying in report.
  • Fix - Warning on applying Cart adjustment.
  • Fix - Discount table doesn't loads for variable product based on exclusive option.
  • Fix - Not in list filter for variant sku also consider for discount.
Download this release

Release Info

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

Code changes from version 2.3.12 to 2.3.13

i18n/languages/woo-discount-rules.pot CHANGED
@@ -150,7 +150,7 @@ msgstr ""
150
  msgid "License key for the %s is not entered. %s, you can get it from %s"
151
  msgstr ""
152
 
153
- #: v1/helper/general-helper.php:48 v2/App/Controllers/Admin/Settings.php:328
154
  msgid "Guest"
155
  msgstr ""
156
 
@@ -198,7 +198,7 @@ msgid "Read Docs"
198
  msgstr ""
199
 
200
  #: v1/helper/general-helper.php:1034 v1/view/view-cart-rules.php:697
201
- #: v1/view/view-pricing-rules.php:433 v2/App/Helpers/Woocommerce.php:1529
202
  msgid "Coupon already exists in WooCommerce. Please select another name"
203
  msgstr ""
204
 
@@ -276,7 +276,7 @@ msgstr ""
276
  #: v1/includes/advanced/free_shipping_method.php:73
277
  #: v1/includes/discount-base.php:1128 v1/view/cart-rules.php:135
278
  #: v1/view/pricing-rules.php:165 v1/view/settings_promotion.php:65
279
- #: v1/view/settings_promotion.php:100 v2/App/Controllers/Admin/Settings.php:438
280
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:77
281
  msgid "Enable"
282
  msgstr ""
@@ -304,7 +304,7 @@ msgid "Failed to save"
304
  msgstr ""
305
 
306
  #: v1/includes/discount-base.php:207 v1/view/cart-rules.php:164
307
- #: v1/view/pricing-rules.php:194 v2/App/Controllers/Admin/Settings.php:437
308
  msgid "Active"
309
  msgstr ""
310
 
@@ -386,7 +386,7 @@ msgstr ""
386
 
387
  #: v1/includes/discount-base.php:1089 v1/view/view-pricing-rules.php:654
388
  #: v1/view/view-pricing-rules.php:657 v1/view/view-pricing-rules.php:677
389
- #: v2/App/Controllers/Admin/Settings.php:455
390
  msgid "Quantity"
391
  msgstr ""
392
 
@@ -415,7 +415,7 @@ msgid "Adjustment Type"
415
  msgstr ""
416
 
417
  #: v1/includes/discount-base.php:1095 v1/view/view-pricing-rules.php:954
418
- #: v2/App/Controllers/Admin/Settings.php:458
419
  msgid "Discount percentage"
420
  msgstr ""
421
 
@@ -562,7 +562,7 @@ msgid "Are you sure to remove this ?"
562
  msgstr ""
563
 
564
  #: v1/includes/discount-base.php:1129 v1/view/cart-rules.php:132
565
- #: v1/view/pricing-rules.php:162 v2/App/Controllers/Admin/Settings.php:436
566
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:78
567
  msgid "Disable"
568
  msgstr ""
@@ -1015,7 +1015,7 @@ msgid ""
1015
  msgstr ""
1016
 
1017
  #: v1/includes/discount-base.php:1302
1018
- #: v2/App/Controllers/ManageDiscount.php:1243
1019
  #, php-format
1020
  msgid ""
1021
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
@@ -1436,7 +1436,7 @@ msgstr ""
1436
 
1437
  #: v1/view/includes/cart-menu.php:13 v1/view/includes/sub-menu.php:13
1438
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1439
- #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:463
1440
  #: v2/App/Helpers/Rule.php:1237 v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1441
  #: v2/App/Views/Admin/Rules/Manage.php:242
1442
  msgid "Discount"
@@ -2613,6 +2613,18 @@ msgid ""
2613
  "minimum quantity as 1)."
2614
  msgstr ""
2615
 
 
 
 
 
 
 
 
 
 
 
 
 
2616
  #: v2/App/Compatibility/ProductAddOnsByWooCommerce.php:108
2617
  msgid "Show discount price in product pages for WooCommerce Product Add Ons."
2618
  msgstr ""
@@ -2650,97 +2662,98 @@ msgstr ""
2650
  msgid "Searching…"
2651
  msgstr ""
2652
 
2653
- #: v2/App/Controllers/Admin/Settings.php:439
2654
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:294
2655
  msgid " - (Running)"
2656
  msgstr ""
2657
 
2658
- #: v2/App/Controllers/Admin/Settings.php:440
2659
  msgid "Oops!! something went wrong!"
2660
  msgstr ""
2661
 
2662
- #: v2/App/Controllers/Admin/Settings.php:441
2663
  msgid "Rule duplicated successfully!"
2664
  msgstr ""
2665
 
2666
- #: v2/App/Controllers/Admin/Settings.php:442
2667
  msgid "Rule deleted successfully!"
2668
  msgstr ""
2669
 
2670
- #: v2/App/Controllers/Admin/Settings.php:443
2671
  msgid "Are you sure want to delete this rule!"
2672
  msgstr ""
2673
 
2674
- #: v2/App/Controllers/Admin/Settings.php:444
2675
  msgid "Rule disabled successfully!"
2676
  msgstr ""
2677
 
2678
- #: v2/App/Controllers/Admin/Settings.php:445
2679
  msgid "Rule enabled successfully!"
2680
  msgstr ""
2681
 
2682
- #: v2/App/Controllers/Admin/Settings.php:446
2683
  msgid "Rule saved successfully!"
2684
  msgstr ""
2685
 
2686
- #: v2/App/Controllers/Admin/Settings.php:447
2687
  msgid "Settings saved successfully!"
2688
  msgstr ""
2689
 
2690
- #: v2/App/Controllers/Admin/Settings.php:448
2691
  msgid "Rule priority changed successfully!"
2692
  msgstr ""
2693
 
2694
- #: v2/App/Controllers/Admin/Settings.php:449
2695
  msgid "Rule priority not changed !"
2696
  msgstr ""
2697
 
2698
- #: v2/App/Controllers/Admin/Settings.php:450
2699
  msgid "No data for this period"
2700
  msgstr ""
2701
 
2702
- #: v2/App/Controllers/Admin/Settings.php:451
2703
  msgid "Oops! Coupon already exists in Woocommerce"
2704
  msgstr ""
2705
 
2706
- #: v2/App/Controllers/Admin/Settings.php:452
 
2707
  msgid "Copied!"
2708
  msgstr ""
2709
 
2710
- #: v2/App/Controllers/Admin/Settings.php:453
2711
  #: v2/App/Views/Admin/Tabs/settings.php:543
2712
  msgid "Copy ShortCode"
2713
  msgstr ""
2714
 
2715
- #: v2/App/Controllers/Admin/Settings.php:454
2716
  msgid "If you make this recursive other row(s) will be removed!"
2717
  msgstr ""
2718
 
2719
- #: v2/App/Controllers/Admin/Settings.php:456
2720
  msgid "Minimum Quantity"
2721
  msgstr ""
2722
 
2723
- #: v2/App/Controllers/Admin/Settings.php:457
2724
  msgid "Discount value"
2725
  msgstr ""
2726
 
2727
- #: v2/App/Controllers/Admin/Settings.php:459
2728
  msgid "Filter (Buy)"
2729
  msgstr ""
2730
 
2731
- #: v2/App/Controllers/Admin/Settings.php:460
2732
  #: v2/App/Views/Admin/Rules/Manage.php:196
2733
  msgid "Filter"
2734
  msgstr ""
2735
 
2736
- #: v2/App/Controllers/Admin/Settings.php:461
2737
  msgid ""
2738
  "<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and "
2739
  "so on )</p>\n"
2740
  "<p>Note : You can also exclude products/categories.</p>"
2741
  msgstr ""
2742
 
2743
- #: v2/App/Controllers/Admin/Settings.php:464
2744
  msgid ""
2745
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3914904-bulk-"
2746
  "discounts-tiered-pricing-discounts-discount-rules-2-0?utm_source=woo-"
@@ -2749,7 +2762,7 @@ msgid ""
2749
  "\"_blank\">Read Docs</a>"
2750
  msgstr ""
2751
 
2752
- #: v2/App/Controllers/Admin/Settings.php:465
2753
  msgid ""
2754
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3809899-bundle-set-"
2755
  "discount-discount-rules-2-0?utm_source=woo-discount-rules-"
@@ -2757,7 +2770,7 @@ msgid ""
2757
  "\"font-size: 12px;\" target=\"_blank\">Read Docs</a>"
2758
  msgstr ""
2759
 
2760
- #: v2/App/Controllers/Admin/Settings.php:466
2761
  msgid ""
2762
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3810570-buy-x-get-"
2763
  "y-discount-rules-2-0?utm_source=woo-discount-rules-"
@@ -2765,7 +2778,7 @@ msgid ""
2765
  "size: 12px;\" target=\"_blank\">Read Docs</a>"
2766
  msgstr ""
2767
 
2768
- #: v2/App/Controllers/Admin/Settings.php:467
2769
  msgid ""
2770
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3810071-buy-one-"
2771
  "get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-"
@@ -2773,12 +2786,12 @@ msgid ""
2773
  "size: 12px;\" target=\"_blank\">Read Docs</a>"
2774
  msgstr ""
2775
 
2776
- #: v2/App/Controllers/Admin/Settings.php:468
2777
  msgid ""
2778
  "<p>Select discount type and its value (percentage/price/fixed price)</p>"
2779
  msgstr ""
2780
 
2781
- #: v2/App/Controllers/Admin/Settings.php:469
2782
  msgid ""
2783
  "<p>Select discount type and its value (percentage/price/fixed price)</p> "
2784
  "<div class=\"awdr-count-by-description\"><b>Filter set above :</b><p> This "
@@ -2793,7 +2806,7 @@ msgid ""
2793
  "p></div>"
2794
  msgstr ""
2795
 
2796
- #: v2/App/Controllers/Admin/Settings.php:475
2797
  msgid ""
2798
  "<p>Select discount type and its value (percentage/price/fixed price)</p> "
2799
  "<div class=\"awdr-count-by-description\"><b>Individual Product :</b><p>This "
@@ -2807,7 +2820,7 @@ msgid ""
2807
  "because WooCommerce considers a variant as a product itself. </p></div>"
2808
  msgstr ""
2809
 
2810
- #: v2/App/Controllers/Admin/Settings.php:481
2811
  msgid ""
2812
  "<p>Select discount type and its value (percentage/price/fixed price)</p><div "
2813
  "class=\"awdr-count-by-description\"><b>All variants in each product "
@@ -2820,28 +2833,28 @@ msgid ""
2820
  "</p></div>"
2821
  msgstr ""
2822
 
2823
- #: v2/App/Controllers/Admin/Settings.php:487
2824
  msgid "Rules (optional)"
2825
  msgstr ""
2826
 
2827
- #: v2/App/Controllers/Admin/Settings.php:489
2828
  msgid ""
2829
  "<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : "
2830
  "For Buy X get Y scenarios, choose X here.</p>"
2831
  msgstr ""
2832
 
2833
- #: v2/App/Controllers/Admin/Settings.php:490
2834
  msgid ""
2835
  "<p>Choose on which products the discount should be applied (This can be "
2836
  "products/categories/SKU)</p>"
2837
  msgstr ""
2838
 
2839
- #: v2/App/Controllers/Admin/Settings.php:491
2840
- #: v2/App/Controllers/Admin/Settings.php:493
2841
  msgid "Get Discount"
2842
  msgstr ""
2843
 
2844
- #: v2/App/Controllers/Admin/Settings.php:492
2845
  msgid ""
2846
  "<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : "
2847
  "Enable recursive checkbox if the discounts should be applied in sequential "
@@ -2849,7 +2862,7 @@ msgid ""
2849
  "p>"
2850
  msgstr ""
2851
 
2852
- #: v2/App/Controllers/Admin/Settings.php:494
2853
  msgid ""
2854
  "<p>Choose the adjustment type to which the discount should be applied. You "
2855
  "can choose from products/categories/all products.</p><p>Note : Enable "
@@ -2857,14 +2870,14 @@ msgid ""
2857
  "</p>"
2858
  msgstr ""
2859
 
2860
- #: v2/App/Controllers/Admin/Settings.php:495
2861
  msgid ""
2862
  "<p>Discount will be applied <b>only the selected products (based on mode of "
2863
  "apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be "
2864
  "applied in sequential ranges. </p>"
2865
  msgstr ""
2866
 
2867
- #: v2/App/Controllers/Admin/Settings.php:496
2868
  msgid ""
2869
  "<p>Discount will be applied <b>only the selected categories (based on mode "
2870
  "of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should "
@@ -2875,7 +2888,7 @@ msgid ""
2875
  "table>"
2876
  msgstr ""
2877
 
2878
- #: v2/App/Controllers/Admin/Settings.php:497
2879
  msgid ""
2880
  "<p>Discount applies on the cheapest/highest priced <b>product IN CART</b>.</"
2881
  "p><p>Note : Enable recursive checkbox if the discounts should be applied in "
@@ -2885,40 +2898,40 @@ msgid ""
2885
  "tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>"
2886
  msgstr ""
2887
 
2888
- #: v2/App/Controllers/Admin/Settings.php:500
2889
  msgid "<p>Processing migration, please wait...</p>"
2890
  msgstr ""
2891
 
2892
- #: v2/App/Controllers/Admin/Settings.php:501
2893
  msgid "<p>Migration completed.</p>"
2894
  msgstr ""
2895
 
2896
- #: v2/App/Controllers/Admin/Settings.php:502
2897
  msgid "<p>Migration skipped.</p>"
2898
  msgstr ""
2899
 
2900
- #: v2/App/Controllers/Admin/Settings.php:503
2901
  msgid "<p>Skipping migration, please wait...</p>"
2902
  msgstr ""
2903
 
2904
- #: v2/App/Controllers/Admin/Settings.php:504
2905
  msgid ""
2906
  "<span><b>Example:</b> Product A - Small and Product A - Medium will be "
2907
  "counted as 2 quantity</span>"
2908
  msgstr ""
2909
 
2910
- #: v2/App/Controllers/Admin/Settings.php:505
2911
  msgid "<span>Discount applies to all eligible products in the store</span>"
2912
  msgstr ""
2913
 
2914
- #: v2/App/Controllers/Admin/Settings.php:506
2915
  msgid ""
2916
  "<span>Choose products that get the discount using \"In List\". If you want "
2917
  "to exclude a few products, choose \"Not In List\" and select the products "
2918
  "you wanted to exclude from discount. (You can add multiple filters)</span>"
2919
  msgstr ""
2920
 
2921
- #: v2/App/Controllers/Admin/Settings.php:507
2922
  msgid ""
2923
  "<span>Choose categories that get the discount using \"In List\". If you want "
2924
  "to exclude a few categories, choose \"Not In List\" and select the "
@@ -2926,7 +2939,7 @@ msgid ""
2926
  "filters of same type)</span>"
2927
  msgstr ""
2928
 
2929
- #: v2/App/Controllers/Admin/Settings.php:508
2930
  msgid ""
2931
  "<span> Choose attributes that get the discount using \"In List\". If you "
2932
  "want to exclude a few attributes, choose \"Not In List\" and select the "
@@ -2934,65 +2947,73 @@ msgid ""
2934
  "filters of same type)</span>"
2935
  msgstr ""
2936
 
2937
- #: v2/App/Controllers/Admin/Settings.php:509
2938
  msgid ""
2939
  "<span>Choose tags that get the discount using \"In List\". If you want to "
2940
  "exclude a few tags, choose \"Not In List\" and select the tags you wanted to "
2941
  "exclude from discount. (You can add multiple filters of same type)</span>"
2942
  msgstr ""
2943
 
2944
- #: v2/App/Controllers/Admin/Settings.php:510
2945
  msgid ""
2946
  "<span>Choose SKUs that get the discount using \"In List\". If you want to "
2947
  "exclude a few SKUs, choose \"Not In List\" and select the SKUs you wanted to "
2948
  "exclude from discount. (You can add multiple filters of same type)</span>"
2949
  msgstr ""
2950
 
2951
- #: v2/App/Controllers/Admin/Settings.php:511
2952
  msgid ""
2953
  "<span>Choose whether you want to include (or exclude) products on sale "
2954
  "(those having a sale price) for the discount </span>"
2955
  msgstr ""
2956
 
2957
- #: v2/App/Controllers/Admin/Settings.php:512
2958
  msgid "<span>Discount applies to custom taxonomy</span>"
2959
  msgstr ""
2960
 
2961
- #: v2/App/Controllers/Admin/Settings.php:513
2962
  msgid "Processing please wait.."
2963
  msgstr ""
2964
 
2965
- #: v2/App/Controllers/Admin/Settings.php:514
2966
  msgid "Rebuild index processed"
2967
  msgstr ""
2968
 
2969
- #: v2/App/Controllers/Admin/Settings.php:515
2970
  msgid "Please select the rules to build index"
2971
  msgstr ""
2972
 
2973
- #: v2/App/Controllers/Admin/Settings.php:516
2974
  msgid "Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>"
2975
  msgstr ""
2976
 
2977
- #: v2/App/Controllers/Admin/Settings.php:517
2978
  msgid ""
2979
  "<b>This rule is not running currently:</b> Rule reached maximum usage limit"
2980
  msgstr ""
2981
 
2982
- #: v2/App/Controllers/Admin/Settings.php:518
2983
  msgid ""
2984
  "<b>This rule is not running currently:</b> Start date and time is set in the "
2985
  "future date"
2986
  msgstr ""
2987
 
2988
- #: v2/App/Controllers/Admin/Settings.php:519
2989
  msgid "<b>This rule is not running currently:</b> Validity expired"
2990
  msgstr ""
2991
 
2992
- #: v2/App/Controllers/Admin/Settings.php:520
2993
  msgid "Select State"
2994
  msgstr ""
2995
 
 
 
 
 
 
 
 
 
2996
  #: v2/App/Controllers/Admin/Tabs/AdvancedSection.php:24
2997
  msgid "Advanced Options"
2998
  msgstr ""
@@ -3091,16 +3112,21 @@ msgstr ""
3091
  msgid "Cart discount"
3092
  msgstr ""
3093
 
3094
- #: v2/App/Controllers/ManageDiscount.php:1257
 
 
 
 
 
3095
  msgid "Coupon code applied successfully."
3096
  msgstr ""
3097
 
3098
- #: v2/App/Controllers/ManageDiscount.php:1678
3099
  #: v2/App/Views/Admin/Tabs/settings.php:441
3100
  msgid "Discount <strong>{{title}}</strong> has been applied to your cart."
3101
  msgstr ""
3102
 
3103
- #: v2/App/Controllers/ManageDiscount.php:1806
3104
  msgid "You saved {{total_discount}}"
3105
  msgstr ""
3106
 
@@ -3400,129 +3426,129 @@ msgstr ""
3400
  msgid "Validation error"
3401
  msgstr ""
3402
 
3403
- #: v2/App/Helpers/Woocommerce.php:959
3404
  msgid "Sunday"
3405
  msgstr ""
3406
 
3407
- #: v2/App/Helpers/Woocommerce.php:960
3408
  msgid "Monday"
3409
  msgstr ""
3410
 
3411
- #: v2/App/Helpers/Woocommerce.php:961
3412
  msgid "Tuesday"
3413
  msgstr ""
3414
 
3415
- #: v2/App/Helpers/Woocommerce.php:962
3416
  msgid "Wednesday"
3417
  msgstr ""
3418
 
3419
- #: v2/App/Helpers/Woocommerce.php:963
3420
  msgid "Thursday"
3421
  msgstr ""
3422
 
3423
- #: v2/App/Helpers/Woocommerce.php:964
3424
  msgid "Friday"
3425
  msgstr ""
3426
 
3427
- #: v2/App/Helpers/Woocommerce.php:965
3428
  msgid "Saturday"
3429
  msgstr ""
3430
 
3431
- #: v2/App/Helpers/Woocommerce.php:976
3432
  msgid ""
3433
  "Woocommerce before main content(Archive / Shop / Cat Pages / single product)"
3434
  msgstr ""
3435
 
3436
- #: v2/App/Helpers/Woocommerce.php:977
3437
  msgid "Woocommerce archive description(Archive / Shop / Cat Pages)"
3438
  msgstr ""
3439
 
3440
- #: v2/App/Helpers/Woocommerce.php:978
3441
  msgid "Woocommerce before shop loop(Archive / Shop / Cat Pages)"
3442
  msgstr ""
3443
 
3444
- #: v2/App/Helpers/Woocommerce.php:979
3445
  msgid "Woocommerce after shop loop(Archive / Shop / Cat Pages)"
3446
  msgstr ""
3447
 
3448
- #: v2/App/Helpers/Woocommerce.php:980
3449
  msgid ""
3450
  "Woocommerce after main content(Archive / Shop / Cat Pages / single product)"
3451
  msgstr ""
3452
 
3453
- #: v2/App/Helpers/Woocommerce.php:981 v2/App/Views/Admin/Tabs/settings.php:230
3454
  #: v2/App/Views/Admin/Tabs/settings.php:248
3455
  msgid "Woocommerce before single product"
3456
  msgstr ""
3457
 
3458
- #: v2/App/Helpers/Woocommerce.php:982 v2/App/Views/Admin/Tabs/settings.php:232
3459
  #: v2/App/Views/Admin/Tabs/settings.php:250
3460
  msgid "Woocommerce before single product summary"
3461
  msgstr ""
3462
 
3463
- #: v2/App/Helpers/Woocommerce.php:983 v2/App/Views/Admin/Tabs/settings.php:231
3464
  #: v2/App/Views/Admin/Tabs/settings.php:249
3465
  msgid "Woocommerce after single product summary"
3466
  msgstr ""
3467
 
3468
- #: v2/App/Helpers/Woocommerce.php:984 v2/App/Views/Admin/Tabs/settings.php:229
3469
  #: v2/App/Views/Admin/Tabs/settings.php:247
3470
  msgid "Woocommerce after single product"
3471
  msgstr ""
3472
 
3473
- #: v2/App/Helpers/Woocommerce.php:985
3474
  msgid "Woocommerce before cart"
3475
  msgstr ""
3476
 
3477
- #: v2/App/Helpers/Woocommerce.php:986
3478
  msgid "Woocommerce before cart table"
3479
  msgstr ""
3480
 
3481
- #: v2/App/Helpers/Woocommerce.php:987
3482
  msgid "Woocommerce before cart contents"
3483
  msgstr ""
3484
 
3485
- #: v2/App/Helpers/Woocommerce.php:988
3486
  msgid "Woocommerce cart contents"
3487
  msgstr ""
3488
 
3489
- #: v2/App/Helpers/Woocommerce.php:989
3490
  msgid "Woocommerce after cart contents"
3491
  msgstr ""
3492
 
3493
- #: v2/App/Helpers/Woocommerce.php:990
3494
  msgid "Woocommerce after cart table"
3495
  msgstr ""
3496
 
3497
- #: v2/App/Helpers/Woocommerce.php:991
3498
  msgid "Woocommerce after cart"
3499
  msgstr ""
3500
 
3501
- #: v2/App/Helpers/Woocommerce.php:992
3502
  msgid "Woocommerce before checkout form"
3503
  msgstr ""
3504
 
3505
- #: v2/App/Helpers/Woocommerce.php:994
3506
  msgid "Woocommerce before checkout billing form"
3507
  msgstr ""
3508
 
3509
- #: v2/App/Helpers/Woocommerce.php:995
3510
  msgid "Woocommerce after checkout billing form"
3511
  msgstr ""
3512
 
3513
- #: v2/App/Helpers/Woocommerce.php:996
3514
  msgid "Woocommerce before checkout shipping form"
3515
  msgstr ""
3516
 
3517
- #: v2/App/Helpers/Woocommerce.php:997
3518
  msgid "Woocommerce after checkout shipping form"
3519
  msgstr ""
3520
 
3521
- #: v2/App/Helpers/Woocommerce.php:998
3522
  msgid "Woocommerce before order notes"
3523
  msgstr ""
3524
 
3525
- #: v2/App/Helpers/Woocommerce.php:999
3526
  msgid "Woocommerce after order notes"
3527
  msgstr ""
3528
 
150
  msgid "License key for the %s is not entered. %s, you can get it from %s"
151
  msgstr ""
152
 
153
+ #: v1/helper/general-helper.php:48 v2/App/Controllers/Admin/Settings.php:329
154
  msgid "Guest"
155
  msgstr ""
156
 
198
  msgstr ""
199
 
200
  #: v1/helper/general-helper.php:1034 v1/view/view-cart-rules.php:697
201
+ #: v1/view/view-pricing-rules.php:433 v2/App/Helpers/Woocommerce.php:1558
202
  msgid "Coupon already exists in WooCommerce. Please select another name"
203
  msgstr ""
204
 
276
  #: v1/includes/advanced/free_shipping_method.php:73
277
  #: v1/includes/discount-base.php:1128 v1/view/cart-rules.php:135
278
  #: v1/view/pricing-rules.php:165 v1/view/settings_promotion.php:65
279
+ #: v1/view/settings_promotion.php:100 v2/App/Controllers/Admin/Settings.php:439
280
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:77
281
  msgid "Enable"
282
  msgstr ""
304
  msgstr ""
305
 
306
  #: v1/includes/discount-base.php:207 v1/view/cart-rules.php:164
307
+ #: v1/view/pricing-rules.php:194 v2/App/Controllers/Admin/Settings.php:438
308
  msgid "Active"
309
  msgstr ""
310
 
386
 
387
  #: v1/includes/discount-base.php:1089 v1/view/view-pricing-rules.php:654
388
  #: v1/view/view-pricing-rules.php:657 v1/view/view-pricing-rules.php:677
389
+ #: v2/App/Controllers/Admin/Settings.php:456
390
  msgid "Quantity"
391
  msgstr ""
392
 
415
  msgstr ""
416
 
417
  #: v1/includes/discount-base.php:1095 v1/view/view-pricing-rules.php:954
418
+ #: v2/App/Controllers/Admin/Settings.php:459
419
  msgid "Discount percentage"
420
  msgstr ""
421
 
562
  msgstr ""
563
 
564
  #: v1/includes/discount-base.php:1129 v1/view/cart-rules.php:132
565
+ #: v1/view/pricing-rules.php:162 v2/App/Controllers/Admin/Settings.php:437
566
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:78
567
  msgid "Disable"
568
  msgstr ""
1015
  msgstr ""
1016
 
1017
  #: v1/includes/discount-base.php:1302
1018
+ #: v2/App/Controllers/ManageDiscount.php:1270
1019
  #, php-format
1020
  msgid ""
1021
  "Sorry, it is not possible to apply coupon <b>\"%s\"</b> as you already have "
1436
 
1437
  #: v1/view/includes/cart-menu.php:13 v1/view/includes/sub-menu.php:13
1438
  #: v1/view/template/discount-table.php:42 v1/view/view-cart-rules.php:756
1439
+ #: v1/view/view-pricing-rules.php:708 v2/App/Controllers/Admin/Settings.php:464
1440
  #: v2/App/Helpers/Rule.php:1237 v2/App/Views/Admin/Rules/Discounts/Bulk.php:59
1441
  #: v2/App/Views/Admin/Rules/Manage.php:242
1442
  msgid "Discount"
2613
  "minimum quantity as 1)."
2614
  msgstr ""
2615
 
2616
+ #: v2/App/Compatibility/MultiCurrencyByTivNet.php:60
2617
+ msgid "Add compatible for WooCommerce Multi-Currency."
2618
+ msgstr ""
2619
+
2620
+ #: v2/App/Compatibility/MultiCurrencyByWPML.php:49
2621
+ msgid "Add additional compatible for WPML (Multi-Currency)"
2622
+ msgstr ""
2623
+
2624
+ #: v2/App/Compatibility/PriceBasedOnCountryByOscarGare.php:47
2625
+ msgid "Add compatible for WooCommerce Price Based on Country"
2626
+ msgstr ""
2627
+
2628
  #: v2/App/Compatibility/ProductAddOnsByWooCommerce.php:108
2629
  msgid "Show discount price in product pages for WooCommerce Product Add Ons."
2630
  msgstr ""
2662
  msgid "Searching…"
2663
  msgstr ""
2664
 
2665
+ #: v2/App/Controllers/Admin/Settings.php:440
2666
  #: v2/App/Views/Admin/Tabs/DiscountRule.php:294
2667
  msgid " - (Running)"
2668
  msgstr ""
2669
 
2670
+ #: v2/App/Controllers/Admin/Settings.php:441
2671
  msgid "Oops!! something went wrong!"
2672
  msgstr ""
2673
 
2674
+ #: v2/App/Controllers/Admin/Settings.php:442
2675
  msgid "Rule duplicated successfully!"
2676
  msgstr ""
2677
 
2678
+ #: v2/App/Controllers/Admin/Settings.php:443
2679
  msgid "Rule deleted successfully!"
2680
  msgstr ""
2681
 
2682
+ #: v2/App/Controllers/Admin/Settings.php:444
2683
  msgid "Are you sure want to delete this rule!"
2684
  msgstr ""
2685
 
2686
+ #: v2/App/Controllers/Admin/Settings.php:445
2687
  msgid "Rule disabled successfully!"
2688
  msgstr ""
2689
 
2690
+ #: v2/App/Controllers/Admin/Settings.php:446
2691
  msgid "Rule enabled successfully!"
2692
  msgstr ""
2693
 
2694
+ #: v2/App/Controllers/Admin/Settings.php:447
2695
  msgid "Rule saved successfully!"
2696
  msgstr ""
2697
 
2698
+ #: v2/App/Controllers/Admin/Settings.php:448
2699
  msgid "Settings saved successfully!"
2700
  msgstr ""
2701
 
2702
+ #: v2/App/Controllers/Admin/Settings.php:449
2703
  msgid "Rule priority changed successfully!"
2704
  msgstr ""
2705
 
2706
+ #: v2/App/Controllers/Admin/Settings.php:450
2707
  msgid "Rule priority not changed !"
2708
  msgstr ""
2709
 
2710
+ #: v2/App/Controllers/Admin/Settings.php:451
2711
  msgid "No data for this period"
2712
  msgstr ""
2713
 
2714
+ #: v2/App/Controllers/Admin/Settings.php:452
2715
  msgid "Oops! Coupon already exists in Woocommerce"
2716
  msgstr ""
2717
 
2718
+ #: v2/App/Controllers/Admin/Settings.php:453
2719
+ #: v2/App/Controllers/Admin/Settings.php:523
2720
  msgid "Copied!"
2721
  msgstr ""
2722
 
2723
+ #: v2/App/Controllers/Admin/Settings.php:454
2724
  #: v2/App/Views/Admin/Tabs/settings.php:543
2725
  msgid "Copy ShortCode"
2726
  msgstr ""
2727
 
2728
+ #: v2/App/Controllers/Admin/Settings.php:455
2729
  msgid "If you make this recursive other row(s) will be removed!"
2730
  msgstr ""
2731
 
2732
+ #: v2/App/Controllers/Admin/Settings.php:457
2733
  msgid "Minimum Quantity"
2734
  msgstr ""
2735
 
2736
+ #: v2/App/Controllers/Admin/Settings.php:458
2737
  msgid "Discount value"
2738
  msgstr ""
2739
 
2740
+ #: v2/App/Controllers/Admin/Settings.php:460
2741
  msgid "Filter (Buy)"
2742
  msgstr ""
2743
 
2744
+ #: v2/App/Controllers/Admin/Settings.php:461
2745
  #: v2/App/Views/Admin/Rules/Manage.php:196
2746
  msgid "Filter"
2747
  msgstr ""
2748
 
2749
+ #: v2/App/Controllers/Admin/Settings.php:462
2750
  msgid ""
2751
  "<p>Choose <b>what gets discount</b> (products/categories/attributes/SKU and "
2752
  "so on )</p>\n"
2753
  "<p>Note : You can also exclude products/categories.</p>"
2754
  msgstr ""
2755
 
2756
+ #: v2/App/Controllers/Admin/Settings.php:465
2757
  msgid ""
2758
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3914904-bulk-"
2759
  "discounts-tiered-pricing-discounts-discount-rules-2-0?utm_source=woo-"
2762
  "\"_blank\">Read Docs</a>"
2763
  msgstr ""
2764
 
2765
+ #: v2/App/Controllers/Admin/Settings.php:466
2766
  msgid ""
2767
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3809899-bundle-set-"
2768
  "discount-discount-rules-2-0?utm_source=woo-discount-rules-"
2770
  "\"font-size: 12px;\" target=\"_blank\">Read Docs</a>"
2771
  msgstr ""
2772
 
2773
+ #: v2/App/Controllers/Admin/Settings.php:467
2774
  msgid ""
2775
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3810570-buy-x-get-"
2776
  "y-discount-rules-2-0?utm_source=woo-discount-rules-"
2778
  "size: 12px;\" target=\"_blank\">Read Docs</a>"
2779
  msgstr ""
2780
 
2781
+ #: v2/App/Controllers/Admin/Settings.php:468
2782
  msgid ""
2783
  "Discount - <a href=\"https://docs.flycart.org/en/articles/3810071-buy-one-"
2784
  "get-one-free-buy-x-get-x-discount-rules-2-0?utm_source=woo-discount-rules-"
2786
  "size: 12px;\" target=\"_blank\">Read Docs</a>"
2787
  msgstr ""
2788
 
2789
+ #: v2/App/Controllers/Admin/Settings.php:469
2790
  msgid ""
2791
  "<p>Select discount type and its value (percentage/price/fixed price)</p>"
2792
  msgstr ""
2793
 
2794
+ #: v2/App/Controllers/Admin/Settings.php:470
2795
  msgid ""
2796
  "<p>Select discount type and its value (percentage/price/fixed price)</p> "
2797
  "<div class=\"awdr-count-by-description\"><b>Filter set above :</b><p> This "
2806
  "p></div>"
2807
  msgstr ""
2808
 
2809
+ #: v2/App/Controllers/Admin/Settings.php:476
2810
  msgid ""
2811
  "<p>Select discount type and its value (percentage/price/fixed price)</p> "
2812
  "<div class=\"awdr-count-by-description\"><b>Individual Product :</b><p>This "
2820
  "because WooCommerce considers a variant as a product itself. </p></div>"
2821
  msgstr ""
2822
 
2823
+ #: v2/App/Controllers/Admin/Settings.php:482
2824
  msgid ""
2825
  "<p>Select discount type and its value (percentage/price/fixed price)</p><div "
2826
  "class=\"awdr-count-by-description\"><b>All variants in each product "
2833
  "</p></div>"
2834
  msgstr ""
2835
 
2836
+ #: v2/App/Controllers/Admin/Settings.php:488
2837
  msgid "Rules (optional)"
2838
  msgstr ""
2839
 
2840
+ #: v2/App/Controllers/Admin/Settings.php:490
2841
  msgid ""
2842
  "<p>Choose Buy Products. (products/categories/attributes/tags/sku) Example : "
2843
  "For Buy X get Y scenarios, choose X here.</p>"
2844
  msgstr ""
2845
 
2846
+ #: v2/App/Controllers/Admin/Settings.php:491
2847
  msgid ""
2848
  "<p>Choose on which products the discount should be applied (This can be "
2849
  "products/categories/SKU)</p>"
2850
  msgstr ""
2851
 
2852
+ #: v2/App/Controllers/Admin/Settings.php:492
2853
+ #: v2/App/Controllers/Admin/Settings.php:494
2854
  msgid "Get Discount"
2855
  msgstr ""
2856
 
2857
+ #: v2/App/Controllers/Admin/Settings.php:493
2858
  msgid ""
2859
  "<p>Enter the min/max ranges and choose free item quantity.</p><p>Note : "
2860
  "Enable recursive checkbox if the discounts should be applied in sequential "
2862
  "p>"
2863
  msgstr ""
2864
 
2865
+ #: v2/App/Controllers/Admin/Settings.php:495
2866
  msgid ""
2867
  "<p>Choose the adjustment type to which the discount should be applied. You "
2868
  "can choose from products/categories/all products.</p><p>Note : Enable "
2870
  "</p>"
2871
  msgstr ""
2872
 
2873
+ #: v2/App/Controllers/Admin/Settings.php:496
2874
  msgid ""
2875
  "<p>Discount will be applied <b>only the selected products (based on mode of "
2876
  "apply)</b></p><p>Note : Enable recursive checkbox if the discounts should be "
2877
  "applied in sequential ranges. </p>"
2878
  msgstr ""
2879
 
2880
+ #: v2/App/Controllers/Admin/Settings.php:497
2881
  msgid ""
2882
  "<p>Discount will be applied <b>only the selected categories (based on mode "
2883
  "of apply)</b></p><p>Note : Enable recursive checkbox if the discounts should "
2888
  "table>"
2889
  msgstr ""
2890
 
2891
+ #: v2/App/Controllers/Admin/Settings.php:498
2892
  msgid ""
2893
  "<p>Discount applies on the cheapest/highest priced <b>product IN CART</b>.</"
2894
  "p><p>Note : Enable recursive checkbox if the discounts should be applied in "
2898
  "tr></tr><tr><td>4</td><td>5</td><td>2</td></tr></tbody></table>"
2899
  msgstr ""
2900
 
2901
+ #: v2/App/Controllers/Admin/Settings.php:501
2902
  msgid "<p>Processing migration, please wait...</p>"
2903
  msgstr ""
2904
 
2905
+ #: v2/App/Controllers/Admin/Settings.php:502
2906
  msgid "<p>Migration completed.</p>"
2907
  msgstr ""
2908
 
2909
+ #: v2/App/Controllers/Admin/Settings.php:503
2910
  msgid "<p>Migration skipped.</p>"
2911
  msgstr ""
2912
 
2913
+ #: v2/App/Controllers/Admin/Settings.php:504
2914
  msgid "<p>Skipping migration, please wait...</p>"
2915
  msgstr ""
2916
 
2917
+ #: v2/App/Controllers/Admin/Settings.php:505
2918
  msgid ""
2919
  "<span><b>Example:</b> Product A - Small and Product A - Medium will be "
2920
  "counted as 2 quantity</span>"
2921
  msgstr ""
2922
 
2923
+ #: v2/App/Controllers/Admin/Settings.php:506
2924
  msgid "<span>Discount applies to all eligible products in the store</span>"
2925
  msgstr ""
2926
 
2927
+ #: v2/App/Controllers/Admin/Settings.php:507
2928
  msgid ""
2929
  "<span>Choose products that get the discount using \"In List\". If you want "
2930
  "to exclude a few products, choose \"Not In List\" and select the products "
2931
  "you wanted to exclude from discount. (You can add multiple filters)</span>"
2932
  msgstr ""
2933
 
2934
+ #: v2/App/Controllers/Admin/Settings.php:508
2935
  msgid ""
2936
  "<span>Choose categories that get the discount using \"In List\". If you want "
2937
  "to exclude a few categories, choose \"Not In List\" and select the "
2939
  "filters of same type)</span>"
2940
  msgstr ""
2941
 
2942
+ #: v2/App/Controllers/Admin/Settings.php:509
2943
  msgid ""
2944
  "<span> Choose attributes that get the discount using \"In List\". If you "
2945
  "want to exclude a few attributes, choose \"Not In List\" and select the "
2947
  "filters of same type)</span>"
2948
  msgstr ""
2949
 
2950
+ #: v2/App/Controllers/Admin/Settings.php:510
2951
  msgid ""
2952
  "<span>Choose tags that get the discount using \"In List\". If you want to "
2953
  "exclude a few tags, choose \"Not In List\" and select the tags you wanted to "
2954
  "exclude from discount. (You can add multiple filters of same type)</span>"
2955
  msgstr ""
2956
 
2957
+ #: v2/App/Controllers/Admin/Settings.php:511
2958
  msgid ""
2959
  "<span>Choose SKUs that get the discount using \"In List\". If you want to "
2960
  "exclude a few SKUs, choose \"Not In List\" and select the SKUs you wanted to "
2961
  "exclude from discount. (You can add multiple filters of same type)</span>"
2962
  msgstr ""
2963
 
2964
+ #: v2/App/Controllers/Admin/Settings.php:512
2965
  msgid ""
2966
  "<span>Choose whether you want to include (or exclude) products on sale "
2967
  "(those having a sale price) for the discount </span>"
2968
  msgstr ""
2969
 
2970
+ #: v2/App/Controllers/Admin/Settings.php:513
2971
  msgid "<span>Discount applies to custom taxonomy</span>"
2972
  msgstr ""
2973
 
2974
+ #: v2/App/Controllers/Admin/Settings.php:514
2975
  msgid "Processing please wait.."
2976
  msgstr ""
2977
 
2978
+ #: v2/App/Controllers/Admin/Settings.php:515
2979
  msgid "Rebuild index processed"
2980
  msgstr ""
2981
 
2982
+ #: v2/App/Controllers/Admin/Settings.php:516
2983
  msgid "Please select the rules to build index"
2984
  msgstr ""
2985
 
2986
+ #: v2/App/Controllers/Admin/Settings.php:517
2987
  msgid "Invalid File. Upload : <b style='color:red;'>.csv</b> File. </br>"
2988
  msgstr ""
2989
 
2990
+ #: v2/App/Controllers/Admin/Settings.php:518
2991
  msgid ""
2992
  "<b>This rule is not running currently:</b> Rule reached maximum usage limit"
2993
  msgstr ""
2994
 
2995
+ #: v2/App/Controllers/Admin/Settings.php:519
2996
  msgid ""
2997
  "<b>This rule is not running currently:</b> Start date and time is set in the "
2998
  "future date"
2999
  msgstr ""
3000
 
3001
+ #: v2/App/Controllers/Admin/Settings.php:520
3002
  msgid "<b>This rule is not running currently:</b> Validity expired"
3003
  msgstr ""
3004
 
3005
+ #: v2/App/Controllers/Admin/Settings.php:521
3006
  msgid "Select State"
3007
  msgstr ""
3008
 
3009
+ #: v2/App/Controllers/Admin/Settings.php:522
3010
+ msgid "Copy URL"
3011
+ msgstr ""
3012
+
3013
+ #: v2/App/Controllers/Admin/Settings.php:524
3014
+ msgid "Coupon url copied!"
3015
+ msgstr ""
3016
+
3017
  #: v2/App/Controllers/Admin/Tabs/AdvancedSection.php:24
3018
  msgid "Advanced Options"
3019
  msgstr ""
3112
  msgid "Cart discount"
3113
  msgstr ""
3114
 
3115
+ #: v2/App/Controllers/ManageDiscount.php:1055
3116
+ #, php-format
3117
+ msgid "Coupon \"%s\" is currently not available!"
3118
+ msgstr ""
3119
+
3120
+ #: v2/App/Controllers/ManageDiscount.php:1284
3121
  msgid "Coupon code applied successfully."
3122
  msgstr ""
3123
 
3124
+ #: v2/App/Controllers/ManageDiscount.php:1708
3125
  #: v2/App/Views/Admin/Tabs/settings.php:441
3126
  msgid "Discount <strong>{{title}}</strong> has been applied to your cart."
3127
  msgstr ""
3128
 
3129
+ #: v2/App/Controllers/ManageDiscount.php:1836
3130
  msgid "You saved {{total_discount}}"
3131
  msgstr ""
3132
 
3426
  msgid "Validation error"
3427
  msgstr ""
3428
 
3429
+ #: v2/App/Helpers/Woocommerce.php:984
3430
  msgid "Sunday"
3431
  msgstr ""
3432
 
3433
+ #: v2/App/Helpers/Woocommerce.php:985
3434
  msgid "Monday"
3435
  msgstr ""
3436
 
3437
+ #: v2/App/Helpers/Woocommerce.php:986
3438
  msgid "Tuesday"
3439
  msgstr ""
3440
 
3441
+ #: v2/App/Helpers/Woocommerce.php:987
3442
  msgid "Wednesday"
3443
  msgstr ""
3444
 
3445
+ #: v2/App/Helpers/Woocommerce.php:988
3446
  msgid "Thursday"
3447
  msgstr ""
3448
 
3449
+ #: v2/App/Helpers/Woocommerce.php:989
3450
  msgid "Friday"
3451
  msgstr ""
3452
 
3453
+ #: v2/App/Helpers/Woocommerce.php:990
3454
  msgid "Saturday"
3455
  msgstr ""
3456
 
3457
+ #: v2/App/Helpers/Woocommerce.php:1001
3458
  msgid ""
3459
  "Woocommerce before main content(Archive / Shop / Cat Pages / single product)"
3460
  msgstr ""
3461
 
3462
+ #: v2/App/Helpers/Woocommerce.php:1002
3463
  msgid "Woocommerce archive description(Archive / Shop / Cat Pages)"
3464
  msgstr ""
3465
 
3466
+ #: v2/App/Helpers/Woocommerce.php:1003
3467
  msgid "Woocommerce before shop loop(Archive / Shop / Cat Pages)"
3468
  msgstr ""
3469
 
3470
+ #: v2/App/Helpers/Woocommerce.php:1004
3471
  msgid "Woocommerce after shop loop(Archive / Shop / Cat Pages)"
3472
  msgstr ""
3473
 
3474
+ #: v2/App/Helpers/Woocommerce.php:1005
3475
  msgid ""
3476
  "Woocommerce after main content(Archive / Shop / Cat Pages / single product)"
3477
  msgstr ""
3478
 
3479
+ #: v2/App/Helpers/Woocommerce.php:1006 v2/App/Views/Admin/Tabs/settings.php:230
3480
  #: v2/App/Views/Admin/Tabs/settings.php:248
3481
  msgid "Woocommerce before single product"
3482
  msgstr ""
3483
 
3484
+ #: v2/App/Helpers/Woocommerce.php:1007 v2/App/Views/Admin/Tabs/settings.php:232
3485
  #: v2/App/Views/Admin/Tabs/settings.php:250
3486
  msgid "Woocommerce before single product summary"
3487
  msgstr ""
3488
 
3489
+ #: v2/App/Helpers/Woocommerce.php:1008 v2/App/Views/Admin/Tabs/settings.php:231
3490
  #: v2/App/Views/Admin/Tabs/settings.php:249
3491
  msgid "Woocommerce after single product summary"
3492
  msgstr ""
3493
 
3494
+ #: v2/App/Helpers/Woocommerce.php:1009 v2/App/Views/Admin/Tabs/settings.php:229
3495
  #: v2/App/Views/Admin/Tabs/settings.php:247
3496
  msgid "Woocommerce after single product"
3497
  msgstr ""
3498
 
3499
+ #: v2/App/Helpers/Woocommerce.php:1010
3500
  msgid "Woocommerce before cart"
3501
  msgstr ""
3502
 
3503
+ #: v2/App/Helpers/Woocommerce.php:1011
3504
  msgid "Woocommerce before cart table"
3505
  msgstr ""
3506
 
3507
+ #: v2/App/Helpers/Woocommerce.php:1012
3508
  msgid "Woocommerce before cart contents"
3509
  msgstr ""
3510
 
3511
+ #: v2/App/Helpers/Woocommerce.php:1013
3512
  msgid "Woocommerce cart contents"
3513
  msgstr ""
3514
 
3515
+ #: v2/App/Helpers/Woocommerce.php:1014
3516
  msgid "Woocommerce after cart contents"
3517
  msgstr ""
3518
 
3519
+ #: v2/App/Helpers/Woocommerce.php:1015
3520
  msgid "Woocommerce after cart table"
3521
  msgstr ""
3522
 
3523
+ #: v2/App/Helpers/Woocommerce.php:1016
3524
  msgid "Woocommerce after cart"
3525
  msgstr ""
3526
 
3527
+ #: v2/App/Helpers/Woocommerce.php:1017
3528
  msgid "Woocommerce before checkout form"
3529
  msgstr ""
3530
 
3531
+ #: v2/App/Helpers/Woocommerce.php:1019
3532
  msgid "Woocommerce before checkout billing form"
3533
  msgstr ""
3534
 
3535
+ #: v2/App/Helpers/Woocommerce.php:1020
3536
  msgid "Woocommerce after checkout billing form"
3537
  msgstr ""
3538
 
3539
+ #: v2/App/Helpers/Woocommerce.php:1021
3540
  msgid "Woocommerce before checkout shipping form"
3541
  msgstr ""
3542
 
3543
+ #: v2/App/Helpers/Woocommerce.php:1022
3544
  msgid "Woocommerce after checkout shipping form"
3545
  msgstr ""
3546
 
3547
+ #: v2/App/Helpers/Woocommerce.php:1023
3548
  msgid "Woocommerce before order notes"
3549
  msgstr ""
3550
 
3551
+ #: v2/App/Helpers/Woocommerce.php:1024
3552
  msgid "Woocommerce after order notes"
3553
  msgstr ""
3554
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: flycart
3
  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.8
7
- Stable tag: 2.3.12
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -336,6 +336,19 @@ Note : Enable recursive checkbox if the discounts should be applied in sequentia
336
 
337
  == Changelog ==
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  = 2.3.12 - 13/01/22 =
340
  * Improvement - WooCommerce 6.1 compatible
341
  * Fix - Error on API calls.
3
  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.9
7
+ Stable tag: 2.3.13
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
336
 
337
  == Changelog ==
338
 
339
+ = 2.3.13 - 09/02/22 =
340
+ * Feature - Apply coupon through URL option.
341
+ * Improvement - Compatible option for Multi-Currency by WPML.
342
+ * Improvement - Compatible for WooCommerce Multi-Currency by TIV.NET.
343
+ * Improvement - Compatible for WooCommerce Price Based on Country by Oscar Gare.
344
+ * Improvement - Quantity calculation for Cart Item Product Combination Condition on having multiple product with same Id.
345
+ * Improvement - PHP 8 compatible.
346
+ * Improvement - Event advanced_woo_discount_rules_calculate_discount_for_cart_item.
347
+ * Fix - BXGY categories are not displaying in report.
348
+ * Fix - Warning on applying Cart adjustment.
349
+ * Fix - Discount table doesn't loads for variable product based on exclusive option.
350
+ * Fix - Not in list filter for variant sku also consider for discount.
351
+
352
  = 2.3.12 - 13/01/22 =
353
  * Improvement - WooCommerce 6.1 compatible
354
  * Fix - Error on API calls.
v2/App/Compatibility/MultiCurrencyByTivNet.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Wdr\App\Compatibility;
4
+
5
+ if (!defined('ABSPATH')) exit;
6
+
7
+ class MultiCurrencyByTivNet extends Base
8
+ {
9
+ protected $key = 'compatible_multicurrency_tivnet';
10
+
11
+ /**
12
+ * Do compatibility script
13
+ * */
14
+ public function run(){
15
+ $value = $this->config->getConfigData($this->key, 0);
16
+ if($value){
17
+ add_filter('advanced_woo_discount_rules_additional_fee_amount', array($this, 'convertPrice'));
18
+ add_filter('advanced_woo_discount_rules_converted_currency_value', array($this, 'convertPrice'));
19
+ }
20
+ }
21
+
22
+ /**
23
+ * To convert price
24
+ * */
25
+ public function convertPrice($value) {
26
+ if(is_numeric($value) && !empty($value)) {
27
+ if(class_exists('\WOOMC\Currency\Detector') && class_exists('\WOOMC\Rate\Storage')){
28
+ if(class_exists('\WOOMC\Price\Rounder') && class_exists('\WOOMC\Price\Calculator')){
29
+ if(class_exists('\WOOMC\Price\Controller')){
30
+ $currency_detector = new \WOOMC\Currency\Detector();
31
+ $currency_detector->setup_hooks();
32
+
33
+ $rate_storage = new \WOOMC\Rate\Storage();
34
+ $rate_storage->setup_hooks();
35
+
36
+ $price_rounder = new \WOOMC\Price\Rounder();
37
+
38
+ $price_calculator = new \WOOMC\Price\Calculator($rate_storage, $price_rounder);
39
+ $price_controller = new \WOOMC\Price\Controller($price_calculator, $currency_detector);
40
+ $value = $price_controller->convert($value);
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ return $value;
47
+ }
48
+
49
+ /**
50
+ * load fields
51
+ * */
52
+ public function loadFields(&$available){
53
+ $value = $this->config->getConfigData($this->key, 0);
54
+ if ( is_plugin_active( 'woocommerce-multicurrency/woocommerce-multicurrency.php' ) || ($value == 1)) {
55
+ $available = true;
56
+ ?>
57
+ <div class="awdr-compatible-field">
58
+ <label>
59
+ <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
60
+ <?php esc_html_e('Add compatible for WooCommerce Multi-Currency.', 'woo-discount-rules'); ?>
61
+ </label>
62
+ </div>
63
+ <?php
64
+ }
65
+ }
66
+ }
v2/App/Compatibility/MultiCurrencyByWPML.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Wdr\App\Compatibility;
4
+
5
+ if (!defined('ABSPATH')) exit;
6
+
7
+ class MultiCurrencyByWPML extends Base
8
+ {
9
+ protected $key = 'compatible_multicurrency_by_wpml';
10
+
11
+ /**
12
+ * Do compatibility script
13
+ * */
14
+ public function run(){
15
+ $value = $this->config->getConfigData($this->key, 0);
16
+ if($value){
17
+ // Convert price based on the currency
18
+ add_filter('advanced_woo_discount_rules_converted_currency_value', function($price) {
19
+ if(is_numeric($price) && !empty($price)) {
20
+ // Pass the price to the currency conversion filter provided by the WPML.
21
+ $price = apply_filters('wcml_raw_price_amount', $price);
22
+ }
23
+
24
+ return $price;
25
+ }, 10);
26
+
27
+ // Add a Wdr Ajax action to WPML Multi-currency Ajax actions list
28
+ add_filter('wcml_multi_currency_ajax_actions', function($ajax_actions) {
29
+ $ajax_actions[] = 'wdr_ajax'; // Add a AJAX action to the array
30
+ $ajax_actions[] = 'awdr_get_product_discount';
31
+ $ajax_actions[] = 'awdr_change_discount_product_in_cart';
32
+
33
+ return $ajax_actions;
34
+ }, 10, 1);
35
+ }
36
+ }
37
+
38
+ /**
39
+ * load fields
40
+ * */
41
+ public function loadFields(&$available){
42
+ $value = $this->config->getConfigData($this->key, 0);
43
+ if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) || ($value == 1)) {
44
+ $available = true;
45
+ ?>
46
+ <div class="awdr-compatible-field">
47
+ <label>
48
+ <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
49
+ <?php esc_html_e('Add additional compatible for WPML (Multi-Currency)', 'woo-discount-rules'); ?>
50
+ </label>
51
+ </div>
52
+ <?php
53
+ }
54
+ }
55
+ }
v2/App/Compatibility/PriceBasedOnCountryByOscarGare.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Wdr\App\Compatibility;
4
+
5
+ if (!defined('ABSPATH')) exit;
6
+
7
+ class PriceBasedOnCountryByOscarGare extends Base
8
+ {
9
+ protected $key = 'compatible_wcpbc_oscargare';
10
+
11
+ /**
12
+ * Do compatibility scripts
13
+ * */
14
+ public function run(){
15
+ $value = $this->config->getConfigData($this->key, 0);
16
+ if($value){
17
+ add_filter('advanced_woo_discount_rules_converted_currency_value', function($price){
18
+ if(is_numeric($price) && !empty($price)) {
19
+ // Pass the price to the currency conversion function provided by the Currency Switcher. This
20
+ // will ensure that the discount is converted correctly
21
+ if(function_exists('wcpbc_the_zone')) {
22
+ if(method_exists(wcpbc_the_zone(), 'get_exchange_rate_price')) {
23
+ // Return a price calculate by exchange rate
24
+ $price = wcpbc_the_zone()->get_exchange_rate_price($price, true, 'generic', null);
25
+ }
26
+ }
27
+ }
28
+
29
+ return $price;
30
+ }, 10);
31
+
32
+ // add_filter('advanced_woo_discount_rules_calculate_cart_subtotal_manually', '__return_true');
33
+ }
34
+ }
35
+
36
+ /**
37
+ * load fields
38
+ * */
39
+ public function loadFields(&$available){
40
+ $value = $this->config->getConfigData($this->key, 0);
41
+ if ( is_plugin_active( 'woocommerce-product-price-based-on-countries/woocommerce-product-price-based-on-countries.php' ) || ($value == 1)) {
42
+ $available = true;
43
+ ?>
44
+ <div class="awdr-compatible-field">
45
+ <label>
46
+ <input type="checkbox" name="wdrc[<?php echo $this->key; ?>]" id="<?php echo $this->key; ?>" value="1" <?php if ($value == 1) { ?> checked <?php } ?>>
47
+ <?php esc_html_e('Add compatible for WooCommerce Price Based on Country', 'woo-discount-rules'); ?>
48
+ </label>
49
+ </div>
50
+ <?php
51
+ }
52
+ }
53
+ }
v2/App/Controllers/Admin/Settings.php CHANGED
@@ -240,6 +240,7 @@ class Settings extends Base
240
  'searching_text' => __('Searching…', 'woo-discount-rules'),
241
  ),
242
  'lists' => $preloaded_lists,
 
243
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
244
  'localization_data' => $localization_data,
245
  'enable_subtotal_promo_text' => $conig->getConfig('show_subtotal_promotion', ''),
@@ -518,6 +519,9 @@ If a customer buys 2 of Product A - Small, 4 of Product A - Medium, 6 of Prod
518
  'invalid_rule_limit_with_date_future' => __("<b>This rule is not running currently:</b> Start date and time is set in the future date", 'woo-discount-rules'),
519
  'invalid_rule_limit_with_date_expire' => __("<b>This rule is not running currently:</b> Validity expired", 'woo-discount-rules'),
520
  'select_state' => __("Select State", 'woo-discount-rules'),
 
 
 
521
  );
522
  }
523
  }
240
  'searching_text' => __('Searching…', 'woo-discount-rules'),
241
  ),
242
  'lists' => $preloaded_lists,
243
+ 'home_url' => home_url(),
244
  'admin_url' => admin_url('admin.php?page=woo_discount_rules'),
245
  'localization_data' => $localization_data,
246
  'enable_subtotal_promo_text' => $conig->getConfig('show_subtotal_promotion', ''),
519
  'invalid_rule_limit_with_date_future' => __("<b>This rule is not running currently:</b> Start date and time is set in the future date", 'woo-discount-rules'),
520
  'invalid_rule_limit_with_date_expire' => __("<b>This rule is not running currently:</b> Validity expired", 'woo-discount-rules'),
521
  'select_state' => __("Select State", 'woo-discount-rules'),
522
+ 'coupon_url_copy' => __("Copy URL", 'woo-discount-rules'),
523
+ 'coupon_url_copied' => __("Copied!", 'woo-discount-rules'),
524
+ 'coupon_url_success' => __("Coupon url copied!", 'woo-discount-rules'),
525
  );
526
  }
527
  }
v2/App/Controllers/DiscountCalculator.php CHANGED
@@ -62,6 +62,10 @@ class DiscountCalculator extends Base
62
  $calculate_discount_from = self::$config->getConfig('calculate_discount_from', 'sale_price');
63
  $language_helper_object = self::$language_helper;
64
  $discount_calculator = $this;
 
 
 
 
65
  foreach (self::$rules as $rule) {
66
  if (!$rule->isEnabled()) {
67
  continue;
62
  $calculate_discount_from = self::$config->getConfig('calculate_discount_from', 'sale_price');
63
  $language_helper_object = self::$language_helper;
64
  $discount_calculator = $this;
65
+ //Fix for filter exclusive rule on ajax request as the rules are not filtered in ajax request.
66
+ if($get_variable_product_table){
67
+ $discount_calculator->filterExclusiveRule(1, false, false, false);
68
+ }
69
  foreach (self::$rules as $rule) {
70
  if (!$rule->isEnabled()) {
71
  continue;
v2/App/Controllers/ManageDiscount.php CHANGED
@@ -981,7 +981,7 @@ class ManageDiscount extends Base
981
  $this->applyFakeCouponsForCartRules($label);
982
  }else{
983
  $total_combined_discounts += $discount['value'];
984
- $combined_discounts_cart_items = array_merge($combined_discounts_cart_items, $discount['cart_item_key']);
985
  }
986
  }
987
  }
@@ -1032,6 +1032,33 @@ class ManageDiscount extends Base
1032
  }
1033
  }
1034
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1035
  /**
1036
  * Get product ids from cart key
1037
  * */
@@ -1521,6 +1548,9 @@ class ManageDiscount extends Base
1521
  $bxgy_cheapest_from_product_discount_price = isset($value['buy_x_get_y_cheapest_from_products_discount']['discount_price_per_quantity']) ? $value['buy_x_get_y_cheapest_from_products_discount']['discount_price_per_quantity'] : 0;
1522
  $bxgy_cheapest_from_product_discount_qty = isset($value['buy_x_get_y_cheapest_from_products_discount']['discount_quantity']) ? $value['buy_x_get_y_cheapest_from_products_discount']['discount_quantity'] : 0;
1523
  $bxgy_cheapest_from_product_discount = $bxgy_cheapest_from_product_discount_price * $bxgy_cheapest_from_product_discount_qty;
 
 
 
1524
  $bogo_cheapest_aditional_sum = 0;
1525
  if(!empty($buy_x_get_y_cheapest_additional)) {
1526
  $bogo_cheapest_aditional = array();
@@ -1532,7 +1562,7 @@ class ManageDiscount extends Base
1532
  $bogo_cheapest_aditional_sum = array_sum($bogo_cheapest_aditional);
1533
  }
1534
 
1535
- $discount_price = $simple_discount + $bulk_discount + $set_discount + $bxgx_discount + $bxgy_discount + $bxgy_cheapest_discount + $bogo_cheapest_aditional_sum + $bxgy_cheapest_from_product_discount;
1536
  if ($discount_price < 0) {
1537
  $discount_price = 0;
1538
  }
@@ -2584,4 +2614,4 @@ class ManageDiscount extends Base
2584
 
2585
  return $fee;
2586
  }
2587
- }
981
  $this->applyFakeCouponsForCartRules($label);
982
  }else{
983
  $total_combined_discounts += $discount['value'];
984
+ $combined_discounts_cart_items = array_merge($combined_discounts_cart_items, $discount['cart_item_keys']);
985
  }
986
  }
987
  }
1032
  }
1033
  }
1034
 
1035
+ /**
1036
+ * Apply url coupon
1037
+ */
1038
+ function applyUrlCoupon() {
1039
+ global $woocommerce;
1040
+
1041
+ if (isset($_GET['wdr_coupon']) && !empty($_GET['wdr_coupon']) && isset($woocommerce->cart)) {
1042
+ if ( method_exists( $woocommerce->cart, 'has_discount' ) && method_exists( $woocommerce->cart, 'add_discount' ) ) {
1043
+ $rule_helper = new Rule();
1044
+ $available_url_coupons = $rule_helper->getAllUrlCoupons();
1045
+ $available_url_coupons = array_map('\Wdr\App\Helpers\Woocommerce::formatStringToLower', $available_url_coupons);
1046
+ $coupons = explode(",", $_GET['wdr_coupon']);
1047
+ foreach ( $coupons as $coupon ) {
1048
+ $coupon_code = rawurldecode( $coupon );
1049
+ $coupon_code = Woocommerce::formatStringToLower($coupon_code);
1050
+ if ( in_array( $coupon_code, $available_url_coupons ) ) {
1051
+ if ( ! $woocommerce->cart->has_discount( $coupon_code ) ) {
1052
+ $woocommerce->cart->add_discount( $coupon_code );
1053
+ }
1054
+ } else {
1055
+ Woocommerce::wc_add_notice( sprintf( __( 'Coupon "%s" is currently not available!', 'woo-discount-rules' ), $coupon_code ), 'error' );
1056
+ }
1057
+ }
1058
+ }
1059
+ }
1060
+ }
1061
+
1062
  /**
1063
  * Get product ids from cart key
1064
  * */
1548
  $bxgy_cheapest_from_product_discount_price = isset($value['buy_x_get_y_cheapest_from_products_discount']['discount_price_per_quantity']) ? $value['buy_x_get_y_cheapest_from_products_discount']['discount_price_per_quantity'] : 0;
1549
  $bxgy_cheapest_from_product_discount_qty = isset($value['buy_x_get_y_cheapest_from_products_discount']['discount_quantity']) ? $value['buy_x_get_y_cheapest_from_products_discount']['discount_quantity'] : 0;
1550
  $bxgy_cheapest_from_product_discount = $bxgy_cheapest_from_product_discount_price * $bxgy_cheapest_from_product_discount_qty;
1551
+ $bxgy_cheapest_from_categories_discount_price = isset($value['buy_x_get_y_cheapest_from_categories_discount']['discount_price_per_quantity']) ? $value['buy_x_get_y_cheapest_from_categories_discount']['discount_price_per_quantity'] : 0;
1552
+ $bxgy_cheapest_from_categories_discount_qty = isset($value['buy_x_get_y_cheapest_from_categories_discount']['discount_quantity']) ? $value['buy_x_get_y_cheapest_from_categories_discount']['discount_quantity'] : 0;
1553
+ $bxgy_cheapest_from_categories_discount = $bxgy_cheapest_from_categories_discount_price * $bxgy_cheapest_from_categories_discount_qty;
1554
  $bogo_cheapest_aditional_sum = 0;
1555
  if(!empty($buy_x_get_y_cheapest_additional)) {
1556
  $bogo_cheapest_aditional = array();
1562
  $bogo_cheapest_aditional_sum = array_sum($bogo_cheapest_aditional);
1563
  }
1564
 
1565
+ $discount_price = $simple_discount + $bulk_discount + $set_discount + $bxgx_discount + $bxgy_discount + $bxgy_cheapest_discount + $bogo_cheapest_aditional_sum + $bxgy_cheapest_from_product_discount + $bxgy_cheapest_from_categories_discount;
1566
  if ($discount_price < 0) {
1567
  $discount_price = 0;
1568
  }
2614
 
2615
  return $fee;
2616
  }
2617
+ }
v2/App/Helpers/Filter.php CHANGED
@@ -193,8 +193,8 @@ class Filter
193
  if(!empty($parent_id)){
194
  $parent_product = Woocommerce::getProduct($parent_id);
195
  $parant_product_sku = Woocommerce::getProductSku($parent_product);
196
- $result = $this->checkInList($parant_product_sku, $operation_method, $operation_values);
197
- if($result){
198
  return $result;
199
  }
200
  }
@@ -381,4 +381,4 @@ class Filter
381
  }
382
  return $result;
383
  }
384
- }
193
  if(!empty($parent_id)){
194
  $parent_product = Woocommerce::getProduct($parent_id);
195
  $parant_product_sku = Woocommerce::getProductSku($parent_product);
196
+ if (in_array($parant_product_sku, $operation_values)) {
197
+ $result = $this->checkInList($parant_product_sku, $operation_method, $operation_values);
198
  return $result;
199
  }
200
  }
381
  }
382
  return $result;
383
  }
384
+ }
v2/App/Helpers/Helper.php CHANGED
@@ -332,9 +332,9 @@ class Helper
332
 
333
  public static function displayCompatibleCheckMessages()
334
  {
335
- if (version_compare(WDR_VERSION, '2.3.12', '>=')) {
336
  if (defined('WDR_PRO_VERSION')) {
337
- if (version_compare(WDR_PRO_VERSION, '2.3.12', '<')) {
338
  $url = admin_url() . "plugins.php";
339
  $plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', 'woo-discount-rules') . '</a>';
340
  ?>
332
 
333
  public static function displayCompatibleCheckMessages()
334
  {
335
+ if (version_compare(WDR_VERSION, '2.3.13', '>=')) {
336
  if (defined('WDR_PRO_VERSION')) {
337
+ if (version_compare(WDR_PRO_VERSION, '2.3.13', '<')) {
338
  $url = admin_url() . "plugins.php";
339
  $plugin_page = '<a target="_blank" href="' . $url . '">' . __('Update now', 'woo-discount-rules') . '</a>';
340
  ?>
v2/App/Helpers/Input.php CHANGED
@@ -276,14 +276,7 @@ class Input
276
  if(is_object($str)){
277
  return $str;
278
  }
279
- /* We strip slashes if magic quotes is on to keep things consistent
280
 
281
- NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
282
- it will probably not exist in future versions at all.
283
- */
284
- if (!$this->is_php('5.4') && get_magic_quotes_gpc()) {
285
- $str = stripslashes($str);
286
- }
287
  // Remove control characters
288
  $str = $this->remove_invisible_characters($str, FALSE);
289
  // Standardize newlines if needed
276
  if(is_object($str)){
277
  return $str;
278
  }
 
279
 
 
 
 
 
 
 
280
  // Remove control characters
281
  $str = $this->remove_invisible_characters($str, FALSE);
282
  // Standardize newlines if needed
v2/App/Helpers/Rule.php CHANGED
@@ -1682,6 +1682,39 @@ class Rule
1682
  return $custom_coupons;
1683
  }
1684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1685
  /**
1686
  * get all custom coupons
1687
  * @return array
1682
  return $custom_coupons;
1683
  }
1684
 
1685
+ /**
1686
+ * get all url coupons
1687
+ * @return array
1688
+ */
1689
+ function getAllUrlCoupons()
1690
+ {
1691
+ $available_rules = DBTable::getRules();
1692
+ $url_coupons = array();
1693
+ foreach ($available_rules as $rule) {
1694
+ if (isset($rule->enabled) && $rule->enabled == 1 && isset($rule->conditions) && !empty($rule->conditions) && $rule->conditions != '{}' && $rule->conditions != '[]') {
1695
+ $conditions = json_decode($rule->conditions);
1696
+ foreach ($conditions as $condition) {
1697
+ $option_obj = (isset($condition->options) && !empty($condition->options) ? $condition->options : '');
1698
+ $type = (isset($condition->type) && !empty($condition->type) ? $condition->type : '');
1699
+ $operator = (isset($option_obj->operator) && !empty($option_obj->operator) ? $option_obj->operator : '');
1700
+ $enable_url = (isset($option_obj->enable_url)) ? true : false;
1701
+ $values = (isset($option_obj->value) && is_array($option_obj->value)) ? $option_obj->value : [];
1702
+ $custom_value = (isset($option_obj->custom_value) && !empty($option_obj->custom_value) ? $option_obj->custom_value : '');
1703
+ if ($type == 'cart_coupon' && $enable_url) {
1704
+ if ($operator == 'custom_coupon' && $custom_value != '') {
1705
+ $url_coupons[] = $custom_value;
1706
+ } elseif (in_array($operator, ['all', 'at_least_one'])) {
1707
+ foreach ($values as $value) {
1708
+ $url_coupons[] = $value;
1709
+ }
1710
+ }
1711
+ }
1712
+ }
1713
+ }
1714
+ }
1715
+ return array_unique($url_coupons);
1716
+ }
1717
+
1718
  /**
1719
  * get all custom coupons
1720
  * @return array
v2/App/Helpers/Woocommerce.php CHANGED
@@ -27,9 +27,10 @@ class Woocommerce
27
 
28
  static function productTypeIs($product, $type)
29
  {
30
- if (method_exists($product, 'is_type')) {
31
- return $product->is_type($type);
32
- }
 
33
  return false;
34
  }
35
 
@@ -88,17 +89,20 @@ class Woocommerce
88
  */
89
  static function getProductId($product)
90
  {
91
- if (method_exists($product, 'get_id')) {
92
- return $product->get_id();
93
- } elseif (isset($product->id)) {
94
- $product_id = $product->id;
95
- if (isset($product->variation_id)) {
96
- $product_id = $product->variation_id;
 
 
 
 
 
97
  }
98
- return $product_id;
99
- } else {
100
- return NULL;
101
  }
 
102
  }
103
 
104
  /**
@@ -170,13 +174,14 @@ class Woocommerce
170
  */
171
  static function getProductSalePrice($product)
172
  {
173
- if (self::isProductInSale($product)) {
174
- if (method_exists($product, 'get_sale_price')) {
175
- $price = $product->get_sale_price();
176
- return apply_filters('advanced_woo_discount_rules_get_sale_price', $price, $product);
 
 
 
177
  }
178
- return false;
179
- }
180
  return false;
181
  }
182
 
@@ -187,15 +192,16 @@ class Woocommerce
187
  */
188
  static function isProductInSale($product)
189
  {
190
- if (method_exists($product, 'is_on_sale') && method_exists($product, 'get_sale_price')) {
191
- if($product->is_on_sale('')){
192
- if($product->get_sale_price()){
193
- return apply_filters('advanced_woo_discount_rules_is_on_sale', true, $product);
194
- }else{
195
- return apply_filters('advanced_woo_discount_rules_is_on_sale', false, $product);
 
 
196
  }
197
  }
198
- }
199
  return false;
200
  }
201
 
@@ -206,10 +212,11 @@ class Woocommerce
206
  */
207
  static function getProductRegularPrice($product)
208
  {
209
- if (method_exists($product, 'get_regular_price')) {
210
- $price = $product->get_regular_price();
211
- return apply_filters('advanced_woo_discount_rules_get_regular_price', $price, $product);
212
- }
 
213
  return false;
214
  }
215
 
@@ -220,10 +227,11 @@ class Woocommerce
220
  */
221
  static function getProductPrice($product)
222
  {
223
- if (method_exists($product, 'get_price')) {
224
- $price = $product->get_price();
225
- return apply_filters('advanced_woo_discount_rules_get_price', $price, $product);
226
- }
 
227
  return false;
228
  }
229
 
@@ -235,14 +243,15 @@ class Woocommerce
235
  static function getProductCategories($product)
236
  {
237
  $categories = $variant = array();
238
- if (method_exists($product, 'get_category_ids')) {
239
- if (self::productTypeIs($product, 'variation')) {
240
- $variant = $product;
241
- $parent_id = self::getProductParentId($product);
242
- $product = self::getProduct($parent_id);
 
 
 
243
  }
244
- $categories = $product->get_category_ids();
245
- }
246
  return apply_filters('advanced_woo_discount_rules_get_product_categories', $categories, $product, $variant);
247
  }
248
 
@@ -253,9 +262,10 @@ class Woocommerce
253
  */
254
  static function getProductTags($product)
255
  {
256
- if (method_exists($product, 'get_tag_ids')) {
257
- return $product->get_tag_ids();
258
- }
 
259
  return array();
260
  }
261
 
@@ -266,9 +276,10 @@ class Woocommerce
266
  */
267
  static function getProductAttributes($product)
268
  {
269
- if (method_exists($product, 'get_attributes')) {
270
- return $product->get_attributes();
271
- }
 
272
  return array();
273
  }
274
 
@@ -279,9 +290,10 @@ class Woocommerce
279
  */
280
  static function getProductChildren($product)
281
  {
282
- if (method_exists($product, 'get_children')) {
283
- return $product->get_children();
284
- }
 
285
  return array();
286
  }
287
 
@@ -292,9 +304,10 @@ class Woocommerce
292
  */
293
  static function getProductSku($product)
294
  {
295
- if (method_exists($product, 'get_sku')) {
296
- return $product->get_sku();
297
- }
 
298
  return NULL;
299
  }
300
 
@@ -307,9 +320,10 @@ class Woocommerce
307
  */
308
  static function getProductPriceSuffix($product, $price = '', $discount_prices = array())
309
  {
310
- if (method_exists($product, 'get_price_suffix')) {
311
- return apply_filters('advanced_woo_discount_rules_price_suffix', $product->get_price_suffix($price), $product, $price, $discount_prices);
312
- }
 
313
  return NULL;
314
  }
315
 
@@ -668,9 +682,10 @@ class Woocommerce
668
  if (is_int($product)) {
669
  $product = self::getProduct($product);
670
  }
671
- if (method_exists($product, 'get_parent_id')) {
672
- $parent_id = $product->get_parent_id();
673
- }
 
674
  return apply_filters('advanced_woo_discount_rules_get_product_parent_id', $parent_id, $product);
675
  }
676
 
@@ -865,10 +880,14 @@ class Woocommerce
865
  */
866
  static function getIncludingTaxPrice($product, $original_price, $quantity)
867
  {
868
- if (function_exists('wc_get_price_including_tax')) {
869
- $price = wc_get_price_including_tax($product, array('qty' => $quantity, 'price' => $original_price));
870
- } else if (method_exists($product, 'get_price_including_tax')) {
871
- $price = $product->get_price_including_tax($quantity, $original_price);
 
 
 
 
872
  } else {
873
  $price = $original_price;
874
  }
@@ -885,10 +904,14 @@ class Woocommerce
885
  */
886
  static function getExcludingTaxPrice($product, $original_price, $quantity)
887
  {
888
- if (function_exists('wc_get_price_excluding_tax')) {
889
- $price = wc_get_price_excluding_tax($product, array('qty' => $quantity, 'price' => $original_price));
890
- } else if (method_exists($product, 'get_price_excluding_tax')) {
891
- $price = $product->get_price_excluding_tax($quantity, $original_price);
 
 
 
 
892
  } else {
893
  $price = $original_price;
894
  }
@@ -1548,9 +1571,10 @@ class Woocommerce
1548
  */
1549
  static function getPriceHtml($product){
1550
  $html = false;
1551
- if (method_exists($product, 'get_price_html')) {
1552
- $html = $product->get_price_html();
1553
- }
 
1554
  return apply_filters('advanced_woo_discount_rules_get_price_html', $html, $product);
1555
  }
1556
 
@@ -1643,9 +1667,10 @@ class Woocommerce
1643
  * @return string
1644
  */
1645
  public static function get_variation_regular_price($product, $min_or_max = 'min', $for_display = false){
1646
- if(method_exists($product, 'get_variation_regular_price')){
1647
- return $product->get_variation_regular_price($min_or_max, $for_display);
1648
- }
 
1649
  return 0;
1650
  }
1651
 
@@ -1661,24 +1686,25 @@ class Woocommerce
1661
  * @param $product
1662
  * @return array
1663
  */
1664
- public static function availableProductVariations($product){
1665
- $available_variations = array();
1666
- $is_variable_product = self::productTypeIs($product, 'variable');
1667
- if ($is_variable_product && method_exists($product, 'get_available_variations')){
1668
- $available_variations = $product->get_available_variations();
1669
- }
1670
- return $available_variations;
1671
- }
1672
-
1673
- /**
1674
- * WC format price
1675
- * */
1676
- public static function wc_format_decimal($price, $dp = false, $trim_zeros = false ){
1677
- if (function_exists('wc_format_decimal')) {
1678
- $price = wc_format_decimal($price, $dp, $trim_zeros);
1679
- }
1680
- return $price;
1681
- }
 
1682
 
1683
  /**
1684
  * get the product visibility
@@ -1687,11 +1713,12 @@ class Woocommerce
1687
  */
1688
  static function variationIsVisible($product)
1689
  {
1690
- if (method_exists($product, 'variation_is_visible')) {
1691
- return $product->variation_is_visible();
1692
- } else {
1693
- return false;
1694
  }
 
1695
  }
1696
 
1697
  /**
27
 
28
  static function productTypeIs($product, $type)
29
  {
30
+ if(!empty($product))
31
+ if (method_exists($product, 'is_type')) {
32
+ return $product->is_type($type);
33
+ }
34
  return false;
35
  }
36
 
89
  */
90
  static function getProductId($product)
91
  {
92
+ if(!empty($product)){
93
+ if (method_exists($product, 'get_id')) {
94
+ return $product->get_id();
95
+ } elseif (isset($product->id)) {
96
+ $product_id = $product->id;
97
+ if (isset($product->variation_id)) {
98
+ $product_id = $product->variation_id;
99
+ }
100
+ return $product_id;
101
+ } else {
102
+ return NULL;
103
  }
 
 
 
104
  }
105
+ return NULL;
106
  }
107
 
108
  /**
174
  */
175
  static function getProductSalePrice($product)
176
  {
177
+ if(!empty($product))
178
+ if (self::isProductInSale($product)) {
179
+ if (method_exists($product, 'get_sale_price')) {
180
+ $price = $product->get_sale_price();
181
+ return apply_filters('advanced_woo_discount_rules_get_sale_price', $price, $product);
182
+ }
183
+ return false;
184
  }
 
 
185
  return false;
186
  }
187
 
192
  */
193
  static function isProductInSale($product)
194
  {
195
+ if(!empty($product))
196
+ if (method_exists($product, 'is_on_sale') && method_exists($product, 'get_sale_price')) {
197
+ if($product->is_on_sale('')){
198
+ if($product->get_sale_price()){
199
+ return apply_filters('advanced_woo_discount_rules_is_on_sale', true, $product);
200
+ }else{
201
+ return apply_filters('advanced_woo_discount_rules_is_on_sale', false, $product);
202
+ }
203
  }
204
  }
 
205
  return false;
206
  }
207
 
212
  */
213
  static function getProductRegularPrice($product)
214
  {
215
+ if(!empty($product))
216
+ if (method_exists($product, 'get_regular_price')) {
217
+ $price = $product->get_regular_price();
218
+ return apply_filters('advanced_woo_discount_rules_get_regular_price', $price, $product);
219
+ }
220
  return false;
221
  }
222
 
227
  */
228
  static function getProductPrice($product)
229
  {
230
+ if(!empty($product))
231
+ if (method_exists($product, 'get_price')) {
232
+ $price = $product->get_price();
233
+ return apply_filters('advanced_woo_discount_rules_get_price', $price, $product);
234
+ }
235
  return false;
236
  }
237
 
243
  static function getProductCategories($product)
244
  {
245
  $categories = $variant = array();
246
+ if(!empty($product))
247
+ if (method_exists($product, 'get_category_ids')) {
248
+ if (self::productTypeIs($product, 'variation')) {
249
+ $variant = $product;
250
+ $parent_id = self::getProductParentId($product);
251
+ $product = self::getProduct($parent_id);
252
+ }
253
+ $categories = $product->get_category_ids();
254
  }
 
 
255
  return apply_filters('advanced_woo_discount_rules_get_product_categories', $categories, $product, $variant);
256
  }
257
 
262
  */
263
  static function getProductTags($product)
264
  {
265
+ if(!empty($product))
266
+ if (method_exists($product, 'get_tag_ids')) {
267
+ return $product->get_tag_ids();
268
+ }
269
  return array();
270
  }
271
 
276
  */
277
  static function getProductAttributes($product)
278
  {
279
+ if(!empty($product))
280
+ if (method_exists($product, 'get_attributes')) {
281
+ return $product->get_attributes();
282
+ }
283
  return array();
284
  }
285
 
290
  */
291
  static function getProductChildren($product)
292
  {
293
+ if(!empty($product))
294
+ if (method_exists($product, 'get_children')) {
295
+ return $product->get_children();
296
+ }
297
  return array();
298
  }
299
 
304
  */
305
  static function getProductSku($product)
306
  {
307
+ if(!empty($product))
308
+ if (method_exists($product, 'get_sku')) {
309
+ return $product->get_sku();
310
+ }
311
  return NULL;
312
  }
313
 
320
  */
321
  static function getProductPriceSuffix($product, $price = '', $discount_prices = array())
322
  {
323
+ if(!empty($product))
324
+ if (method_exists($product, 'get_price_suffix')) {
325
+ return apply_filters('advanced_woo_discount_rules_price_suffix', $product->get_price_suffix($price), $product, $price, $discount_prices);
326
+ }
327
  return NULL;
328
  }
329
 
682
  if (is_int($product)) {
683
  $product = self::getProduct($product);
684
  }
685
+ if(!empty($product))
686
+ if (method_exists($product, 'get_parent_id')) {
687
+ $parent_id = $product->get_parent_id();
688
+ }
689
  return apply_filters('advanced_woo_discount_rules_get_product_parent_id', $parent_id, $product);
690
  }
691
 
880
  */
881
  static function getIncludingTaxPrice($product, $original_price, $quantity)
882
  {
883
+ if(!empty($product)){
884
+ if (function_exists('wc_get_price_including_tax')) {
885
+ $price = wc_get_price_including_tax($product, array('qty' => $quantity, 'price' => $original_price));
886
+ } else if (method_exists($product, 'get_price_including_tax')) {
887
+ $price = $product->get_price_including_tax($quantity, $original_price);
888
+ } else {
889
+ $price = $original_price;
890
+ }
891
  } else {
892
  $price = $original_price;
893
  }
904
  */
905
  static function getExcludingTaxPrice($product, $original_price, $quantity)
906
  {
907
+ if(!empty($product)){
908
+ if (function_exists('wc_get_price_excluding_tax')) {
909
+ $price = wc_get_price_excluding_tax($product, array('qty' => $quantity, 'price' => $original_price));
910
+ } else if (method_exists($product, 'get_price_excluding_tax')) {
911
+ $price = $product->get_price_excluding_tax($quantity, $original_price);
912
+ } else {
913
+ $price = $original_price;
914
+ }
915
  } else {
916
  $price = $original_price;
917
  }
1571
  */
1572
  static function getPriceHtml($product){
1573
  $html = false;
1574
+ if(!empty($product))
1575
+ if (method_exists($product, 'get_price_html')) {
1576
+ $html = $product->get_price_html();
1577
+ }
1578
  return apply_filters('advanced_woo_discount_rules_get_price_html', $html, $product);
1579
  }
1580
 
1667
  * @return string
1668
  */
1669
  public static function get_variation_regular_price($product, $min_or_max = 'min', $for_display = false){
1670
+ if(!empty($product))
1671
+ if(method_exists($product, 'get_variation_regular_price')){
1672
+ return $product->get_variation_regular_price($min_or_max, $for_display);
1673
+ }
1674
  return 0;
1675
  }
1676
 
1686
  * @param $product
1687
  * @return array
1688
  */
1689
+ public static function availableProductVariations($product){
1690
+ $available_variations = array();
1691
+ $is_variable_product = self::productTypeIs($product, 'variable');
1692
+ if(!empty($product))
1693
+ if ($is_variable_product && method_exists($product, 'get_available_variations')){
1694
+ $available_variations = $product->get_available_variations();
1695
+ }
1696
+ return $available_variations;
1697
+ }
1698
+
1699
+ /**
1700
+ * WC format price
1701
+ * */
1702
+ public static function wc_format_decimal($price, $dp = false, $trim_zeros = false ){
1703
+ if (function_exists('wc_format_decimal')) {
1704
+ $price = wc_format_decimal($price, $dp, $trim_zeros);
1705
+ }
1706
+ return $price;
1707
+ }
1708
 
1709
  /**
1710
  * get the product visibility
1713
  */
1714
  static function variationIsVisible($product)
1715
  {
1716
+ if(!empty($product)){
1717
+ if (method_exists($product, 'variation_is_visible')) {
1718
+ return $product->variation_is_visible();
1719
+ }
1720
  }
1721
+ return false;
1722
  }
1723
 
1724
  /**
v2/App/Models/Recipes.php CHANGED
@@ -30,7 +30,7 @@ class Recipes
30
  'set_adjustments' => '{"cart_label":""}',
31
  'advanced_discount_message' => '{"display":"0","badge_color_picker":"#ffffff","badge_text_color_picker":"#000000","badge_text":""}',
32
  'discount_type' => 'wdr_simple_discount',
33
- 'used_coupons' => '[]'
34
  ),
35
  'simple_recipe_2' => array(
36
  'title' => 'Subtotal tiered discount - sample',
30
  'set_adjustments' => '{"cart_label":""}',
31
  'advanced_discount_message' => '{"display":"0","badge_color_picker":"#ffffff","badge_text_color_picker":"#000000","badge_text":""}',
32
  'discount_type' => 'wdr_simple_discount',
33
+ 'used_coupons' => '["summer"]'
34
  ),
35
  'simple_recipe_2' => array(
36
  'title' => 'Subtotal tiered discount - sample',
v2/App/Router.php CHANGED
@@ -121,6 +121,9 @@ class Router
121
  add_filter('woocommerce_get_price_html', array(self::$manage_discount, 'getPriceHtmlSalePriceAdjustment'), 9, 2);
122
  add_filter('woocommerce_variable_price_html', array(self::$manage_discount, 'getVariablePriceHtml'), 100, 2);
123
 
 
 
 
124
  add_filter('woocommerce_coupon_message', array(self::$manage_discount, 'removeAppliedMessageOfThirdPartyCoupon'), 10, 3);
125
 
126
  //Show on sale badge
121
  add_filter('woocommerce_get_price_html', array(self::$manage_discount, 'getPriceHtmlSalePriceAdjustment'), 9, 2);
122
  add_filter('woocommerce_variable_price_html', array(self::$manage_discount, 'getVariablePriceHtml'), 100, 2);
123
 
124
+ // Apply url coupons
125
+ add_action('wp_loaded', array(self::$manage_discount, 'applyUrlCoupon'));
126
+
127
  add_filter('woocommerce_coupon_message', array(self::$manage_discount, 'removeAppliedMessageOfThirdPartyCoupon'), 10, 3);
128
 
129
  //Show on sale badge
v2/App/Views/Admin/Tabs/DiscountRule.php CHANGED
@@ -386,7 +386,7 @@ $is_pro = \Wdr\App\Helpers\Helper::hasPro();
386
  if(!$is_pro){ ?>
387
  <div class="col-md-6 col-lg-6 text-right" style="width: 27%; float: right;">
388
  <div class="col-md-12">
389
- <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=woo-discount-rules" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
390
  </div>
391
  <div class="woo-side-panel">
392
  <div class="panel">
386
  if(!$is_pro){ ?>
387
  <div class="col-md-6 col-lg-6 text-right" style="width: 27%; float: right;">
388
  <div class="col-md-12">
389
+ <a href="https://docs.flycart.org/en/articles/3806305-upgrade-from-free-to-pro?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=upgrade" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
390
  </div>
391
  <div class="woo-side-panel">
392
  <div class="panel">
v2/App/Views/Admin/Tabs/help.php CHANGED
@@ -157,7 +157,7 @@ if (!defined('ABSPATH')) {
157
  <div class="awdr-fourth-column awdr-three-column-inner">
158
  <div>
159
  <div class="col-md-12">
160
- <a href="https://www.flycart.org/products/wordpress/woocommerce-discount-rules?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=woo-discount-rules" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
161
  </div>
162
  <div class="woo-side-panel">
163
  <div class="panel">
157
  <div class="awdr-fourth-column awdr-three-column-inner">
158
  <div>
159
  <div class="col-md-12">
160
+ <a href="https://docs.flycart.org/en/articles/3806305-upgrade-from-free-to-pro?utm_source=wpwoodiscountrules&utm_medium=plugin&utm_campaign=inline&utm_content=upgrade" target="_blank" class="btn btn-success"><?php esc_html_e('Looking for more features? Upgrade to PRO', 'woo-discount-rules'); ?></a>
161
  </div>
162
  <div class="woo-side-panel">
163
  <div class="panel">
v2/Assets/Css/admin_style.css CHANGED
@@ -1542,4 +1542,42 @@ div.awdr_recipe_main_card{
1542
  .awdr-compatible-field{
1543
  clear: both;
1544
  padding-top: 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1545
  }
1542
  .awdr-compatible-field{
1543
  clear: both;
1544
  padding-top: 15px;
1545
+ }
1546
+
1547
+ .wdr-cart-coupon-url {
1548
+ display: inline-grid !important;
1549
+ width: 100%;
1550
+ }
1551
+ .wdr-cart-coupon-url-lists {
1552
+ margin-top: 10px !important;
1553
+ }
1554
+ .wdr-cart-coupon-url-custom,
1555
+ .wdr-cart-coupon-url-one,
1556
+ .wdr-cart-coupon-url-all,
1557
+ .wdr-coupon-url-group {
1558
+ margin-left: 0;
1559
+ }
1560
+ .wdr-coupon-url-group label {
1561
+ vertical-align: top;
1562
+ }
1563
+ .wdr-coupon-url-group button {
1564
+ height: 30px;
1565
+ padding-left: 8px;
1566
+ padding-right: 8px;
1567
+ border-radius: 0 4px 4px 0;
1568
+ background: #f0f0f1;
1569
+ margin-left: -8px;
1570
+ margin-bottom: 10px;
1571
+ color: #0a4b78;
1572
+ border: 1px dashed #0a4b78;
1573
+ }
1574
+ .wdr-coupon-url-group button:hover {
1575
+ background: #f0f0f1;
1576
+ border: 1px dashed #0a4b78;
1577
+ cursor: pointer;
1578
+ }
1579
+ .wdr-coupon-url-group input,
1580
+ .wdr-coupon-url-group input:focus{
1581
+ border: 1px dashed #0a4b78;
1582
+ box-shadow: none;
1583
  }
v2/Assets/Css/admin_style.min.css CHANGED
@@ -1 +1 @@
1
- .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.wdr-status-alert{padding:8px;border:1px solid transparent;border-radius:4px}.awdr-container .status-alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.awdr-container .status-alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.awdr-container .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.awdr-container .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.awdr-container .btn-danger,.wdr .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.awdr-container .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.awdr-container .btn-warning{color:#fff;background-color:#ffc100;border-color:#ffc100}.text-right{float:right;margin:2px;text-decoration:none}.wdr-rule-menu{float:left;width:19%;background-color:#fff;padding:10px 10px 0 10px}.wdr-rule-menu button{background-color:#6495ed;padding:8px;margin-top:7px;display:block;width:100%;color:#fff;text-decoration:none;border-radius:3px;border:1px solid #92b4f2}.main{float:left;width:80%;background-color:#fff;clear:right}.right{background-color:#e5e5e5;float:left;width:20%;padding:15px;margin-top:7px;text-align:center}.wdr-block{border:1px solid #dcdcdc;font-size:12px;line-height:24px;padding:5px 10px 10px 10px;color:#555;margin-top:5px;margin-bottom:10px;background-color:#fff}.wdr-grid{width:100%}.grid-container1{width:100%;display:table}.wdr-general-grid-container{display:grid;grid-template-columns:auto;grid-gap:10px}.wdr-general-grid-container>div{text-align:left;padding:5px 0}.wdr-rule-setting{display:grid;grid-template-columns:14% auto 30%;grid-gap:10px}.wdr-rule-date-valid{display:grid;grid-template-columns:49% 49%;grid-gap:10px}.wdr-rule-setting>div{padding:5px 0}.wdr-title{width:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:4px;background-color:#fff;padding:8px 10px 8px 10px;height:40px}.wdr-discount-type-selector{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;background-color:#fff;padding:8px 10px 8px 10px;height:40px}.wdr-save-rule{background-color:#6495ed!important;color:#fff!important;border:1px solid #92b4f2!important}.wdr-add-condition{line-height:24px;margin-top:10px}.wdr-column{margin-right:10px}.wdr-active{cursor:no-drop;background-color:#fff!important;color:#6495ed!important}.wdr-inactive:hover{cursor:pointer;background-color:#92b4f2!important}.wdr-conditions-container[data-index="1"]{display:none}.wdr-conditions-container{padding:10px 0 20px 0;list-style:none;display:flex;margin:10px 0;border-bottom:1px solid #ddd}.wdr-condition-types{width:22%;padding-right:5px}.wdr-condition-container{width:75%;display:flex;flex-wrap:nowrap}.wdr-discount-tabs{width:100%;display:table}.wdr-discount-tabs a{text-decoration:none;display:table-cell;padding:5px}.wdr-simple-discount-main{display:table;width:100%}.wdr-simple-discount-inner div{padding:5px;display:table-cell;width:auto;vertical-align:middle}.wdr-cart-discount-main{display:grid;width:100%}.wdr-cart-discount-inner div{padding:5px;display:inline-grid;width:auto}.wdr-discount-block{font-size:12px;line-height:24px;padding:5px 10px 10px 10px;color:#555;margin-bottom:10px}.wdr_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;float:left;padding-top:5px}.wdr_settings_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;float:left;padding-top:5px}.wdr_save_btn_disabled{opacity:.3;cursor:default}.awdr-container .toggle{--uiToggleSize:var(--toggleSize, 20px);--uiToggleIndent:var(--toggleIndent, .4em);--uiToggleBorderWidth:var(--toggleBorderWidth, 2px);--uiToggleColor:var(--toggleColor, #000);--uiToggleDisabledColor:var(--toggleDisabledColor, #868e96);--uiToggleBgColor:var(--toggleBgColor, #fff);--uiToggleArrowWidth:var(--toggleArrowWidth, 2px);--uiToggleArrowColor:var(--toggleArrowColor, #fff);display:inline-block;position:relative}.awdr-container .toggle__input{position:absolute;left:-99999px}.awdr-container .toggle__label{display:inline-flex;cursor:pointer;min-height:var(--uiToggleSize);padding-left:calc(var(--uiToggleSize) + var(--uiToggleIndent))}.awdr-container .toggle__label:before,.toggle__label:after{content:"";box-sizing:border-box;width:1em;height:1em;font-size:var(--uiToggleSize);position:absolute;left:0;top:0}.awdr-container .toggle__label:before{border:var(--uiToggleBorderWidth) solid var(--uiToggleColor);z-index:2}.awdr-container .toggle__input:disabled~.toggle__label:before{border-color:var(--uiToggleDisabledColor)}.awdr-container .toggle__input:focus~.toggle__label:before{box-shadow:0 0 0 2px var(--uiToggleBgColor),0 0 0 4px var(--uiToggleColor)}.awdr-container .toggle__input:not(:disabled):checked:focus~.toggle__label:after{box-shadow:0 0 0 2px var(--uiToggleBgColor),0 0 0 4px var(--uiToggleColor)}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after{background-color:var(--uiToggleColor);opacity:0}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:after{opacity:1}.awdr-container .toggle__text{margin-top:auto;margin-bottom:auto}.awdr-container .toggle__text:before{content:"";box-sizing:border-box;width:0;height:0;font-size:var(--uiToggleSize);border-left-width:0;border-bottom-width:0;border-left-style:solid;border-bottom-style:solid;border-color:var(--uiToggleArrowColor);position:absolute;top:.5428em;left:.2em;z-index:3;transform-origin:left top;transform:rotate(-40deg) skew(10deg)}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label .toggle__text:before{width:.5em;height:.25em;border-left-width:var(--uiToggleArrowWidth);border-bottom-width:var(--uiToggleArrowWidth);will-change:width,height;transition:width .1s ease-out .2s,height .2s ease-out}.awdr-container .toggle__label:before,.toggle__label:after{border-radius:2px}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after,.awdr-container .toggle__input:not(:disabled)~.toggle__label:before{opacity:1;transform-origin:center center;will-change:transform;transition:transform .2s ease-out}.awdr-container .toggle__input:not(:disabled)~.toggle__label:before{transform:rotateY(0);transition-delay:.2s}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after{transform:rotateY(90deg)}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:before{transform:rotateY(-90deg);transition-delay:0s}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:after{transform:rotateY(0);transition-delay:.2s}.awdr-container .toggle__text:before{opacity:0}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label .toggle__text:before{opacity:1;transition:opacity .1s ease-out .3s,width .1s ease-out .5s,height .2s ease-out .3s}.awdr-container .toggle{--toggleColor:#6495ed;--toggleBgColor:#6495ed;--toggleSize:25px}.awdr-container .page__toggle{padding-left:20px;padding-top:7px}.wdr-enable-rule .wdr-discount-type{width:19.7%}.wdr-enable-rule{display:flex;padding:10px 30px 20px 2px}@media only screen and (max-width:620px){.main,.right,.wdr-rule-menu{width:100%}}.wdr-sticky-header{background-color:#fff;padding:20px;margin-bottom:20px}.wdr-sticky{position:fixed;top:33px;width:87%;overflow:hidden;background-color:#eee;z-index:1}.nav-tab.nav-tab-active{background-color:#fff}.awdr-product-selector{width:100%!important;margin-bottom:10px;padding-left:4px}.wdr-filter-type select{height:34px}.wdr-product_filter_method select{height:34px}.wdr-product-filter-type{min-width:100px}.wdr-alert-top-right{position:fixed;top:116px;right:30px;width:300px;z-index:9999}.wdr-alert-success{color:#fff;background:green;font-weight:bolder}.wdr-alert-error{color:#fff;background:red;font-weight:bolder}.wdr-alert-warning{color:#fff;background:#f4a460;font-weight:bolder}.wdr-alert{border-radius:5px;padding:10px;margin-bottom:10px;width:100%!important;z-index:9999}.wdr-general-setting.form-table th{padding:20px 10px 20px 10px;width:300px}.wdr-filter-type{display:inline-block}.wdr-filter-group-items .wdr-filter-group .wdr-products_group{padding-right:10px;display:inline-flex;flex-wrap:nowrap;width:60%}.wdr_filter_remove{display:inline-block}.wdr-cart-search_box{min-width:500px}.wdr-coupon-search_box{min-width:400px}.wdr-search-box{min-width:250px;vertical-align:super}.wdr-filter-group{margin-bottom:10px;padding:15px 0 15px 0;border-bottom:1px solid #ddd}.wdr-condition-type select{height:34px}.wdr-select-filed-hight select{height:34px}.wdr-input-filed-hight input{height:34px!important}.add-condition-and-filters{margin-top:15px}.wdr-tool-tip{background-color:gray;color:#fff;display:inline-block;padding-left:5px;padding-right:5px;text-align:center;border-radius:50%;font-size:10px;font-weight:bolder;cursor:help}.wdr-hide{display:none}.padding10{padding:10px}.wdr-rule-statistics{display:flex}.wdr-rule-statistics>div{padding:10px}.awdr-container .button.bottom-tabs{margin-right:5px}.awdr-container .remove-clicked-discount-block:hover,.awdr-container .remove-current-row:hover,.awdr-container .wdr_discount_remove:hover{cursor:pointer}.wdr-ruleboard{cursor:move}.wdr-loader{display:none!important;width:64px;height:64px;position:absolute;left:0;right:0;z-index:999;margin:auto;top:0;bottom:0}.wdr-loader:after{content:" ";display:block;width:46px;height:46px;margin:1px;border-radius:50%;border:5px solid #333;border-color:#333 transparent #333 transparent;animation:wdr-loader 1.2s linear infinite}@keyframes wdr-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.awdr-container textarea{width:100%;height:150px;padding:10px 20px;box-sizing:border-box;border:1px solid #ddd;border-radius:4px;background-color:#f8f8f8;resize:none}.adv-msg-max-qty,.adv-msg-min-qty{display:none}.wdr-customizer-container{width:100%}.wdr-customizer-grid{display:grid;grid-template-columns:53% 47%;grid-gap:10px;padding:10px}.wdr-customizer-grid>div{padding:0 0}.popup-bulk-table{padding:0 0;margin-top:0}.popup-bulk-table tr th{padding:20px 20px}.wdr_bulk_table_msg{width:100%}.awdr-container .modal,.awdr-container .modal-box{z-index:9999;visibility:unset;opacity:1}.awdr-container .modal-sandbox{position:fixed;width:100%;height:100%;top:0;left:0;background:0 0}.awdr-container .modal{display:none;position:fixed;width:100%;height:100%;left:0;top:0;background:#000;background:rgba(0,0,0,.8);overflow:auto}.awdr-container .modal-box{position:relative;width:80%;max-width:920px;margin:100px auto;animation-name:modalbox;animation-duration:.4s;animation-timing-function:cubic-bezier(0,0,.3,1.6)}.awdr-container .modal-header{padding:20px 40px;background:#6495ed;color:#fff}.awdr-container .modal-body{background:#eceff1;padding:50px 15px}.awdr-container .close-modal{text-align:right;cursor:pointer}@-webkit-keyframes modalbox{0%{top:-250px;opacity:0}100%{top:0;opacity:1}}@keyframes modalbox{0%{top:-250px;opacity:0}100%{top:0;opacity:1}}.awdr-configuration-form .modal-trigger{top:50%;left:50%;background:0 0;border:1px solid #fff;text-decoration:none}.wdr-modal-header-title{color:#fff}.wdr-model-bottom-btn{float:right;margin:5px}.wdr-popup-link{cursor:pointer}table.wdr_bulk_table_msg,td.wdr_bulk_table_td,th.wdr_bulk_table_td,tr.wdr_bulk_table_tr{padding:10px}.wdr-customizer-notes{padding:0 10px}.wdr-red-text{color:red}.wdr-cart-coupon-value .coupon_name_msg{text-transform:uppercase}span#awdr_shortcode_text{font-weight:700}.awdr-list-header-btn a.text-right{float:right;margin-left:10px;text-decoration:none}.wdr-rule-options-con{width:80%;float:left}.awdr-clear{height:inherit;clear:both}.wdr-rule-filters-and-options-con{background-color:#fff;display:flex;padding:10px}.wdr-btn-remove .wdr_discount_remove,.wdr-condition-group .remove-current-row,.wdr-discount-block-remove .remove-clicked-discount-block,.wdr_filter_remove .remove-current-row{color:#fff;background-color:#d9534f;border-radius:3px}.wdr-condition-group .remove-current-row{margin-top:5px}.wdp-block.add-condition{margin-top:10px}.set_range_setter{margin-bottom:15px}.bulk_range_setter .wdr-simple-discount-inner,.range_setter_inner .wdr-simple-discount-inner,.wdr-cart-discount-placement .wdr-simple-discount-inner{border-bottom:1px solid #ddd;padding:5px 0}.buyx_getx_individual_range{padding:5px 0}.wdr-conditions-container .float_only_field,.wdr-conditions-container .number_only_field,.wdr-conditions-container input[type=number]{width:100px}.wdr-condition-type-options div{display:inline-block;margin:0 2px}.wdr-condition-type-options{margin:0 5px}#configuration-form table tbody tr>td:first-child{width:400px}.wdr_color_picker{letter-spacing:.2rem}.wdr_adv_msg_shortcode_text{color:#a9a9a9;font-size:12px}.awdr_popup_col_name_text_box{width:100%!important}#customize-bulk-table-title{width:40%;text-align:left}#customize-bulk-table-discount,#customize-bulk-table-range{width:30%;text-align:left}table.wdr_bulk_table_msg{border-collapse:collapse}table.wdr_bulk_table_msg,td.wdr_bulk_table_td,th.wdr_bulk_table_td,tr.wdr_bulk_table_tr{border:1px solid #bfc6cb}.awdr-dragable{cursor:ew-resize;word-break:break-all}.awdr_valide_date_in_desc{line-height:28px;font-size:14px;padding-left:20px}.wdr_customize_table table tbody tr>td:first-child{width:auto!important}.awdr-listing-rule-tr:hover{background-color:#ddf2ff}tr.awdr-listing-rule-tr td{vertical-align:middle}.awdr-text-warning{color:#8a6d3b}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:0!important}.widefat tbody th.check-column{padding:0!important}.widefat .check-column{width:2.2em!important;padding:0!important;vertical-align:middle!important}.awdr-save-green{border-radius:5px;padding:10px;width:98%;z-index:9999}.awdr-error-red{border-radius:5px;padding:10px;width:98%;z-index:9999}.banner-short-code-setting{vertical-align:middle;line-height:39px}.awdr-condition-container,.awdr-discount-container{background-color:#fff;margin:20px 0;clear:both}.awdr-discount-batch-container{background-color:#fff;clear:both}.awdr-condition-container h2,.awdr-discount-container h2,.wdr-advanced-layout-groups h2,.wdr-rule-menu h2{color:#6495ed;margin:auto}.awdr-sub-heading-description{font-size:smaller;color:gray}.woocommerce table.form-table.awdr-discount-badge{table-layout:auto!important}.woocommerce table.form-table.awdr-discount-badge input[type=text]{width:auto}.awdr-exclusive-enable-listing{color:#4cae4c;font-size:10px;border:1px solid #4cae4c;padding:2px;margin:8px;border-radius:3px}.awdr-exclusive-disable-listing{color:#d43f3a;font-size:10px;border:1px solid #d43f3a;padding:2px;margin:8px;border-radius:3px}.switch{position:relative;display:block;vertical-align:top;width:84px;height:30px;padding:3px;margin:0 5px 10px 0;border-radius:0;cursor:pointer;box-sizing:content-box}.switch-input{position:absolute;top:0;left:0;opacity:0;box-sizing:content-box}.switch-label{position:relative;display:block;height:inherit;font-size:13px;background:grey;border-radius:4px;box-sizing:content-box}.switch-label:after,.switch-label:before{position:absolute;top:50%;margin-top:-.5em;line-height:1;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit;box-sizing:content-box}.switch-label:before{content:attr(data-off);right:11px;color:#fff;text-shadow:0 1px rgba(255,255,255,.5)}.switch-label:after{content:attr(data-on);left:11px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}.switch-input:checked~.switch-label{background:#5cb85c;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}.switch-input:checked~.switch-label:before{opacity:0}.switch-input:checked~.switch-label:after{opacity:1}.switch-handle{position:absolute;top:4px;left:4px;width:12px;height:28px;background:linear-gradient(to bottom,#fff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#fff 40%,#f0f0f0);border-radius:4px;box-shadow:1px 1px 5px rgba(0,0,0,.2)}.switch-handle:before{content:"";position:absolute;top:50%;left:50%;margin:-6px 0 0 -6px;width:12px;height:12px;background:linear-gradient(to bottom,#eee,#fff);background-image:-webkit-linear-gradient(top,#eee,#fff);border-radius:6px;box-shadow:inset 0 1px rgba(0,0,0,.02)}.switch-input:checked~.switch-handle{left:74px;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}.switch-handle,.switch-label{transition:All .3s ease;-webkit-transition:All .3s ease;-moz-transition:All .3s ease;-o-transition:All .3s ease}.awdr-container input[type=color]{padding:2px}.awdr-common-save{margin-left:auto}.wdr-buyx-getx-discount-main,.wdr-buyx-gety-discount-main{display:grid;width:100%}.awdr-buyx-getx-number-box,.awdr-buyx-gety-number-box{width:150px}.wdr-buyx-getx-discount-inner div,.wdr-buyx-gety-discount-inner div{display:inline-grid;width:auto;padding:5px}.awdr-discount-add-row{padding-left:14px}.awdr-listing-status-text{padding-left:10px}.awdr-get-y-general-settings{display:flex;width:auto}.awdr-left-align{float:left}.awdr-clear-both{clear:both}.awdr_check_styles{display:flex}.awdr_discount_type_section{padding-bottom:20px}.awdr-rules-sub-menu{padding-top:42px!important}.awdr-rule-limit-timestamp{color:#a9a9a9;display:inline-block;font-size:12px;text-transform:capitalize;line-height:34px;padding-left:15px}#wpfooter{position:relative;z-index:-1}.wdr-buyx-gety-discount-inner{padding:5px}.page__toggle.apply_as_cart_checkbox{padding-left:11px;padding-top:20px}.apply_as_cart_checkbox .toggle__label:after,.apply_as_cart_checkbox .toggle__label:before{width:.8em!important;height:.8em!important}.toggle_tic.toggle__text:before{top:.43em!important;left:.1em!important}.apply_discount_as_cart_section{display:flex}.apply_fee_coupon_label{padding-left:15px;padding-top:13px}.bulk-row-start{border-bottom:1px solid #ddd;padding:5px 0}.bulk-row-start div{padding:5px;display:table-cell;width:min-content}.woocommerce table.form-table.popup-bulk-table th{padding-right:0!important}.awdr_table_columns{display:flex}.awdr-accordion{background-color:#fff;color:#6495ed;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:0;font-weight:600;font-size:1.3em;transition:.4s}.awdr-accordion-active,.awdr-accordion:hover{background-color:grey;color:#fff}.awdr-accordion-panel{display:none;background-color:#fff;overflow:hidden}.awdr-accordion:after{content:'\02795';font-size:13px;color:#777;float:right;margin-left:5px}.awdr-accordion-active:after{content:"\2796"}.wdr_filter_desc_text{color:#a9a9a9;display:block;font-size:12px;padding-top:5px}.wdr_select2_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;text-transform:capitalize;padding-top:5px}.awdr-sort-icon{padding-top:12px!important}.bulk_range_setter{cursor:move}.dashicons-menu{color:#a9a9a9!important}.dashicons-menu:hover{color:#000!important}.awdr_admin_discount_bar{padding:10px;margin-bottom:10px;border-radius:4px}.wdr_migration_container{margin:10px 0}.wdr_settings .woo_discount_loader{display:none;position:absolute;background-color:rgba(255,255,255,.5);top:0;left:0;width:100%;height:100%;text-align:center}.woo_discount_loader .lds-ripple{display:inline-block;position:relative;top:50%;width:64px;height:64px}.woo_discount_loader .lds-ripple div{position:absolute;border:4px solid #257af0;opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.woo_discount_loader .lds-ripple div:nth-child(2){animation-delay:-.5s}@keyframes lds-ripple{0%{top:28px;left:28px;width:0;height:0;opacity:1}100%{top:-1px;left:-1px;width:58px;height:58px;opacity:0}}.awdr-product-selector span.select2-selection{max-height:100px;overflow:auto}.bulk_discount_max,.bulk_discount_min,.bulk_discount_value,.set_discount_min,.set_discount_value{max-width:106px}.set-for{padding-bottom:32px!important}.set-discount-row-main{display:grid;width:100%}.set-discount-row-inner>div{display:inline-grid;width:auto;padding:5px}.bulk-row-main{display:grid;width:100%}.bulk-row-inner>div{display:inline-grid;width:auto;padding:5px}fieldset{border:1px solid #a9a9a9!important;float:left;margin:5px}.awdr-switch-version-button-on-tab{float:right;background:#5bc0de;color:#fff}.awdr_version_text{font-size:12px;display:inline-block;position:relative;top:10px;left:8px;font-weight:400;padding-right:10px}.awdr_rebuild_on_sale_list_notice{color:red;padding:8px 0}.awdr_rebuild_on_sale_rule_page_con{display:none}.awdr_rebuild_on_sale_rule_page_con.need_attention{display:contents}div.wdr{margin-top:30px;margin-right:20px}.awdr-common-save>button,.awdr-rule-buttons>a{margin-bottom:2px}@media (min-width:320px) and (max-width:480px){.wdr_settings{position:absolute}.wdr-rule-filters-and-options-con{display:contents}.wdr-enable-rule{display:inline-grid}.wdr-rule-setting{display:grid;grid-template-columns:unset}.wdr-conditions-container{display:contents}.wdr-rule-menu{width:80%}.wdr-rule-options-con{width:83%}#wpfooter{position:fixed}}@media (min-width:481px) and (max-width:767px){.wdr_settings{position:absolute}.wdr-rule-filters-and-options-con{display:contents}.wdr-rule-setting{display:grid;grid-template-columns:unset}.wdr-conditions-container{display:contents}.wdr-rule-menu{width:80%}.wdr-rule-options-con{width:83%}#wpfooter{position:fixed}}#wdr-search-top{position:relative;margin-left:189px;margin-bottom:-48px}.awdr_rebuild_on_sale_list_con .select2-search{width:120%}.wdr_subtotal_promo_filed_name{color:#000}.awdr-bullet-style{list-style-type:disc}.awdr-bullet-style li a{color:#444}.awdr-bulk-three-column{display:grid!important;grid-template-columns:10% 30% 50%!important;grid-gap:10px;padding:10px}.awdr-count-by-description{background-color:#f5de9c;padding:10px}.awdr_normal_enable_check_box,.awdr_normal_exclusive_check_box{padding:10px}.wdr_settings_desc_text.text-warning{color:#f0ad4e}.awdr_promotion_message_display_pages .select2-search__field{width:225%!important}.awdr_recipe_container{background-color:#fff;display:flex;padding:0 10px}.awdr_recipe_left{float:left;width:19%;background-color:#fff;padding:10px 10px 0 10px}.awdr_recipe_right{width:80%;float:left;margin:21px}div.awdr_recipe_main_card{cursor:pointer}.awdr_recipe_main_card{transition:.3s;width:100%;border-radius:5px;margin-top:20px;margin-bottom:20px;border-radius:5px;border:1px solid #6495ed}.awdr_recipe_main_card:first-child{background-color:#6495ed;color:#fff}.awdr_recipe_main_card div{padding:2px 16px;border-radius:5px}.card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}.awdr_common_border_class{padding:10px;margin:10px;border:1px solid #6495ed;border-radius:5px}.awdr_recipe_main_content .button{background-color:#6495ed;border:none;color:#fff;padding:0 32px;text-align:center;text-decoration:none;display:inline-block;cursor:pointer;border-radius:5px;margin-left:10px}.awdr-three-column-document-head{display:grid;grid-template-columns:auto auto auto auto;background-color:#f0f0f1;padding:5px}.awdr-three-column-inner{padding:15px;font-size:large}.awdr-first-column{background-color:#fff;border:3px solid #f0f0f1}.awdr-second-column{background-color:#fff;border:3px solid #f0f0f1}.awdr-third-column{background-color:#fff;border:3px solid #f0f0f1}.wdr_read_documentation{text-decoration:none}.wdr_read_documentation_con{padding:10px 0 10px 0}.awdr-hr-line{padding:10px}.awdr-header_text_recipe{padding:0 20px;font-weight:700}.awdr-compatible-field{clear:both;padding-top:15px}
1
+ .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.wdr-status-alert{padding:8px;border:1px solid transparent;border-radius:4px}.awdr-container .status-alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.awdr-container .status-alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.awdr-container .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.awdr-container .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.awdr-container .btn-danger,.wdr .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.awdr-container .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.awdr-container .btn-warning{color:#fff;background-color:#ffc100;border-color:#ffc100}.text-right{float:right;margin:2px;text-decoration:none}.wdr-rule-menu{float:left;width:19%;background-color:#fff;padding:10px 10px 0 10px}.wdr-rule-menu button{background-color:#6495ed;padding:8px;margin-top:7px;display:block;width:100%;color:#fff;text-decoration:none;border-radius:3px;border:1px solid #92b4f2}.main{float:left;width:80%;background-color:#fff;clear:right}.right{background-color:#e5e5e5;float:left;width:20%;padding:15px;margin-top:7px;text-align:center}.wdr-block{border:1px solid #dcdcdc;font-size:12px;line-height:24px;padding:5px 10px 10px 10px;color:#555;margin-top:5px;margin-bottom:10px;background-color:#fff}.wdr-grid{width:100%}.grid-container1{width:100%;display:table}.wdr-general-grid-container{display:grid;grid-template-columns:auto;grid-gap:10px}.wdr-general-grid-container>div{text-align:left;padding:5px 0}.wdr-rule-setting{display:grid;grid-template-columns:14% auto 30%;grid-gap:10px}.wdr-rule-date-valid{display:grid;grid-template-columns:49% 49%;grid-gap:10px}.wdr-rule-setting>div{padding:5px 0}.wdr-title{width:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:4px;background-color:#fff;padding:8px 10px 8px 10px;height:40px}.wdr-discount-type-selector{box-sizing:border-box;border:1px solid #ccc;border-radius:4px;background-color:#fff;padding:8px 10px 8px 10px;height:40px}.wdr-save-rule{background-color:#6495ed!important;color:#fff!important;border:1px solid #92b4f2!important}.wdr-add-condition{line-height:24px;margin-top:10px}.wdr-column{margin-right:10px}.wdr-active{cursor:no-drop;background-color:#fff!important;color:#6495ed!important}.wdr-inactive:hover{cursor:pointer;background-color:#92b4f2!important}.wdr-conditions-container[data-index="1"]{display:none}.wdr-conditions-container{padding:10px 0 20px 0;list-style:none;display:flex;margin:10px 0;border-bottom:1px solid #ddd}.wdr-condition-types{width:22%;padding-right:5px}.wdr-condition-container{width:75%;display:flex;flex-wrap:nowrap}.wdr-discount-tabs{width:100%;display:table}.wdr-discount-tabs a{text-decoration:none;display:table-cell;padding:5px}.wdr-simple-discount-main{display:table;width:100%}.wdr-simple-discount-inner div{padding:5px;display:table-cell;width:auto;vertical-align:middle}.wdr-cart-discount-main{display:grid;width:100%}.wdr-cart-discount-inner div{padding:5px;display:inline-grid;width:auto}.wdr-discount-block{font-size:12px;line-height:24px;padding:5px 10px 10px 10px;color:#555;margin-bottom:10px}.wdr_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;float:left;padding-top:5px}.wdr_settings_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;float:left;padding-top:5px}.wdr_save_btn_disabled{opacity:.3;cursor:default}.awdr-container .toggle{--uiToggleSize:var(--toggleSize, 20px);--uiToggleIndent:var(--toggleIndent, .4em);--uiToggleBorderWidth:var(--toggleBorderWidth, 2px);--uiToggleColor:var(--toggleColor, #000);--uiToggleDisabledColor:var(--toggleDisabledColor, #868e96);--uiToggleBgColor:var(--toggleBgColor, #fff);--uiToggleArrowWidth:var(--toggleArrowWidth, 2px);--uiToggleArrowColor:var(--toggleArrowColor, #fff);display:inline-block;position:relative}.awdr-container .toggle__input{position:absolute;left:-99999px}.awdr-container .toggle__label{display:inline-flex;cursor:pointer;min-height:var(--uiToggleSize);padding-left:calc(var(--uiToggleSize) + var(--uiToggleIndent))}.awdr-container .toggle__label:before,.toggle__label:after{content:"";box-sizing:border-box;width:1em;height:1em;font-size:var(--uiToggleSize);position:absolute;left:0;top:0}.awdr-container .toggle__label:before{border:var(--uiToggleBorderWidth) solid var(--uiToggleColor);z-index:2}.awdr-container .toggle__input:disabled~.toggle__label:before{border-color:var(--uiToggleDisabledColor)}.awdr-container .toggle__input:focus~.toggle__label:before{box-shadow:0 0 0 2px var(--uiToggleBgColor),0 0 0 4px var(--uiToggleColor)}.awdr-container .toggle__input:not(:disabled):checked:focus~.toggle__label:after{box-shadow:0 0 0 2px var(--uiToggleBgColor),0 0 0 4px var(--uiToggleColor)}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after{background-color:var(--uiToggleColor);opacity:0}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:after{opacity:1}.awdr-container .toggle__text{margin-top:auto;margin-bottom:auto}.awdr-container .toggle__text:before{content:"";box-sizing:border-box;width:0;height:0;font-size:var(--uiToggleSize);border-left-width:0;border-bottom-width:0;border-left-style:solid;border-bottom-style:solid;border-color:var(--uiToggleArrowColor);position:absolute;top:.5428em;left:.2em;z-index:3;transform-origin:left top;transform:rotate(-40deg) skew(10deg)}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label .toggle__text:before{width:.5em;height:.25em;border-left-width:var(--uiToggleArrowWidth);border-bottom-width:var(--uiToggleArrowWidth);will-change:width,height;transition:width .1s ease-out .2s,height .2s ease-out}.awdr-container .toggle__label:before,.toggle__label:after{border-radius:2px}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after,.awdr-container .toggle__input:not(:disabled)~.toggle__label:before{opacity:1;transform-origin:center center;will-change:transform;transition:transform .2s ease-out}.awdr-container .toggle__input:not(:disabled)~.toggle__label:before{transform:rotateY(0);transition-delay:.2s}.awdr-container .toggle__input:not(:disabled)~.toggle__label:after{transform:rotateY(90deg)}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:before{transform:rotateY(-90deg);transition-delay:0s}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label:after{transform:rotateY(0);transition-delay:.2s}.awdr-container .toggle__text:before{opacity:0}.awdr-container .toggle__input:not(:disabled):checked~.toggle__label .toggle__text:before{opacity:1;transition:opacity .1s ease-out .3s,width .1s ease-out .5s,height .2s ease-out .3s}.awdr-container .toggle{--toggleColor:#6495ed;--toggleBgColor:#6495ed;--toggleSize:25px}.awdr-container .page__toggle{padding-left:20px;padding-top:7px}.wdr-enable-rule .wdr-discount-type{width:19.7%}.wdr-enable-rule{display:flex;padding:10px 30px 20px 2px}@media only screen and (max-width:620px){.main,.right,.wdr-rule-menu{width:100%}}.wdr-sticky-header{background-color:#fff;padding:20px;margin-bottom:20px}.wdr-sticky{position:fixed;top:33px;width:87%;overflow:hidden;background-color:#eee;z-index:1}.nav-tab.nav-tab-active{background-color:#fff}.awdr-product-selector{width:100%!important;margin-bottom:10px;padding-left:4px}.wdr-filter-type select{height:34px}.wdr-product_filter_method select{height:34px}.wdr-product-filter-type{min-width:100px}.wdr-alert-top-right{position:fixed;top:116px;right:30px;width:300px;z-index:9999}.wdr-alert-success{color:#fff;background:green;font-weight:bolder}.wdr-alert-error{color:#fff;background:red;font-weight:bolder}.wdr-alert-warning{color:#fff;background:#f4a460;font-weight:bolder}.wdr-alert{border-radius:5px;padding:10px;margin-bottom:10px;width:100%!important;z-index:9999}.wdr-general-setting.form-table th{padding:20px 10px 20px 10px;width:300px}.wdr-filter-type{display:inline-block}.wdr-filter-group-items .wdr-filter-group .wdr-products_group{padding-right:10px;display:inline-flex;flex-wrap:nowrap;width:60%}.wdr_filter_remove{display:inline-block}.wdr-cart-search_box{min-width:500px}.wdr-coupon-search_box{min-width:400px}.wdr-search-box{min-width:250px;vertical-align:super}.wdr-filter-group{margin-bottom:10px;padding:15px 0 15px 0;border-bottom:1px solid #ddd}.wdr-condition-type select{height:34px}.wdr-select-filed-hight select{height:34px}.wdr-input-filed-hight input{height:34px!important}.add-condition-and-filters{margin-top:15px}.wdr-tool-tip{background-color:gray;color:#fff;display:inline-block;padding-left:5px;padding-right:5px;text-align:center;border-radius:50%;font-size:10px;font-weight:bolder;cursor:help}.wdr-hide{display:none}.padding10{padding:10px}.wdr-rule-statistics{display:flex}.wdr-rule-statistics>div{padding:10px}.awdr-container .button.bottom-tabs{margin-right:5px}.awdr-container .remove-clicked-discount-block:hover,.awdr-container .remove-current-row:hover,.awdr-container .wdr_discount_remove:hover{cursor:pointer}.wdr-ruleboard{cursor:move}.wdr-loader{display:none!important;width:64px;height:64px;position:absolute;left:0;right:0;z-index:999;margin:auto;top:0;bottom:0}.wdr-loader:after{content:" ";display:block;width:46px;height:46px;margin:1px;border-radius:50%;border:5px solid #333;border-color:#333 transparent #333 transparent;animation:wdr-loader 1.2s linear infinite}@keyframes wdr-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.awdr-container textarea{width:100%;height:150px;padding:10px 20px;box-sizing:border-box;border:1px solid #ddd;border-radius:4px;background-color:#f8f8f8;resize:none}.adv-msg-max-qty,.adv-msg-min-qty{display:none}.wdr-customizer-container{width:100%}.wdr-customizer-grid{display:grid;grid-template-columns:53% 47%;grid-gap:10px;padding:10px}.wdr-customizer-grid>div{padding:0 0}.popup-bulk-table{padding:0 0;margin-top:0}.popup-bulk-table tr th{padding:20px 20px}.wdr_bulk_table_msg{width:100%}.awdr-container .modal,.awdr-container .modal-box{z-index:9999;visibility:unset;opacity:1}.awdr-container .modal-sandbox{position:fixed;width:100%;height:100%;top:0;left:0;background:0 0}.awdr-container .modal{display:none;position:fixed;width:100%;height:100%;left:0;top:0;background:#000;background:rgba(0,0,0,.8);overflow:auto}.awdr-container .modal-box{position:relative;width:80%;max-width:920px;margin:100px auto;animation-name:modalbox;animation-duration:.4s;animation-timing-function:cubic-bezier(0,0,.3,1.6)}.awdr-container .modal-header{padding:20px 40px;background:#6495ed;color:#fff}.awdr-container .modal-body{background:#eceff1;padding:50px 15px}.awdr-container .close-modal{text-align:right;cursor:pointer}@-webkit-keyframes modalbox{0%{top:-250px;opacity:0}100%{top:0;opacity:1}}@keyframes modalbox{0%{top:-250px;opacity:0}100%{top:0;opacity:1}}.awdr-configuration-form .modal-trigger{top:50%;left:50%;background:0 0;border:1px solid #fff;text-decoration:none}.wdr-modal-header-title{color:#fff}.wdr-model-bottom-btn{float:right;margin:5px}.wdr-popup-link{cursor:pointer}table.wdr_bulk_table_msg,td.wdr_bulk_table_td,th.wdr_bulk_table_td,tr.wdr_bulk_table_tr{padding:10px}.wdr-customizer-notes{padding:0 10px}.wdr-red-text{color:red}.wdr-cart-coupon-value .coupon_name_msg{text-transform:uppercase}span#awdr_shortcode_text{font-weight:700}.awdr-list-header-btn a.text-right{float:right;margin-left:10px;text-decoration:none}.wdr-rule-options-con{width:80%;float:left}.awdr-clear{height:inherit;clear:both}.wdr-rule-filters-and-options-con{background-color:#fff;display:flex;padding:10px}.wdr-btn-remove .wdr_discount_remove,.wdr-condition-group .remove-current-row,.wdr-discount-block-remove .remove-clicked-discount-block,.wdr_filter_remove .remove-current-row{color:#fff;background-color:#d9534f;border-radius:3px}.wdr-condition-group .remove-current-row{margin-top:5px}.wdp-block.add-condition{margin-top:10px}.set_range_setter{margin-bottom:15px}.bulk_range_setter .wdr-simple-discount-inner,.range_setter_inner .wdr-simple-discount-inner,.wdr-cart-discount-placement .wdr-simple-discount-inner{border-bottom:1px solid #ddd;padding:5px 0}.buyx_getx_individual_range{padding:5px 0}.wdr-conditions-container .float_only_field,.wdr-conditions-container .number_only_field,.wdr-conditions-container input[type=number]{width:100px}.wdr-condition-type-options div{display:inline-block;margin:0 2px}.wdr-condition-type-options{margin:0 5px}#configuration-form table tbody tr>td:first-child{width:400px}.wdr_color_picker{letter-spacing:.2rem}.wdr_adv_msg_shortcode_text{color:#a9a9a9;font-size:12px}.awdr_popup_col_name_text_box{width:100%!important}#customize-bulk-table-title{width:40%;text-align:left}#customize-bulk-table-discount,#customize-bulk-table-range{width:30%;text-align:left}table.wdr_bulk_table_msg{border-collapse:collapse}table.wdr_bulk_table_msg,td.wdr_bulk_table_td,th.wdr_bulk_table_td,tr.wdr_bulk_table_tr{border:1px solid #bfc6cb}.awdr-dragable{cursor:ew-resize;word-break:break-all}.awdr_valide_date_in_desc{line-height:28px;font-size:14px;padding-left:20px}.wdr_customize_table table tbody tr>td:first-child{width:auto!important}.awdr-listing-rule-tr:hover{background-color:#ddf2ff}tr.awdr-listing-rule-tr td{vertical-align:middle}.awdr-text-warning{color:#8a6d3b}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:0!important}.widefat tbody th.check-column{padding:0!important}.widefat .check-column{width:2.2em!important;padding:0!important;vertical-align:middle!important}.awdr-save-green{border-radius:5px;padding:10px;width:98%;z-index:9999}.awdr-error-red{border-radius:5px;padding:10px;width:98%;z-index:9999}.banner-short-code-setting{vertical-align:middle;line-height:39px}.awdr-condition-container,.awdr-discount-container{background-color:#fff;margin:20px 0;clear:both}.awdr-discount-batch-container{background-color:#fff;clear:both}.awdr-condition-container h2,.awdr-discount-container h2,.wdr-advanced-layout-groups h2,.wdr-rule-menu h2{color:#6495ed;margin:auto}.awdr-sub-heading-description{font-size:smaller;color:gray}.woocommerce table.form-table.awdr-discount-badge{table-layout:auto!important}.woocommerce table.form-table.awdr-discount-badge input[type=text]{width:auto}.awdr-exclusive-enable-listing{color:#4cae4c;font-size:10px;border:1px solid #4cae4c;padding:2px;margin:8px;border-radius:3px}.awdr-exclusive-disable-listing{color:#d43f3a;font-size:10px;border:1px solid #d43f3a;padding:2px;margin:8px;border-radius:3px}.switch{position:relative;display:block;vertical-align:top;width:84px;height:30px;padding:3px;margin:0 5px 10px 0;border-radius:0;cursor:pointer;box-sizing:content-box}.switch-input{position:absolute;top:0;left:0;opacity:0;box-sizing:content-box}.switch-label{position:relative;display:block;height:inherit;font-size:13px;background:grey;border-radius:4px;box-sizing:content-box}.switch-label:after,.switch-label:before{position:absolute;top:50%;margin-top:-.5em;line-height:1;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit;box-sizing:content-box}.switch-label:before{content:attr(data-off);right:11px;color:#fff;text-shadow:0 1px rgba(255,255,255,.5)}.switch-label:after{content:attr(data-on);left:11px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}.switch-input:checked~.switch-label{background:#5cb85c;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}.switch-input:checked~.switch-label:before{opacity:0}.switch-input:checked~.switch-label:after{opacity:1}.switch-handle{position:absolute;top:4px;left:4px;width:12px;height:28px;background:linear-gradient(to bottom,#fff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#fff 40%,#f0f0f0);border-radius:4px;box-shadow:1px 1px 5px rgba(0,0,0,.2)}.switch-handle:before{content:"";position:absolute;top:50%;left:50%;margin:-6px 0 0 -6px;width:12px;height:12px;background:linear-gradient(to bottom,#eee,#fff);background-image:-webkit-linear-gradient(top,#eee,#fff);border-radius:6px;box-shadow:inset 0 1px rgba(0,0,0,.02)}.switch-input:checked~.switch-handle{left:74px;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}.switch-handle,.switch-label{transition:All .3s ease;-webkit-transition:All .3s ease;-moz-transition:All .3s ease;-o-transition:All .3s ease}.awdr-container input[type=color]{padding:2px}.awdr-common-save{margin-left:auto}.wdr-buyx-getx-discount-main,.wdr-buyx-gety-discount-main{display:grid;width:100%}.awdr-buyx-getx-number-box,.awdr-buyx-gety-number-box{width:150px}.wdr-buyx-getx-discount-inner div,.wdr-buyx-gety-discount-inner div{display:inline-grid;width:auto;padding:5px}.awdr-discount-add-row{padding-left:14px}.awdr-listing-status-text{padding-left:10px}.awdr-get-y-general-settings{display:flex;width:auto}.awdr-left-align{float:left}.awdr-clear-both{clear:both}.awdr_check_styles{display:flex}.awdr_discount_type_section{padding-bottom:20px}.awdr-rules-sub-menu{padding-top:42px!important}.awdr-rule-limit-timestamp{color:#a9a9a9;display:inline-block;font-size:12px;text-transform:capitalize;line-height:34px;padding-left:15px}#wpfooter{position:relative;z-index:-1}.wdr-buyx-gety-discount-inner{padding:5px}.page__toggle.apply_as_cart_checkbox{padding-left:11px;padding-top:20px}.apply_as_cart_checkbox .toggle__label:after,.apply_as_cart_checkbox .toggle__label:before{width:.8em!important;height:.8em!important}.toggle_tic.toggle__text:before{top:.43em!important;left:.1em!important}.apply_discount_as_cart_section{display:flex}.apply_fee_coupon_label{padding-left:15px;padding-top:13px}.bulk-row-start{border-bottom:1px solid #ddd;padding:5px 0}.bulk-row-start div{padding:5px;display:table-cell;width:min-content}.woocommerce table.form-table.popup-bulk-table th{padding-right:0!important}.awdr_table_columns{display:flex}.awdr-accordion{background-color:#fff;color:#6495ed;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:0;font-weight:600;font-size:1.3em;transition:.4s}.awdr-accordion-active,.awdr-accordion:hover{background-color:grey;color:#fff}.awdr-accordion-panel{display:none;background-color:#fff;overflow:hidden}.awdr-accordion:after{content:'\02795';font-size:13px;color:#777;float:right;margin-left:5px}.awdr-accordion-active:after{content:"\2796"}.wdr_filter_desc_text{color:#a9a9a9;display:block;font-size:12px;padding-top:5px}.wdr_select2_desc_text{color:#a9a9a9;display:inline-block;font-size:12px;text-transform:capitalize;padding-top:5px}.awdr-sort-icon{padding-top:12px!important}.bulk_range_setter{cursor:move}.dashicons-menu{color:#a9a9a9!important}.dashicons-menu:hover{color:#000!important}.awdr_admin_discount_bar{padding:10px;margin-bottom:10px;border-radius:4px}.wdr_migration_container{margin:10px 0}.wdr_settings .woo_discount_loader{display:none;position:absolute;background-color:rgba(255,255,255,.5);top:0;left:0;width:100%;height:100%;text-align:center}.woo_discount_loader .lds-ripple{display:inline-block;position:relative;top:50%;width:64px;height:64px}.woo_discount_loader .lds-ripple div{position:absolute;border:4px solid #257af0;opacity:1;border-radius:50%;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite}.woo_discount_loader .lds-ripple div:nth-child(2){animation-delay:-.5s}@keyframes lds-ripple{0%{top:28px;left:28px;width:0;height:0;opacity:1}100%{top:-1px;left:-1px;width:58px;height:58px;opacity:0}}.awdr-product-selector span.select2-selection{max-height:100px;overflow:auto}.bulk_discount_max,.bulk_discount_min,.bulk_discount_value,.set_discount_min,.set_discount_value{max-width:106px}.set-for{padding-bottom:32px!important}.set-discount-row-main{display:grid;width:100%}.set-discount-row-inner>div{display:inline-grid;width:auto;padding:5px}.bulk-row-main{display:grid;width:100%}.bulk-row-inner>div{display:inline-grid;width:auto;padding:5px}fieldset{border:1px solid #a9a9a9!important;float:left;margin:5px}.awdr-switch-version-button-on-tab{float:right;background:#5bc0de;color:#fff}.awdr_version_text{font-size:12px;display:inline-block;position:relative;top:10px;left:8px;font-weight:400;padding-right:10px}.awdr_rebuild_on_sale_list_notice{color:red;padding:8px 0}.awdr_rebuild_on_sale_rule_page_con{display:none}.awdr_rebuild_on_sale_rule_page_con.need_attention{display:contents}div.wdr{margin-top:30px;margin-right:20px}.awdr-common-save>button,.awdr-rule-buttons>a{margin-bottom:2px}@media (min-width:320px) and (max-width:480px){.wdr_settings{position:absolute}.wdr-rule-filters-and-options-con{display:contents}.wdr-enable-rule{display:inline-grid}.wdr-rule-setting{display:grid;grid-template-columns:unset}.wdr-conditions-container{display:contents}.wdr-rule-menu{width:80%}.wdr-rule-options-con{width:83%}#wpfooter{position:fixed}}@media (min-width:481px) and (max-width:767px){.wdr_settings{position:absolute}.wdr-rule-filters-and-options-con{display:contents}.wdr-rule-setting{display:grid;grid-template-columns:unset}.wdr-conditions-container{display:contents}.wdr-rule-menu{width:80%}.wdr-rule-options-con{width:83%}#wpfooter{position:fixed}}#wdr-search-top{position:relative;margin-left:189px;margin-bottom:-48px}.awdr_rebuild_on_sale_list_con .select2-search{width:120%}.wdr_subtotal_promo_filed_name{color:#000}.awdr-bullet-style{list-style-type:disc}.awdr-bullet-style li a{color:#444}.awdr-bulk-three-column{display:grid!important;grid-template-columns:10% 30% 50%!important;grid-gap:10px;padding:10px}.awdr-count-by-description{background-color:#f5de9c;padding:10px}.awdr_normal_enable_check_box,.awdr_normal_exclusive_check_box{padding:10px}.wdr_settings_desc_text.text-warning{color:#f0ad4e}.awdr_promotion_message_display_pages .select2-search__field{width:225%!important}.awdr_recipe_container{background-color:#fff;display:flex;padding:0 10px}.awdr_recipe_left{float:left;width:19%;background-color:#fff;padding:10px 10px 0 10px}.awdr_recipe_right{width:80%;float:left;margin:21px}div.awdr_recipe_main_card{cursor:pointer}.awdr_recipe_main_card{transition:.3s;width:100%;border-radius:5px;margin-top:20px;margin-bottom:20px;border-radius:5px;border:1px solid #6495ed}.awdr_recipe_main_card:first-child{background-color:#6495ed;color:#fff}.awdr_recipe_main_card div{padding:2px 16px;border-radius:5px}.card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}.awdr_common_border_class{padding:10px;margin:10px;border:1px solid #6495ed;border-radius:5px}.awdr_recipe_main_content .button{background-color:#6495ed;border:none;color:#fff;padding:0 32px;text-align:center;text-decoration:none;display:inline-block;cursor:pointer;border-radius:5px;margin-left:10px}.awdr-three-column-document-head{display:grid;grid-template-columns:auto auto auto auto;background-color:#f0f0f1;padding:5px}.awdr-three-column-inner{padding:15px;font-size:large}.awdr-first-column{background-color:#fff;border:3px solid #f0f0f1}.awdr-second-column{background-color:#fff;border:3px solid #f0f0f1}.awdr-third-column{background-color:#fff;border:3px solid #f0f0f1}.wdr_read_documentation{text-decoration:none}.wdr_read_documentation_con{padding:10px 0 10px 0}.awdr-hr-line{padding:10px}.awdr-header_text_recipe{padding:0 20px;font-weight:700}.awdr-compatible-field{clear:both;padding-top:15px}.wdr-cart-coupon-url{display:inline-grid!important;width:100%}.wdr-cart-coupon-url-lists{margin-top:10px!important}.wdr-cart-coupon-url-all,.wdr-cart-coupon-url-custom,.wdr-cart-coupon-url-one,.wdr-coupon-url-group{margin-left:0}.wdr-coupon-url-group label{vertical-align:top}.wdr-coupon-url-group button{height:30px;padding-left:8px;padding-right:8px;border-radius:0 4px 4px 0;background:#f0f0f1;margin-left:-8px;margin-bottom:10px;color:#0a4b78;border:1px dashed #0a4b78}.wdr-coupon-url-group button:hover{background:#f0f0f1;border:1px dashed #0a4b78;cursor:pointer}.wdr-coupon-url-group input,.wdr-coupon-url-group input:focus{border:1px dashed #0a4b78;box-shadow:none}
v2/Assets/Js/admin_script.js CHANGED
@@ -2793,4 +2793,89 @@ jQuery(document).ready(function ($) {
2793
  });
2794
  $('.get_awdr_state_based_country').trigger('change');
2795
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2796
  });
2793
  });
2794
  $('.get_awdr_state_based_country').trigger('change');
2795
 
2796
+ /*Show & hide coupon url section*/
2797
+ $(document).on('change', '.wdr_copon_type', function () {
2798
+ var coupon_type = $(this).val();
2799
+
2800
+ if (coupon_type === "custom_coupon") {
2801
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-one, .wdr-cart-coupon-url-all').css("display", "none");
2802
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom').css("display", "block");
2803
+ } else if (coupon_type === "at_least_one") {
2804
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom, .wdr-cart-coupon-url-all').css("display", "none");
2805
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-one').css("display", "block");
2806
+ } else if (coupon_type === "all") {
2807
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom, .wdr-cart-coupon-url-one').css("display", "none");
2808
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-all').css("display", "block");
2809
+ }
2810
+ });
2811
+
2812
+ /*Copy coupon url*/
2813
+ $(document).on('click', '.wdr-copy-coupon-url', function (e) {
2814
+ e.preventDefault();
2815
+ $(this).parents('.wdr-coupon-url-group').find('input[type=url]').select();
2816
+ if (document.execCommand("copy")) {
2817
+ $(this).html(wdr_data.localization_data.coupon_url_copied);
2818
+ notify(wdr_data.localization_data.coupon_url_success, 'success', alert_counter);
2819
+ } else {
2820
+ notify(wdr_data.localization_data.error, 'error', alert_counter);
2821
+ }
2822
+ });
2823
+
2824
+ /*Toggle coupons list*/
2825
+ $(document).on('change', '.wdr-cart-coupon-url-enable', function(e) {
2826
+ e.preventDefault();
2827
+ $(this).closest('.wdr-cart-coupon-url').find('.wdr-cart-coupon-url-lists').slideToggle();
2828
+ });
2829
+
2830
+ /*Change custom coupon*/
2831
+ $(document).on('change keyup', '.wdr-cart-coupon-value input', function () {
2832
+ var url = wdr_data.home_url;
2833
+ var input = $(this).val();
2834
+ if (input !== '') {
2835
+ $group = '<span class="wdr-coupon-url-group"><label>';
2836
+ $group += ' <input type="url" value="' + url + '?wdr_coupon=' + encodeURIComponent(input) + '"></label>';
2837
+ $group += '<button class="wdr-copy-coupon-url">' + wdr_data.localization_data.coupon_url_copy + '</button></span>';
2838
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom').html($group);
2839
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom').css("display", "block");
2840
+ } else {
2841
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-custom').css("display", "none");
2842
+ }
2843
+ });
2844
+
2845
+ /*Select coupon option*/
2846
+ $(document).on('change', '.wdr-cart-coupon-search select, select.wdr_copon_type', function () {
2847
+ var url = wdr_data.home_url;
2848
+ var input = $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-search select').val();
2849
+ var coupon_type = $(this).parents('.wdr_cart_coupon_group').find('select.wdr_copon_type').val();
2850
+ if (input.length !== 0) {
2851
+ if (coupon_type === "at_least_one") {
2852
+ $groups = '';
2853
+ input.forEach(function(value) {
2854
+ $groups += '<span class="wdr-coupon-url-group"><label>';
2855
+ $groups += ' <input type="url" value="' + url + '?wdr_coupon=' + encodeURIComponent(value) + '"></label>';
2856
+ $groups += '<button class="wdr-copy-coupon-url">' + wdr_data.localization_data.coupon_url_copy + '</button></span><br>';
2857
+ });
2858
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-one').html($groups);
2859
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-one').css("display", "block");
2860
+ } else if (coupon_type === "all") {
2861
+ var coupons = '';
2862
+ url += "?wdr_coupon=";
2863
+ input.forEach(function(value) {
2864
+ coupons += value + ", ";
2865
+ url += encodeURIComponent(value) + ',';
2866
+ });
2867
+ coupons = coupons.replace(/(^, )|(, $)/g, "");
2868
+ url = url.replace(/(^,)|(,$)/g, "");
2869
+ $group = '<span class="wdr-coupon-url-group"><label>';
2870
+ $group += ' <input type="url" value="' + url + '"></label>';
2871
+ $group += '<button class="wdr-copy-coupon-url">' + wdr_data.localization_data.coupon_url_copy + '</button></span>';
2872
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-all').html($group);
2873
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-all').css("display", "block");
2874
+ }
2875
+ } else {
2876
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-one').css("display", "none");
2877
+ $(this).parents('.wdr_cart_coupon_group').find('.wdr-cart-coupon-url-all').css("display", "none");
2878
+ }
2879
+ });
2880
+
2881
  });
v2/Assets/Js/admin_script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){const d={counts:1};function t(d){let t=d.val(),a=d.parents(".wdr-conditions-container").attr("data-index");"greater_than_or_equal"==t||"greater_than"==t?e(".promo_show_hide_"+a).show():e(".promo_show_hide_"+a).hide()}function a(t,a){e.ajax({data:{method:"rebuild_onsale_list",action:"wdr_ajax",rules:t,awdr_nonce:a.attr("data-awdr_nonce")},type:"post",url:ajaxurl,error:function(e,t){l(wdr_data.localization_data.error,"error",d),a.removeAttr("disabled")},success:function(e){a.html(wdr_data.localization_data.rebuild_on_sale_list_processed_text),a.removeAttr("disabled")}})}function i(d){d.selectWoo({width:"100%",minimumInputLength:1,placeholder:d.data("placeholder"),escapeMarkup:function(e){return e},language:{noResults:function(){return wdr_data.labels.select2_no_results},errorLoading:function(){return wdr_data.labels.searching_text}},ajax:{url:ajaxurl,type:"POST",dataType:"json",delay:250,data:function(t){return{query:t.term,action:"wdr_ajax",method:d.data("list")||"products",awdr_nonce:e("input[name=wdr_ajax_select2]").val()||"",taxonomy:d.data("taxonomy")||"",selected:d.val()}},processResults:function(e){return{results:e.data||[]}}}}),d.parent().find(".select2-search__field").css("width","100%")}function o(e){return 0===e?0:parseInt(e)+1}function r(){let d=[];return e(".wdr-filter-group").each(function(t,a){let i=e(a).find(".wdr-product-filter-type").val(),o=e(a).find(".awdr_validation").val();switch(i){case"all_products":break;case"products":case"product_category":case"product_attributes":case"product_tags":case"product_sku":0==o.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"product_on_sale":break;default:0==o.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993")}}),d}function s(d){let t=[];switch(d){case"wdr_simple_discount":let a=e(".product_discount_value").val();""!=a&&a?e(".product_discount_value").css("border","1px solid #7e8993"):(t.push("fails"),e(".product_discount_value").css("border","1px solid red"),e(".product_discount_value").focus());break;case"wdr_cart_discount":let i=e(".awdr_cart_discount_value").val();""!=i&&i?e(".awdr_cart_discount_value").css("border","1px solid #7e8993"):(t.push("fails"),e(".awdr_cart_discount_value").css("border","1px solid red"),e(".awdr_cart_discount_value").focus());break;case"wdr_free_shipping":break;case"wdr_bulk_discount":e(".bulk_range_setter").find(".awdr-bulk-group").each(function(d,a){let i=e(a).find(".bulk_discount_min").val(),o=e(a).find(".bulk_discount_max").val(),r=e(a).find(".bulk_discount_value").val();""==i&&""==o?(t.push("fails"),e(a).find(".bulk_discount_min").css("border","1px solid red"),e(a).find(".bulk_discount_min").focus(),e(a).find(".bulk_discount_max").css("border","1px solid red"),e(a).find(".bulk_discount_max").focus()):(e(a).find(".bulk_discount_min").css("border","1px solid #7e8993"),e(a).find(".bulk_discount_max").css("border","1px solid #7e8993"));let s=parseInt(r);""==r||s<0?(t.push("fails"),e(a).find(".bulk_discount_value").css("border","1px solid red"),e(a).find(".bulk_discount_value").focus()):e(a).find(".bulk_discount_value").css("border","1px solid #7e8993")});break;case"wdr_set_discount":e(".set_range_setter").find(".bundle-set-range-main").each(function(d,a){let i=e(a).find(".set_discount_min").val(),o=e(a).find(".set_discount_value").val();""==i?(t.push("fails"),e(a).find(".set_discount_min").css("border","1px solid red"),e(a).find(".set_discount_min").focus()):e(a).find(".set_discount_min").css("border","1px solid #7e8993"),""==o?(t.push("fails"),e(a).find(".set_discount_value").css("border","1px solid red"),e(a).find(".set_discount_value").focus()):e(a).find(".set_discount_value").css("border","1px solid #7e8993")});break;case"wdr_buy_x_get_x_discount":e(".buyx_getx_range_setter").find(".buyx_getx_individual_range").each(function(d,a){let i=e(a).find(".bxgx-min").val(),o=e(a).find(".bxgx-max").val(),r=e(a).find(".bxgx-qty").val(),s=e(a).find(".buyx_getx_discount_select").val(),n=e(a).find(".bxgx-value").val();1==e(a).find(".awdr-bogo-recurcive").prop("checked")&&(""==i?(t.push("fails"),e(a).find(".bxgx-min").css("border","1px solid red"),e(a).find(".bxgx-min").focus()):e(a).find(".bxgx-min").css("border","1px solid #7e8993")),""==i&&""==o?(t.push("fails"),e(a).find(".bxgx-min").css("border","1px solid red"),e(a).find(".bxgx-min").focus(),e(a).find(".bxgx-max").css("border","1px solid red"),e(a).find(".bxgx-max").focus()):(e(a).find(".bxgx-min").css("border","1px solid #7e8993"),e(a).find(".bxgx-max").css("border","1px solid #7e8993")),""==r?(t.push("fails"),e(a).find(".bxgx-qty").css("border","1px solid red"),e(a).find(".bxgx-qty").focus()):e(a).find(".bxgx-qty").css("border","1px solid #7e8993"),"free_product"!=s&&""==n?(t.push("fails"),e(a).find(".bxgx-value").css("border","1px solid red"),e(a).find(".bxgx-value").focus()):e(a).find(".bxgx-value").css("border","1px solid #7e8993")});break;case"wdr_buy_x_get_y_discount":let o=e(".select_bxgy_type").val();e(".awdr_buyx_gety_range_setter").find(".buyx_gety_individual_range").each(function(d,a){let i=e(a).find(".bxgy-min").val(),r=e(a).find(".bxgy-max").val(),s=e(a).find(".bxgy-product-selector").val(),n=e(a).find(".bxgy-category-selector").val(),l=e(a).find(".bxgy-qty").val(),c=e(a).find(".buyx_gety_discount_select").val(),_=e(a).find(".bxgy-val").val();"bxgy_product"==o?0==s.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"):"bxgy_category"==o?0==n.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"):"0"!=o&&o?e(".select_bxgy_type").css("border","1px solid #7e8993"):(t.push("fails"),e(".select_bxgy_type").css("border","1px solid red"),e(".select_bxgy_type").focus()),1==e(a).find(".awdr-bogo-recurcive").prop("checked")&&(""==i?(t.push("fails"),e(a).find(".bxgy-min").css("border","1px solid red"),e(a).find(".bxgy-min").focus()):e(a).find(".bxgy-min").css("border","1px solid #7e8993")),""==i&&""==r?(t.push("fails"),e(a).find(".bxgy-min").css("border","1px solid red"),e(a).find(".bxgy-min").focus(),e(a).find(".bxgy-max").css("border","1px solid red"),e(a).find(".bxgy-max").focus()):(e(a).find(".bxgy-min").css("border","1px solid #7e8993"),e(a).find(".bxgy-max").css("border","1px solid #7e8993")),""==l?(t.push("fails"),e(a).find(".bxgy-qty").css("border","1px solid red"),e(a).find(".bxgy-qty").focus()):e(a).find(".bxgy-qty").css("border","1px solid #7e8993"),"free_product"!=c&&""==_?(t.push("fails"),e(a).find(".bxgy-val").css("border","1px solid red"),e(a).find(".bxgy-val").focus()):e(a).find(".bxgy-val").css("border","1px solid #7e8993")});break;default:case"not_selected":t.push("fails")}return t}function n(){let d=[];return e(".wdr-condition-group").each(function(t,a){let i=e(a).find(".wdr-product-condition-type").val();if(void 0!==i)switch(i){case"cart_subtotal":""==e(a).find(".float_only_field").val()?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_items_quantity":""==e(a).find(".float_only_field").val()?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_coupon":let t=e(a).find(".wdr_copon_type").val(),o=e(a).find(".coupon_name_msg").val(),r=e(a).find("#rm-coupon").val();"custom_coupon"==t?""==o?(d.push("fails"),e(a).find(".coupon_name_msg").css("border","1px solid red"),e(a).find(".coupon_name_msg").focus()):e(a).find(".coupon_name_msg").css("border","1px solid #7e8993"):r?e(a).find(".select2-selection").css("border","1px solid #7e8993"):(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus());break;case"cart_items_weight":""==e(a).find(".float_only_field").val()?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_payment_method":0==e(a).find(".select2-hidden-accessible").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"cart_line_items_count":""==e(a).find(".float_only_field").val()?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_item_product_attributes":let s=e(a).find(".awdr-attribute-validation").val(),n=e(a).find(".awdr-num-validation").val();0==s.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==n?(d.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_category":let l=e(a).find(".awdr-category-validation").val(),c=e(a).find(".awdr-num-validation").val();0==l.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==c?(d.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_combination":let _=e(a).find(".awdr-product-validation").val(),u=e(a).find(".product_from_qty").val(),p=e(a).find(".product_to_qty").val(),f=e(a).find(".combination_operator").val();0==_.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),"in_range"==f?""==u&&""==p?(d.push("fails"),e(a).find(".product_from_qty").css("border","1px solid red"),e(a).find(".product_from_qty").focus(),e(a).find(".product_to_qty").css("border","1px solid red"),e(a).find(".product_to_qty").focus()):(e(a).find(".product_from_qty").css("border","1px solid #7e8993"),e(a).find(".product_to_qty").css("border","1px solid #7e8993")):""==u?(d.push("fails"),e(a).find(".product_from_qty").css("border","1px solid red"),e(a).find(".product_from_qty").focus()):e(a).find(".product_from_qty").css("border","1px solid #7e8993");break;case"cart_item_product_sku":let w=e(a).find(".awdr-sku-validation").val(),h=e(a).find(".awdr-num-validation").val();0==w.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==h?(d.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_tags":let b=e(a).find(".awdr-tag-validation").val(),m=e(a).find(".awdr-num-validation").val();0==b.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==m?(d.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_products":let g=e(a).find(".awdr-product-validation").val(),v=e(a).find(".awdr-num-validation").val();0==g.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==v?(d.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_category_combination":let x=e(a).find(".awdr-cat-validation").val(),y=e(a).find(".cat_from_qty").val(),k=e(a).find(".cat_to_qty").val(),z=e(a).find(".cat_combination_operator").val();0==x.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),"in_range"==z?""==y&&""==k?(d.push("fails"),e(a).find(".cat_from_qty").css("border","1px solid red"),e(a).find(".cat_from_qty").focus(),e(a).find(".cat_to_qty").css("border","1px solid red"),e(a).find(".cat_to_qty").focus()):(e(a).find(".cat_from_qty").css("border","1px solid #7e8993"),e(a).find(".cat_to_qty").css("border","1px solid #7e8993")):""==y?(d.push("fails"),e(a).find(".cat_from_qty").css("border","1px solid red"),e(a).find(".cat_from_qty").focus()):e(a).find(".cat_from_qty").css("border","1px solid #7e8993");break;case"order_date":let q=e(a).find(".awdr-from-date").val(),j=e(a).find(".awdr-end-date").val();""==q&&""==j?(d.push("fails"),e(a).find(".awdr-from-date").css("border","1px solid red"),e(a).find(".awdr-from-date").focus(),e(a).find(".awdr-end-date").css("border","1px solid red"),e(a).find(".awdr-end-date").focus()):(e(a).find(".awdr-from-date").css("border","1px solid #7e8993"),e(a).find(".awdr-end-date").css("border","1px solid #7e8993"));break;case"order_date_and_time":let I=e(a).find(".awdr-from-date").val(),O=e(a).find(".awdr-end-date").val();""==I&&""==O?(d.push("fails"),e(a).find(".awdr-from-date").css("border","1px solid red"),e(a).find(".awdr-from-date").focus(),e(a).find(".awdr-end-date").css("border","1px solid red"),e(a).find(".awdr-end-date").focus()):(e(a).find(".awdr-from-date").css("border","1px solid #7e8993"),e(a).find(".awdr-end-date").css("border","1px solid #7e8993"));break;case"order_days":0==e(a).find(".order_days").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"order_time":let T=e(a).find(".wdr-from-time").val(),C=e(a).find(".wdr-to-time").val();""==T&&""==C?(d.push("fails"),e(a).find(".wdr-from-time").css("border","1px solid red"),e(a).find(".wdr-from-time").focus(),e(a).find(".wdr-to-time").css("border","1px solid red"),e(a).find(".wdr-to-time").focus()):(e(a).find(".wdr-from-time").css("border","1px solid #7e8993"),e(a).find(".wdr-to-time").css("border","1px solid #7e8993"));break;case"purchase_last_order":0==e(a).find(".wdr-wc-order-status").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"purchase_last_order_amount":let S=e(a).find(".wdr-wc-order-status").val(),A=e(a).find(".float_only_field").val();0==S.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==A?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_previous_orders":let D=e(a).find(".wdr-wc-order-status").val(),R=e(a).find(".float_only_field").val();0==D.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==R?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_previous_orders_for_specific_product":let M=e(a).find(".wdr-wc-order-status").val(),F=e(a).find(".float_only_field").val();0==e(a).find(".specific_product").val().length?(d.push("fails"),e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-selector .select2-selection").focus()):e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid #7e8993"),0==M.length?(d.push("fails"),e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-status .select2-selection").focus()):e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid #7e8993"),""==F?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_quantities_for_specific_product":let B=e(a).find(".wdr-wc-order-status").val(),L=e(a).find(".float_only_field").val();e(a).find(".specific_product").val()?e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid #7e8993"):(d.push("fails"),e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-selector .select2-selection").focus()),0==B.length?(d.push("fails"),e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-status .select2-selection").focus()):e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid #7e8993"),""==L?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_spent":let Y=e(a).find(".wdr-wc-order-status").val(),E=e(a).find(".float_only_field").val();0==Y.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==E?(d.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"shipping_city":""==e(a).find(".awdr-validation").val()?(d.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"shipping_country":0==e(a).find(".get_awdr_shipping_country").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"shipping_state":let H=e(a).find(".get_awdr_shipping_state").val(),W=e(a).find(".get_awdr_state_based_country").val();0==H.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),0==W.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"shipping_zipcode":""==e(a).find(".awdr-validation").val()?(d.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"Billing_city":""==e(a).find(".awdr-validation").val()?(d.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"user_email":""==e(a).find(".awdr-validation").val()?(d.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"user_list":0==e(a).find(".wdr_user_list").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"user_role":0==e(a).find(".wdr_user_role").val().length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993")}}),d}function l(d,t="success",a=null){switch(t){case"error":var i="wdr-alert-error";break;case"warning":i="wdr-alert-warning";break;default:case"success":i="wdr-alert-success"}let o="wdr-notify-msg-"+a.counts,r='<div style="display: none;" class="wdr-alert '+i+'" id="'+o+'">'+d+"</div>";e("#notify-msg-holder").append(r);let s=e("#"+o);var n=a.counts;a.counts=parseInt(n)+parseInt(1),s.fadeIn(500),setTimeout(function(){s.fadeOut(500),s.remove()},5e3)}e(".wdr-btn-add-product-filter").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-filter-block",hideBlockId:".wdr-discount-template, .wdr-advanced-layout-block",thisObject:this})}),e(".add-product-filter").click(function(){var d=e(".wdr-filter-group-items").children().last().attr("data-index");d=o(d),wdr_buildrule.wdr_clone_field({addFilterType:".wdr-build-filter-type",addFilterMethod:".products",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-filter-group-items",newIndex:d}),i(e('.wdr-filter-group[data-index="'+d+'"]').find('[data-field="autocomplete"]')),e(".wdr-filter-group[data-index="+d+"]").append("<div class='wdr_filter_desc_text'>"+wdr_data.localization_data.filter_products+"</div>")}),e(document).on("click",".remove-current-row",function(){e(".wdr-filter-group-items > div").length>=2&&wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-filter-group",thisObject:this})}),e(document).on("change",".wdr-product-filter-type",function(){let d=e(this).parents(".wdr-filter-group").data("index"),t=e(this).val();switch(wdr_buildrule.remove_wdr_field_group({parentRow:e(this).parent()}),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+t,addRemoveIcon:".wdr-icon-remove",ruleAppendTo:e(this).parents(".wdr-filter-group"),newIndex:d}),t){case"products":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_products+"</div>");break;case"product_category":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Category+"</div>");break;case"product_attributes":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Attributes+"</div>");break;case"product_tags":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Tags+"</div>");break;case"product_sku":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_SKUs+"</div>");break;case"product_on_sale":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_On_sale_products+"</div>");break;case"all_products":e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_all_products+"</div>");break;default:e('.wdr-filter-group[data-index="'+d+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_custom_taxonomies+"</div>")}i(e(this).parents(".wdr-filter-group").find('[data-field="autocomplete"]'))}),e(".wdr-btn-add-condition").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-condition-template",hideBlockId:".wdr-filter-block, .wdr-discount-template, .wdr-advanced-layout-block",thisObject:this})}),e(".add-product-condition").click(function(){var d=e(".wdr-condition-group-items").children().last().attr("data-index");d=o(d),wdr_buildrule.wdr_clone_field({addConditionType:".wdr-build-condition-type",addFilterMethod:".cart_subtotal",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:d}),"1"==wdr_data.enable_subtotal_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-subtotal-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:d}),e(".subtotal_operator").trigger("change")}),e(document).on("change",".subtotal_operator",function(){"1"==wdr_data.enable_subtotal_promo_text&&t(e(this))}),e(document).on("change",".wdr_quantity_operator",function(){"1"==wdr_data.enable_cart_quantity_promo_text&&t(e(this))}),e(document).on("click",".remove-current-row",function(){if(e(".wdr-condition-group-items > div").length>=2&&(wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-conditions-container",thisObject:this}),"1"==wdr_data.enable_subtotal_promo_text||"1"==wdr_data.enable_cart_quantity_promo_text)){let d=e(this).parent(".wdr-btn-remove").siblings(".wdr-condition-type").find(".wdr-product-condition-type").val();if("cart_subtotal"==d){let d=e(this).parents(".wdr-conditions-container").attr("data-index");e(".promo_show_hide_"+d).remove()}if("cart_items_quantity"==d){let d=e(this).parents(".wdr-conditions-container").attr("data-index");e(".promo_show_hide_"+d).remove()}}}),e(document).on("change",".wdr-product-condition-type",function(){var d=e(this).parents(".wdr-condition-group").data("index"),t=e(this).val();wdr_buildrule.remove_wdr_field_group({parentRow:e(this).parent()}),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+t,addRemoveIcon:".wdr-icon-remove",ruleAppendTo:e(this).parents(".wdr-conditions-container"),newIndex:d});var a=e(this).parents(".wdr-conditions-container").attr("data-index");"undefined"!=e(".promo_show_hide_"+a)[0]&&e(".promo_show_hide_"+a).remove(),"order_time"==t?e(".wdr_time_picker").datetimepicker({datepicker:!1,format:"H:i"}):"cart_subtotal"==t?("1"==wdr_data.enable_subtotal_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-subtotal-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:d}),e(".subtotal_operator").trigger("change")):"cart_items_quantity"==t&&("1"==wdr_data.enable_cart_quantity_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-cart-quantity-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:d}),e(".wdr_quantity_operator").trigger("change")),i(e(this).parents(".wdr-conditions-container").find('[data-field="autocomplete"]')),e(this).parents(".wdr-conditions-container").find('[data-field="preloaded"]').each(function(d,t){var a=e(t),i=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},minimumInputLength:1,placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:i}),a.parent().find(".select2-search__field").css("width","100%")}),function(d){d.each(function(d,t){var a=e(t),i=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:i}),a.parent().find(".select2-search__field").css("width","100%")})}(e(this).parents(".wdr-conditions-container").find('[data-field="autoloaded"]')),function(d){d.each(function(d,t){var a=e(t),i=a.data("class");"start_dateonly"==i?e('[data-class="'+i+'"]').datetimepicker({format:"Y-m-d",onShow:function(d){this.setOptions({maxDate:!!e('[data-class="end_dateonly"]').val()&&e('[data-class="end_dateonly"]').val()})},timepicker:!1}):"end_dateonly"==i?e('[data-class="'+i+'"]').datetimepicker({format:"Y-m-d",onShow:function(d){this.setOptions({minDate:!!e('[data-class="start_dateonly"]').val()&&e('[data-class="start_dateonly"]').val()})},timepicker:!1}):"start_datetimeonly"==i?e('[data-class="'+i+'"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(d){this.setOptions({maxDate:!!e('[data-class="end_datetimeonly"]').val()&&e('[data-class="end_datetimeonly"]').val()})}}):"end_datetimeonly"==i&&e('[data-class="'+i+'"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(d){this.setOptions({minDate:!!e('[data-class="start_datetimeonly"]').val()&&e('[data-class="start_datetimeonly"]').val()})}})})}(e(this).parents(".wdr-conditions-container").find('[data-field="date"]'))}),e(document).on("change",".wdr_copon_type",function(){var d=e(this).val();"at_least_one_any"===d?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none")):"none_at_all"===d?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none")):"custom_coupon"===d?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","block")):(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","block"),i(e(this).parents(".wdr-conditions-container").find('[data-field="autocomplete"]')))}),e(".wdr-btn-add-discount").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-discount-template",hideBlockId:".wdr-filter-block, .wdr-advanced-layout-block",thisObject:this})}),e(document).on("click",".add_discount_elements",function(){var d=e(this).data("append"),t=e(this).data("discount-method"),a=e(this).data("next-starting-value"),r=e("."+d).children().last().attr("data-index");if(r=o(r),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+t,ruleAppendTo:"."+d,addDiscountElement:"enable",newIndex:r}),""!=a&&"undefined"!=a){e("."+d+" "+a+":last-child").find(".awdr_value_selector").val("");let t=e("."+d+" "+a+":nth-last-child(2)").find(".awdr_auto_add_value").val();""==(t=parseInt(t)+1)||isNaN(t)||e("."+d+" "+a+":nth-last-child(1)").find(".awdr_next_value").val(t)}"add_buyx_gety_range"==t?(e(".buyx_gety_individual_range[data-index="+r+"]").find(".awdr-buyx-gety-max").show(),e(".buyx_gety_individual_range[data-index="+r+"]").find(".awdr-bogo-recurcive").prop("checked",!1),e(".wdr-buyx-gety-discount-inner").css("border-bottom","1px solid #ddd")):"add_buyx_getx_range"==t&&(e(".buyx_getx_individual_range[data-index="+r+"]").find(".awdr-buyx-getx-max").show(),e(".buyx_getx_individual_range[data-index="+r+"]").find(".awdr-bogo-recurcive").prop("checked",!1),e(".buyx_getx_individual_range").css("border-bottom","1px solid #ddd")),i(e("."+d+" div:last-child").find('[data-field="autocomplete"]')),i(e("."+d+" div:last-child").find('[data-list="product_category"]'))}),e(document).on("click",".wdr_discount_remove",function(){wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-discount-group",thisObject:this})}),e(document).on("click",'[data-click="wdr-bottombar"]',function(){var d=e(this).data("dtype");e(this).hide(),e("."+d).show()}),e(document).on("click","#awdr_rebuild_on_sale_list",function(){var d=e("#awdr_rebuild_on_sale_rules").val();e(".awdr_rebuild_on_sale_list_notice").html(""),null!=d?(e("#awdr_rebuild_on_sale_list").attr("disabled","disabled"),e("#awdr_rebuild_on_sale_list").html(wdr_data.localization_data.rebuild_on_sale_list_processing_text),a(d,e(this))):e(".awdr_rebuild_on_sale_list_notice").html(wdr_data.localization_data.rebuild_on_sale_list_error_please_select_rule)}),e(document).on("click","#awdr_rebuild_on_sale_list_on_rule_page",function(){e(this).attr("disabled","disabled"),e(this).html(wdr_data.localization_data.rebuild_on_sale_list_processing_text),a(null,e(this))}),e(document).on("click","#awdr_do_v1_v2_migration",function(){e(".wdr_migration_process").append(wdr_data.localization_data.processing_migration_text),function t(a){e.ajax({data:{method:"do_v1_v2_migration",action:"wdr_ajax",awdr_nonce:a},type:"post",url:ajaxurl,error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(i){null!=i.data.status?("completed"==i.data.status?(l(wdr_data.localization_data.processing_migration_success_message,"success",d),location.reload()):t(a),e(".wdr_migration_process_status").html(i.data.display_text)):location.reload()}})}(e(this).attr("data-awdr_nonce"))}),e(document).on("click","#awdr_skip_v1_v2_migration",function(){e(".wdr_migration_process").append(wdr_data.localization_data.skip_migration_text),e.ajax({data:{method:"skip_v1_v2_migration",action:"wdr_ajax"},type:"post",url:ajaxurl,error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(t){"failed"===t?l(wdr_data.localization_data.error,"error",d):!0===t.data&&(e(".wdr_migration_process").append(wdr_data.localization_data.skip_migration_success_message),l(wdr_data.localization_data.skip_migration_success_message,"success",d)),location.reload()}})}),e(".awdr-switch-version-button").on("click",function(d){d.preventDefault();var t=e(this).attr("data-version"),a=e(this).attr("data-page"),i=e(this).attr("data-nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"awdr_switch_version",version:t,page:a,wdr_nonce:i},success:function(d){1==d.data.status&&window.location.replace(d.data.url),e(".wdr_switch_message").html(d.data.message)}})}),e(document).on("click",".wdr_duplicate_rule",function(){let t=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("duplicate-rule"),awdr_nonce:e(this).data("awdr_nonce"),method:"duplicate_rule",action:"wdr_ajax"},type:"post",url:ajaxurl,beforeSend:function(){t.show()},complete:function(){t.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(e){"failed"===e?l(wdr_data.localization_data.error,"error",d):l(wdr_data.localization_data.duplicate_rule,"success",d),location.reload()}})}),e(document).on("click",".wdr_delete_rule",function(){var t=e(this).closest("tr");if(confirm(wdr_data.localization_data.delete_confirm)){let a=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("delete-rule"),awdr_nonce:e(this).data("awdr_nonce"),method:"delete_rule",action:"wdr_ajax"},type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(e){"failed"===e?l(wdr_data.localization_data.error,"error",d):(l(wdr_data.localization_data.deleted_rule,"success",d),t.hide(500,function(){t.remove()}))}})}}),e(document).on("change",".wdr_manage_status",function(){let t="",a=e(this).closest("tr");t=1==e(this).prop("checked")?1:0;let i=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("manage-status"),awdr_nonce:e(this).data("awdr_nonce"),method:"manage_status",action:"wdr_ajax",changeto:t},type:"post",url:ajaxurl,beforeSend:function(){i.show()},complete:function(){i.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(i){"failed"===i?l(wdr_data.localization_data.error,"error",d):1==t?(e(a).find(".awdr-enabled-status").show(),l(wdr_data.localization_data.enabled_rule,"success",d)):(e(a).find(".awdr-enabled-status").hide(),l(wdr_data.localization_data.disabled_rule,"success",d))}})}),e(".edit-filters").selectWoo({width:"100%",minimumInputLength:1,placeholder:wdr_data.labels.placeholders,language:{noResults:function(){return wdr_data.labels.select2_no_results}},ajax:{url:ajaxurl,type:"POST",dataType:"json",delay:250,data:function(d){return{query:d.term,action:"wdr_ajax",method:e(this).data("list")||"products",awdr_nonce:e("input[name=wdr_ajax_select2]").val()||"",taxonomy:e(this).data("taxonomy")||"",selected:e(this).val()}},processResults:function(e){return{results:e.data||[]}}}}),e(".edit-filters").parent().find(".select2-search__field").css("width","100%"),e(".edit-preloaded-values").each(function(d,t){var a=e(t),i=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},minimumInputLength:1,placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:i}),a.parent().find(".select2-search__field").css("width","100%")}),e(".edit-all-loaded-values").each(function(d,t){var a=e(t),i=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:i}),a.parent().find(".select2-search__field").css("width","100%")}),e("#wdr-save-rule").submit(function(t){if(t.preventDefault(),!function(d){let t=e(".awdr-product-discount-type").val(),a=[],i=[],o=[];switch(t){case"wdr_simple_discount":case"wdr_cart_discount":a=r(),i=s(t),o=n();break;case"wdr_free_shipping":o=n();break;case"wdr_bulk_discount":case"wdr_set_discount":case"wdr_buy_x_get_x_discount":case"wdr_buy_x_get_y_discount":a=r(),i=s(t),o=n();break;default:case"not_selected":}if(-1!==a.indexOf("fails"))return!1;if(-1!==i.indexOf("fails"))return!1;if(-1!==o.indexOf("fails"))return!1;return!0}(e(this)))return!1;let a=e(".woo_discount_loader");e.ajax({data:e(this).serialize(),type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(t){var a=t.data;if(t.success)null!=a.build_index&&null!=a.build_index.required_rebuild&&1==a.build_index.required_rebuild&&e(".awdr_rebuild_on_sale_rule_page_con").addClass("need_attention"),a.redirect?(window.location.href=a.redirect,l(wdr_data.localization_data.save_rule,"success",d)):(e(".wdr_desc_text.coupon_error_msg").hide(),e(".coupon_name_msg").css("border",""),l(wdr_data.localization_data.save_rule,"success",d));else if(a.coupon_message)e(".coupon_name_msg").css("border","1px solid #FF0000").focus(),l(wdr_data.localization_data.coupon_exists,"error",d);else for(const[e,t]of Object.entries(a))a.hasOwnProperty(e)&&t.forEach(function(e){l(e,"error",d)})}})}),e(document).on("click",".wdr_save_close",function(){e("input[name=wdr_save_close]").val("1"),e(".wdr_save_stay").click()}),e("#configuration-form").submit(function(t){t.preventDefault();let a=e(this).serialize(),i=e(".woo_discount_loader");e.ajax({data:a,type:"post",url:ajaxurl,beforeSend:function(){i.show()},complete:function(){i.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(t){switch(t.data.save_popup){case"alert_in_popup":"alert_in_popup"==t.data.save_popup&&"passed"==t.data.security_pass?(e(".awdr-save-green").show(),setTimeout(function(){e(".awdr-save-green").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},2e3)):"alert_in_popup"==t.data.save_popup&&"fails"==t.data.security_pass&&(e(".awdr-error-red").show(),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},2e3));break;case"alert_in_normal":"alert_in_normal"==t.data.save_popup&&"passed"==t.data.security_pass?(l(wdr_data.localization_data.save_settings,"success",d),setTimeout(function(){window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3)):"alert_in_normal"==t.data.save_popup&&"fails"==t.data.security_pass&&(l(wdr_data.localization_data.error,"error",d),setTimeout(function(){window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3));break;default:e(".awdr-error-red").show(),l(wdr_data.localization_data.error,"error",d),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3)}}})}),e("#awdr_advanced_configuration_form").submit(function(t){t.preventDefault();let a=e(this).serialize(),i=e(".woo_discount_loader");e.ajax({data:a,type:"post",url:ajaxurl,beforeSend:function(){i.show()},complete:function(){i.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(d){"passed"==d.data.security_pass?(e(".awdr-save-green").show(),setTimeout(function(){e(".awdr-save-green").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=advanced_section")},2e3)):"fails"==d.data.security_pass&&(e(".awdr-error-red").show(),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=advanced_section")},2e3))}})}),e(document).on("click",".bulk-table-customized-setting",function(){e("input[name=customizer_save_alert]").val("1"),e(".save-configuration-submit").click()}),e("#sort_customizable_table").dragtable({persistState:function(d){d.el.find("th").each(function(t){""!=this.id&&(d.sortOrder[this.id]=t,"customize-bulk-table-title"==this.id?e(".customize_bulk_table_title").val(t):"customize-bulk-table-discount"==this.id?e(".customize_bulk_table_discount").val(t):"customize-bulk-table-range"==this.id&&e(".customize_bulk_table_range").val(t))})}}),e("#wdr-bulk-action-top").submit(function(t){if(t.preventDefault(),!(e('input[name="saved_rules[]"]:checked').length>0))return!1;{let d,t=e("#bulk-action-selector-top").val();if("enable"==t)d=confirm("Are you sure to enable the selected rules?");else if("disable"==t)d=confirm("Are you sure to disable the selected rules?");else{if("delete"!=t)return!1;d=confirm("Are you sure to delete the selected rules?")}if(0==d)return!1}let a=e(".woo_discount_loader");e.ajax({data:e(this).serialize(),type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(e){"disabled"==e.disable?l(wdr_data.localization_data.disabled_rule,"success",d):"enabled"==e.enable?l(wdr_data.localization_data.enabled_rule,"success",d):"deleted"==e.delete?l(wdr_data.localization_data.deleted_rule,"success",d):l(wdr_data.localization_data.error,"error",d),window.location.replace(wdr_data.admin_url)}})}),e("#wdr-search-top").submit(function(d){d.preventDefault();var t=e(this).serializeArray(),a=t[0].value+"&name="+t[1].value;window.location.replace(a)}),e(document).on("keypress keyup blur",".float_only_field",function(d){e(this).val(e(this).val().replace(/[^0-9\.]/g,"")),46===d.which&&-1===e(this).val().indexOf(".")||!(d.which<48||d.which>57)||d.preventDefault()}),e(document).on("keypress keyup blur",".number_only_field",function(e){(e.which<48||e.which>57)&&e.preventDefault()}),e('[data-class="start_dateonly"]').datetimepicker({timepicker:!1,format:"Y-m-d",onShow:function(d){this.setOptions({maxDate:!!e('[data-class="end_dateonly"]').val()&&e('[data-class="end_dateonly"]').val()})}}),e('[data-class="end_dateonly"]').datetimepicker({timepicker:!1,format:"Y-m-d",onShow:function(d){this.setOptions({minDate:!!e('[data-class="start_dateonly"]').val()&&e('[data-class="start_dateonly"]').val()})}}),e('[data-class="start_datetimeonly"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(d){this.setOptions({maxDate:!!e('[data-class="end_datetimeonly"]').val()&&e('[data-class="end_datetimeonly"]').val()})}}),e('[data-class="end_datetimeonly"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(d){this.setOptions({minDate:!!e('[data-class="start_datetimeonly"]').val()&&e('[data-class="start_datetimeonly"]').val()})}}),e(".wdr_time_picker").datetimepicker({datepicker:!1,format:"H:i"}),e(document).on("change",".wdr-bulk-type",function(){"product_selected_categories"==e(this).val()?e(".wdr-bulk-cat-selector").show():e(".wdr-bulk-cat-selector").hide()}),e(".settings_option_show_hide").click(function(){var d=e(this).data("name");"1"==e(this).val()?(e("."+d).show(),"hide_table_position"==d&&e(".wdr-popup-link").show()):(e("."+d).hide(),"hide_table_position"==d&&e(".wdr-popup-link").hide())}),e(".bulk_table_customizer_preview").click(function(){var d=e(this).data("colname");"show"==e(this).data("showhide")?e("."+d).show():e("."+d).hide()}),e(".settings_option_show_hide_on_change").change(function(){"disabled"==e(this).val()?e(".display_you_saved_text").hide():e(".display_you_saved_text").show()}),e(document).on("change",".wdr-rules-select",function(){var d=e(".wdr-rules-select"),t=e(this).val();"off"==t?(d.val("on"),e(".wdr-rules-selector").prop("checked",!0)):"on"==t&&(d.val("off"),e(".wdr-rules-selector").prop("checked",!1))}),e(document).on("change",".wdr-rules-selector",function(){var d=e(".wdr-rules-select"),t=e(".wdr-ruleboard input:checkbox").length,a=e(".wdr-ruleboard input:checkbox:checked").length;t==a?(d.val("on"),d.prop("checked",!0)):t!=a&&(d.val("off"),d.prop("checked",!1))});document.getElementById("ruleHeader");var c=!1;function _(){e("#sortable").sortable({handle:".awdr-sortable-handle",delay:150,stop:function(d,t){var a=new Array;e("#sortable>tr").each(function(){a.push(e(this).attr("id"))}),u(a)}})}function u(t){e.ajax({data:{position:t,method:"update_priority_order",action:"wdr_ajax",awdr_nonce:e("input[name=awdr_rule_list_nonce]").val()},type:"post",url:ajaxurl,error:function(e,t){l(wdr_data.localization_data.error,"error",d)},success:function(e){!1===e?l(wdr_data.localization_data.error,"error",d):l(wdr_data.localization_data.save_priority,"success",d)}})}if((/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(c=!0),e(window).width()>1024?1==c?_():e("#sortable").sortable({delay:150,stop:function(d,t){var a=new Array;e("#sortable>tr").each(function(){a.push(e(this).attr("id"))}),u(a)}}):_(),e("#sortable").disableSelection(),e(document).on("click",".help-popup",function(){var d="#"+e(this).attr("data-id");e(d).dialog({modal:!0,closeText:""})}),e(document).on("click",".remove-clicked-discount-block",function(){var d=e(this).data("showblock"),t=e(this).data("removeval"),a=e(this).data("removeopt");e("."+d).hide(),e("."+t).removeAttr("value"),e("."+a).prop("selectedIndex",0),e("[data-dtype="+d+"]").show(),"wdr-bulk-discount"==d&&(e(".bulk_product_category_selector option:selected").remove(),e(".wdr-bulk-cat-selector").hide())}),e(".wdr-btn-add-message").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-advanced-layout-block",hideBlockId:".wdr-discount-template, .wdr-filter-block",thisObject:this})}),e(".bulk-min").length>=2){var p=e(".bulk_discount_min").val(),f=e(".bulk_discount_max").val(),w=e(".bulk_discount_value").val();(p||f||w)&&e(".adv-msg-min-qty, .adv-msg-max-qty").show()}if(e(".set-min").length>=2){p=e(".set_discount_min").val(),w=e(".set_discount_value").val();(p||w)&&(e(".adv-msg-min-qty").show(),e(".adv-msg-max-qty").hide())}function h(){e(".wdr-condition-group").each(function(d,t){let a=e(t).find(".wdr-product-condition-type").val();if(void 0!==a)switch(a){case"cart_item_product_onsale":e(this).remove()}})}e(".popup_table_discount_column_value").click(function(){1==e(this).val()?(e(".wdr_table_discounted_value").show(),e(".wdr_table_discounted_price").hide()):(e(".wdr_table_discounted_value").hide(),e(".wdr_table_discounted_price").show())}),e(".modal-trigger").click(function(d){d.preventDefault(),dataModal=e(this).attr("data-modal"),e("#"+dataModal).css({display:"block"})}),e(".close-modal, .modal-sandbox").click(function(){e(".modal").css({display:"none"})}),e("#badge_colorpicker").on("change",function(){e("#badge_hexcolor").val(this.value)}),e("#badge_hexcolor").on("change",function(){e("#badge_colorpicker").val(this.value)}),e("#text_colorpicker").on("change",function(){e("#text_hexcolor").val(this.value)}),e("#text_hexcolor").on("change",function(){e("#text_colorpicker").val(this.value)}),e("#awdr_shortcode_copy_btn").on("click",function(){var d,t;d="#awdr_shortcode_text",t=e("<input>"),e("body").append(t),t.val(e(d).text()).select(),document.execCommand("copy"),t.remove();var a=e(this);a.html(wdr_data.localization_data.copied),setTimeout(function(){a.html(wdr_data.localization_data.copy_shortcode)},2e3)}),e(".tips, .help_tip, .woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),e(".awdr_popup_col_name_text_box").keyup(function(){var d=e(this).val(),t=e(this).data("keyup");e("."+t).html(d)}),e(".awdr_popup_col_name_text_box").blur(function(){var d=e(this).val(),t=e(this).data("keyup");e("."+t).html(d)}),e(".apply_product_and_cart_discount_to").change(function(){let d=e(this).data("subsequent");"all"==e(this).val()?e("."+d).show():e("."+d).hide()}),e(document).on("change",".awdr-bogo-discount-type",function(){let d=e(this).val(),t=e(this).attr("data-parent"),a=e(this).attr("data-siblings");switch(d){case"flat":e(this).parent("."+t).siblings("."+a).show(),e(this).parent("."+t).siblings("."+a).find(".wdr_desc_text").text(wdr_data.localization_data.buyx_getx_value);break;case"percentage":e(this).parent("."+t).siblings("."+a).show(),e(this).parent("."+t).siblings("."+a).find(".wdr_desc_text").text(wdr_data.localization_data.buyx_getx_percentage);break;case"free_product":default:e(this).parent("."+t).siblings("."+a).hide()}}),e(document).on("change",".awdr-bogo-recurcive",function(){let d=e(this).attr("data-recursive-row"),t=e(this).attr("data-recursive-parent"),a=e(this).attr("data-hide-add-range"),i=e(this).attr("data-bogo-max-range"),o=e(this).attr("data-bogo-min-range"),r=e(this).attr("data-bogo-border"),s=e("."+d).length,n=e(this).attr("data-ranges-row-parent");if(0==e(this).prop("checked"))return e(this).parents("."+n).siblings("."+a).show(),""!=i&&(e(this).parents("."+t).siblings("."+i).show(),e(this).parents("."+t).siblings().find("."+i).show()),e(this).parents("."+t).siblings("."+o).find(".wdr_desc_text").text(wdr_data.localization_data.recursive_min_qty),void e("."+r).css("border-bottom","1px solid #ddd");if(s>3){confirm(wdr_data.localization_data.recursive_warning)?e(this).parents("."+d).siblings().remove():e(this).prop("checked",!1)}1==e(this).prop("checked")&&(e(this).parents("."+n).siblings("."+a).hide(),""!=i&&(e(this).parents("."+t).siblings("."+i).hide(),e(this).parents("."+t).siblings().find("."+i).hide()),e(this).parents("."+t).siblings("."+o).find(".wdr_desc_text").text(wdr_data.localization_data.recursive_qty),e("."+r).css("border-bottom","unset"))}),e(document).on("change",".awdr_mode_of_operator",function(){let d=e(this).val();"wdr_buy_x_get_y_discount"!=e(".awdr-product-discount-type").val()?"variation"==d?(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_variants_discount_description),e(".awdr-example").html(wdr_data.localization_data.mode_variation_cumulative_example)):"product"==d?(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_individual_product_discount_description),e(".awdr-example").html("")):(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_filter_together_discount_description),e(".awdr-example").html("")):"variation"==d?(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_variants_discount_description_tool_tip),e(".awdr-example").html(wdr_data.localization_data.mode_variation_cumulative_example)):"product"==d?(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_individual_product_discount_description_tool_tip),e(".awdr-example").html("")):(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_filter_together_discount_description_tool_tip),e(".awdr-example").html(""))}),e(document).on("change",".awdr-product-discount-type",function(){e(".awdr-example").html("");var d=e(this).data("placement");let t=e(this).val();switch(t){case"wdr_simple_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_cart_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_free_shipping":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_bulk_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_set_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_buy_x_get_x_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_buy_x_get_y_discount":e(".awdr_doc_"+t).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount").hide();break;default:case"not_selected":e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide()}"not_selected"!=e(this).val()&&"wdr_free_shipping"!=e(this).val()?(wdr_buildrule.wdr_clone_field({addFilterMethod:"."+e(this).val(),ruleAppendTo:"."+d,addDiscountType:"enable"}),e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".calculate_cart_from option[value='from_filter']").show(),e(".adv-msg-discount, .adv-msg-discount-price").show(),e(".awdr-hidden-new-rule").fadeIn(500),e(".awdr-filter-section").fadeIn(500),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"),i(e("."+d).find('[data-field="autocomplete"]')),e(".awdr-discount-container").show(),e("."+d).find(".bulk_range_setter_group").addClass("bulk_range_setter").attr("id","bulk_adjustment_sortable"),e("."+d).find(".set_range_setter_group").addClass("set_range_setter").attr("id","bulk_adjustment_sortable"),e(window).width()>1024?1==c?e("#bulk_adjustment_sortable").sortable({handle:".awdr-sortable-handle"}):e("#bulk_adjustment_sortable").sortable():e("#bulk_adjustment_sortable").sortable({handle:".awdr-sortable-handle"}),e("#bulk_adjustment_sortable").disableSelection(),e(".awdr-filter-heading").html(wdr_data.localization_data.common_filter_heading),e(".awdr-filter-content").html(wdr_data.localization_data.common_filter_description),e(".awdr-discount-heading").html(wdr_data.localization_data.common_discount_heading),e(".awdr-discount-content").html(wdr_data.localization_data.common_discount_description),e(".awdr-rules-content").html(wdr_data.localization_data.common_rules_description),"wdr_buy_x_get_y_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_bxgy_discount_heading),i(e("."+d).find('[data-list="product_category"]')),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide()),"wdr_buy_x_get_x_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide()),"wdr_bulk_discount"==e(this).val()?(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_bulk_discount_heading),e(".awdr_mode_of_operator").trigger("change"),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").show()):"wdr_set_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr_mode_of_operator").trigger("change"),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_set_discount_heading),e(".adv-msg-min-qty, .adv-msg-discount, .adv-msg-discount-price").show(),e(".adv-msg-max-qty").hide())):"wdr_free_shipping"==e(this).val()?(e(".awdr-free-shipping-special-condition").removeClass("wdr-hide"),e(".awdr-hidden-new-rule").fadeIn(500),e(".awdr-filter-section").fadeOut(),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"),e("."+d).html(""),e(".awdr-discount-container").hide(),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide(),e(".calculate_cart_from option[value='from_filter']").hide()):(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!0).addClass("wdr_save_btn_disabled"),e(".awdr-hidden-new-rule").fadeOut(500)),e(this).trigger("advanced_woo_discount_rules_on_change_adjustment_type",[e(this).val()])}),e(".awdr-product-discount-type").trigger("change"),"view"==wdr_data.rule_id?e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"):e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!0).addClass("wdr_save_btn_disabled"),e(document).on("change",".apply_fee_coupon_checkbox",function(){1==e(this).prop("checked")?e(this).parents(".awdr_rtl_compatible").siblings(".apply_fee_coupon_label").show():e(this).parents(".awdr_rtl_compatible").siblings(".apply_fee_coupon_label").hide()}),e(document).on("change",".bulk_table_customizer_show_hide_column",function(){var d=e(this).data("colname");1==e(this).prop("checked")?e("."+d).show():e("."+d).hide()});var b,m=document.getElementsByClassName("awdr-accordion");for(b=0;b<m.length;b++)m[b].addEventListener("click",function(d){d.preventDefault(),this.classList.toggle("awdr-accordion-active");var t=this.nextElementSibling;"block"===t.style.display?e(t).slideUp(1e3):e(t).slideDown(1e3)});e(document).on("change",".on_sale_badge_condition",function(){"disabled"===e(this).val()?(e(".sale_badge_toggle").hide(),e(".sale_badge_customizer,.sale_badge_percentage_customizer").hide()):(e(".sale_badge_toggle").show(),1==e("#customize_on_sale_badge").prop("checked")?(e(".sale_badge_customizer").show(),e(".display_percentage_on_sale_badge_con").show()):(e(".sale_badge_customizer").hide(),e("#display_percentage_on_sale_badge").prop("checked",!1).trigger("change"),e(".display_percentage_on_sale_badge_con").hide()),1==e("#display_percentage_on_sale_badge").prop("checked")?e(".sale_badge_percentage_customizer").show():e(".sale_badge_percentage_customizer").hide())}),e(document).on("change","#customize_on_sale_badge",function(){1==e(this).prop("checked")?(e(".sale_badge_customizer").show(),e(".display_percentage_on_sale_badge_con").show()):(e(".sale_badge_customizer").hide(),e("#display_percentage_on_sale_badge").prop("checked",!1).trigger("change"),e(".display_percentage_on_sale_badge_con").hide())}),e(document).on("change","#display_percentage_on_sale_badge",function(){1==e(this).prop("checked")?e(".sale_badge_percentage_customizer").show():e(".sale_badge_percentage_customizer").hide()}),e(document).on("change","#badge_colorpicker",function(){let d=e(this).val();e(".awdr_admin_discount_bar").css("background-color",d)}),e(document).on("change","#badge_hexcolor",function(){let d=e(this).val();e(".awdr_admin_discount_bar").css("background-color",d)}),e(document).on("change","#text_colorpicker",function(){let d=e(this).val();e(".awdr_admin_discount_bar").css("color",d)}),e(document).on("change","#text_hexcolor",function(){let d=e(this).val();e(".awdr_admin_discount_bar").css("color",d)}),e(document).on("change","#awdr_discount_bar_content",function(){let d=e(this).val();e(".awdr_admin_discount_bar").html(d)}),e(document).on("click",".awdr-hidden-search",function(){let d=e(".awdr-hidden-name").val();e(".wdr-rule-search-key").val(d),e("#wdr-search-top").submit()}),e(document).on("change","#select_usage_limits",function(){let d=e("#select_usage_limits").val();if(""==d)e(".awdr-rule-limit-disabled-outer .rule_limit_msg_outer").hide(),e(".awdr-rule-limit-disabled").hide();else{var t=e(".awdr-used-limit-total").html();d<=parseInt(t)?(e(".awdr-rule-limit-disabled").hide(),e(".awdr-rule-limit-disabled-outer").show(),e(".awdr-rule-limit-disabled-outer .rule_limit_msg_outer").html(wdr_data.localization_data.invalid_rule_limit)):(e(".awdr-rule-limit-disabled").hide(),e(".awdr-rule-limit-disabled-outer").hide())}}),e("#awdr-import-csv").on("submit",function(){return!!new RegExp("([a-zA-Z0-9s_\\.-:])+(.csv)$").test(e("#awdr-file-uploader").val().toLowerCase())||(e("#awdr-upload-response").html(wdr_data.localization_data.invalid_file_type),!1)}),e(document).on("change",".get_awdr_state_based_country",function(){let d=e(this).val();if(!d||""==d||0==d.length)return!1;let t=e(this).parents(".wdr-conditions-container").attr("data-index"),a=e(this).parents(".wdr_shipping_state_group"),i=e(this).parent().siblings(".wdr-shipping-state-value"),o=e(".woo_discount_loader");var r={action:"wdr_ajax",method:"get_state_details",selected_country:d,selected_state:e(this).parent().siblings(".wdr-shipping-state-value").find(".get_awdr_shipping_state").val(),selected_index:t,awdr_nonce:e("input[name=wdr_ajax_select2]").val()||""};e.ajax({url:ajaxurl,data:r,type:"POST",beforeSend:function(){o.show()},complete:function(){o.hide()},success:function(d){i.remove(),a.append("<div class='wdr-shipping-state-value wdr-select-filed-hight wdr-search-box' style='width: min-content;'>"+d.data+"<span class='wdr_select2_desc_text'>"+wdr_data.localization_data.select_state+"</span> </div>"),e(".append-preloaded-values").selectWoo()},error:function(e){console.log("error")}})}),e(".get_awdr_state_based_country").trigger("change")});
1
+ jQuery(document).ready(function(e){const t={counts:1};function d(t){let d=t.val(),a=t.parents(".wdr-conditions-container").attr("data-index");"greater_than_or_equal"==d||"greater_than"==d?e(".promo_show_hide_"+a).show():e(".promo_show_hide_"+a).hide()}function a(d,a){e.ajax({data:{method:"rebuild_onsale_list",action:"wdr_ajax",rules:d,awdr_nonce:a.attr("data-awdr_nonce")},type:"post",url:ajaxurl,error:function(e,d){l(wdr_data.localization_data.error,"error",t),a.removeAttr("disabled")},success:function(e){a.html(wdr_data.localization_data.rebuild_on_sale_list_processed_text),a.removeAttr("disabled")}})}function o(t){t.selectWoo({width:"100%",minimumInputLength:1,placeholder:t.data("placeholder"),escapeMarkup:function(e){return e},language:{noResults:function(){return wdr_data.labels.select2_no_results},errorLoading:function(){return wdr_data.labels.searching_text}},ajax:{url:ajaxurl,type:"POST",dataType:"json",delay:250,data:function(d){return{query:d.term,action:"wdr_ajax",method:t.data("list")||"products",awdr_nonce:e("input[name=wdr_ajax_select2]").val()||"",taxonomy:t.data("taxonomy")||"",selected:t.val()}},processResults:function(e){return{results:e.data||[]}}}}),t.parent().find(".select2-search__field").css("width","100%")}function i(e){return 0===e?0:parseInt(e)+1}function r(){let t=[];return e(".wdr-filter-group").each(function(d,a){let o=e(a).find(".wdr-product-filter-type").val(),i=e(a).find(".awdr_validation").val();switch(o){case"all_products":break;case"products":case"product_category":case"product_attributes":case"product_tags":case"product_sku":0==i.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"product_on_sale":break;default:0==i.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993")}}),t}function s(t){let d=[];switch(t){case"wdr_simple_discount":let a=e(".product_discount_value").val();""!=a&&a?e(".product_discount_value").css("border","1px solid #7e8993"):(d.push("fails"),e(".product_discount_value").css("border","1px solid red"),e(".product_discount_value").focus());break;case"wdr_cart_discount":let o=e(".awdr_cart_discount_value").val();""!=o&&o?e(".awdr_cart_discount_value").css("border","1px solid #7e8993"):(d.push("fails"),e(".awdr_cart_discount_value").css("border","1px solid red"),e(".awdr_cart_discount_value").focus());break;case"wdr_free_shipping":break;case"wdr_bulk_discount":e(".bulk_range_setter").find(".awdr-bulk-group").each(function(t,a){let o=e(a).find(".bulk_discount_min").val(),i=e(a).find(".bulk_discount_max").val(),r=e(a).find(".bulk_discount_value").val();""==o&&""==i?(d.push("fails"),e(a).find(".bulk_discount_min").css("border","1px solid red"),e(a).find(".bulk_discount_min").focus(),e(a).find(".bulk_discount_max").css("border","1px solid red"),e(a).find(".bulk_discount_max").focus()):(e(a).find(".bulk_discount_min").css("border","1px solid #7e8993"),e(a).find(".bulk_discount_max").css("border","1px solid #7e8993"));let s=parseInt(r);""==r||s<0?(d.push("fails"),e(a).find(".bulk_discount_value").css("border","1px solid red"),e(a).find(".bulk_discount_value").focus()):e(a).find(".bulk_discount_value").css("border","1px solid #7e8993")});break;case"wdr_set_discount":e(".set_range_setter").find(".bundle-set-range-main").each(function(t,a){let o=e(a).find(".set_discount_min").val(),i=e(a).find(".set_discount_value").val();""==o?(d.push("fails"),e(a).find(".set_discount_min").css("border","1px solid red"),e(a).find(".set_discount_min").focus()):e(a).find(".set_discount_min").css("border","1px solid #7e8993"),""==i?(d.push("fails"),e(a).find(".set_discount_value").css("border","1px solid red"),e(a).find(".set_discount_value").focus()):e(a).find(".set_discount_value").css("border","1px solid #7e8993")});break;case"wdr_buy_x_get_x_discount":e(".buyx_getx_range_setter").find(".buyx_getx_individual_range").each(function(t,a){let o=e(a).find(".bxgx-min").val(),i=e(a).find(".bxgx-max").val(),r=e(a).find(".bxgx-qty").val(),s=e(a).find(".buyx_getx_discount_select").val(),n=e(a).find(".bxgx-value").val();1==e(a).find(".awdr-bogo-recurcive").prop("checked")&&(""==o?(d.push("fails"),e(a).find(".bxgx-min").css("border","1px solid red"),e(a).find(".bxgx-min").focus()):e(a).find(".bxgx-min").css("border","1px solid #7e8993")),""==o&&""==i?(d.push("fails"),e(a).find(".bxgx-min").css("border","1px solid red"),e(a).find(".bxgx-min").focus(),e(a).find(".bxgx-max").css("border","1px solid red"),e(a).find(".bxgx-max").focus()):(e(a).find(".bxgx-min").css("border","1px solid #7e8993"),e(a).find(".bxgx-max").css("border","1px solid #7e8993")),""==r?(d.push("fails"),e(a).find(".bxgx-qty").css("border","1px solid red"),e(a).find(".bxgx-qty").focus()):e(a).find(".bxgx-qty").css("border","1px solid #7e8993"),"free_product"!=s&&""==n?(d.push("fails"),e(a).find(".bxgx-value").css("border","1px solid red"),e(a).find(".bxgx-value").focus()):e(a).find(".bxgx-value").css("border","1px solid #7e8993")});break;case"wdr_buy_x_get_y_discount":let i=e(".select_bxgy_type").val();e(".awdr_buyx_gety_range_setter").find(".buyx_gety_individual_range").each(function(t,a){let o=e(a).find(".bxgy-min").val(),r=e(a).find(".bxgy-max").val(),s=e(a).find(".bxgy-product-selector").val(),n=e(a).find(".bxgy-category-selector").val(),l=e(a).find(".bxgy-qty").val(),c=e(a).find(".buyx_gety_discount_select").val(),_=e(a).find(".bxgy-val").val();"bxgy_product"==i?0==s.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"):"bxgy_category"==i?0==n.length?(d.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"):"0"!=i&&i?e(".select_bxgy_type").css("border","1px solid #7e8993"):(d.push("fails"),e(".select_bxgy_type").css("border","1px solid red"),e(".select_bxgy_type").focus()),1==e(a).find(".awdr-bogo-recurcive").prop("checked")&&(""==o?(d.push("fails"),e(a).find(".bxgy-min").css("border","1px solid red"),e(a).find(".bxgy-min").focus()):e(a).find(".bxgy-min").css("border","1px solid #7e8993")),""==o&&""==r?(d.push("fails"),e(a).find(".bxgy-min").css("border","1px solid red"),e(a).find(".bxgy-min").focus(),e(a).find(".bxgy-max").css("border","1px solid red"),e(a).find(".bxgy-max").focus()):(e(a).find(".bxgy-min").css("border","1px solid #7e8993"),e(a).find(".bxgy-max").css("border","1px solid #7e8993")),""==l?(d.push("fails"),e(a).find(".bxgy-qty").css("border","1px solid red"),e(a).find(".bxgy-qty").focus()):e(a).find(".bxgy-qty").css("border","1px solid #7e8993"),"free_product"!=c&&""==_?(d.push("fails"),e(a).find(".bxgy-val").css("border","1px solid red"),e(a).find(".bxgy-val").focus()):e(a).find(".bxgy-val").css("border","1px solid #7e8993")});break;default:case"not_selected":d.push("fails")}return d}function n(){let t=[];return e(".wdr-condition-group").each(function(d,a){let o=e(a).find(".wdr-product-condition-type").val();if(void 0!==o)switch(o){case"cart_subtotal":""==e(a).find(".float_only_field").val()?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_items_quantity":""==e(a).find(".float_only_field").val()?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_coupon":let d=e(a).find(".wdr_copon_type").val(),i=e(a).find(".coupon_name_msg").val(),r=e(a).find("#rm-coupon").val();"custom_coupon"==d?""==i?(t.push("fails"),e(a).find(".coupon_name_msg").css("border","1px solid red"),e(a).find(".coupon_name_msg").focus()):e(a).find(".coupon_name_msg").css("border","1px solid #7e8993"):r?e(a).find(".select2-selection").css("border","1px solid #7e8993"):(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus());break;case"cart_items_weight":""==e(a).find(".float_only_field").val()?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_payment_method":0==e(a).find(".select2-hidden-accessible").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"cart_line_items_count":""==e(a).find(".float_only_field").val()?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"cart_item_product_attributes":let s=e(a).find(".awdr-attribute-validation").val(),n=e(a).find(".awdr-num-validation").val();0==s.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==n?(t.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_category":let l=e(a).find(".awdr-category-validation").val(),c=e(a).find(".awdr-num-validation").val();0==l.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==c?(t.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_combination":let _=e(a).find(".awdr-product-validation").val(),u=e(a).find(".product_from_qty").val(),p=e(a).find(".product_to_qty").val(),f=e(a).find(".combination_operator").val();0==_.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),"in_range"==f?""==u&&""==p?(t.push("fails"),e(a).find(".product_from_qty").css("border","1px solid red"),e(a).find(".product_from_qty").focus(),e(a).find(".product_to_qty").css("border","1px solid red"),e(a).find(".product_to_qty").focus()):(e(a).find(".product_from_qty").css("border","1px solid #7e8993"),e(a).find(".product_to_qty").css("border","1px solid #7e8993")):""==u?(t.push("fails"),e(a).find(".product_from_qty").css("border","1px solid red"),e(a).find(".product_from_qty").focus()):e(a).find(".product_from_qty").css("border","1px solid #7e8993");break;case"cart_item_product_sku":let w=e(a).find(".awdr-sku-validation").val(),h=e(a).find(".awdr-num-validation").val();0==w.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==h?(t.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_product_tags":let b=e(a).find(".awdr-tag-validation").val(),m=e(a).find(".awdr-num-validation").val();0==b.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==m?(t.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_products":let g=e(a).find(".awdr-product-validation").val(),v=e(a).find(".awdr-num-validation").val();0==g.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==v?(t.push("fails"),e(a).find(".awdr-num-validation").css("border","1px solid red"),e(a).find(".awdr-num-validation").focus()):e(a).find(".awdr-num-validation").css("border","1px solid #7e8993");break;case"cart_item_category_combination":let x=e(a).find(".awdr-cat-validation").val(),y=e(a).find(".cat_from_qty").val(),k=e(a).find(".cat_to_qty").val(),z=e(a).find(".cat_combination_operator").val();0==x.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),"in_range"==z?""==y&&""==k?(t.push("fails"),e(a).find(".cat_from_qty").css("border","1px solid red"),e(a).find(".cat_from_qty").focus(),e(a).find(".cat_to_qty").css("border","1px solid red"),e(a).find(".cat_to_qty").focus()):(e(a).find(".cat_from_qty").css("border","1px solid #7e8993"),e(a).find(".cat_to_qty").css("border","1px solid #7e8993")):""==y?(t.push("fails"),e(a).find(".cat_from_qty").css("border","1px solid red"),e(a).find(".cat_from_qty").focus()):e(a).find(".cat_from_qty").css("border","1px solid #7e8993");break;case"order_date":let q=e(a).find(".awdr-from-date").val(),j=e(a).find(".awdr-end-date").val();""==q&&""==j?(t.push("fails"),e(a).find(".awdr-from-date").css("border","1px solid red"),e(a).find(".awdr-from-date").focus(),e(a).find(".awdr-end-date").css("border","1px solid red"),e(a).find(".awdr-end-date").focus()):(e(a).find(".awdr-from-date").css("border","1px solid #7e8993"),e(a).find(".awdr-end-date").css("border","1px solid #7e8993"));break;case"order_date_and_time":let I=e(a).find(".awdr-from-date").val(),O=e(a).find(".awdr-end-date").val();""==I&&""==O?(t.push("fails"),e(a).find(".awdr-from-date").css("border","1px solid red"),e(a).find(".awdr-from-date").focus(),e(a).find(".awdr-end-date").css("border","1px solid red"),e(a).find(".awdr-end-date").focus()):(e(a).find(".awdr-from-date").css("border","1px solid #7e8993"),e(a).find(".awdr-end-date").css("border","1px solid #7e8993"));break;case"order_days":0==e(a).find(".order_days").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"order_time":let T=e(a).find(".wdr-from-time").val(),C=e(a).find(".wdr-to-time").val();""==T&&""==C?(t.push("fails"),e(a).find(".wdr-from-time").css("border","1px solid red"),e(a).find(".wdr-from-time").focus(),e(a).find(".wdr-to-time").css("border","1px solid red"),e(a).find(".wdr-to-time").focus()):(e(a).find(".wdr-from-time").css("border","1px solid #7e8993"),e(a).find(".wdr-to-time").css("border","1px solid #7e8993"));break;case"purchase_last_order":0==e(a).find(".wdr-wc-order-status").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"purchase_last_order_amount":let S=e(a).find(".wdr-wc-order-status").val(),R=e(a).find(".float_only_field").val();0==S.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==R?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_previous_orders":let A=e(a).find(".wdr-wc-order-status").val(),D=e(a).find(".float_only_field").val();0==A.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==D?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_previous_orders_for_specific_product":let M=e(a).find(".wdr-wc-order-status").val(),$=e(a).find(".float_only_field").val();0==e(a).find(".specific_product").val().length?(t.push("fails"),e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-selector .select2-selection").focus()):e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid #7e8993"),0==M.length?(t.push("fails"),e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-status .select2-selection").focus()):e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid #7e8993"),""==$?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_quantities_for_specific_product":let F=e(a).find(".wdr-wc-order-status").val(),B=e(a).find(".float_only_field").val();e(a).find(".specific_product").val()?e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid #7e8993"):(t.push("fails"),e(a).find(".wdr-previous-order-product-selector .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-selector .select2-selection").focus()),0==F.length?(t.push("fails"),e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid red"),e(a).find(".wdr-previous-order-product-status .select2-selection").focus()):e(a).find(".wdr-previous-order-product-status .select2-selection").css("border","1px solid #7e8993"),""==B?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"purchase_spent":let E=e(a).find(".wdr-wc-order-status").val(),L=e(a).find(".float_only_field").val();0==E.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),""==L?(t.push("fails"),e(a).find(".float_only_field").css("border","1px solid red"),e(a).find(".float_only_field").focus()):e(a).find(".float_only_field").css("border","1px solid #7e8993");break;case"shipping_city":""==e(a).find(".awdr-validation").val()?(t.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"shipping_country":0==e(a).find(".get_awdr_shipping_country").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"shipping_state":let Y=e(a).find(".get_awdr_shipping_state").val(),H=e(a).find(".get_awdr_state_based_country").val();0==Y.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993"),0==H.length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"shipping_zipcode":""==e(a).find(".awdr-validation").val()?(t.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"Billing_city":""==e(a).find(".awdr-validation").val()?(t.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"user_email":""==e(a).find(".awdr-validation").val()?(t.push("fails"),e(a).find(".awdr-validation").css("border","1px solid red"),e(a).find(".awdr-validation").focus()):e(a).find(".awdr-validation").css("border","1px solid #7e8993");break;case"user_list":0==e(a).find(".wdr_user_list").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993");break;case"user_role":0==e(a).find(".wdr_user_role").val().length?(t.push("fails"),e(a).find(".select2-selection").css("border","1px solid red"),e(a).find(".select2-selection").focus()):e(a).find(".select2-selection").css("border","1px solid #7e8993")}}),t}function l(t,d="success",a=null){switch(d){case"error":var o="wdr-alert-error";break;case"warning":o="wdr-alert-warning";break;default:case"success":o="wdr-alert-success"}let i="wdr-notify-msg-"+a.counts,r='<div style="display: none;" class="wdr-alert '+o+'" id="'+i+'">'+t+"</div>";e("#notify-msg-holder").append(r);let s=e("#"+i);var n=a.counts;a.counts=parseInt(n)+parseInt(1),s.fadeIn(500),setTimeout(function(){s.fadeOut(500),s.remove()},5e3)}e(".wdr-btn-add-product-filter").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-filter-block",hideBlockId:".wdr-discount-template, .wdr-advanced-layout-block",thisObject:this})}),e(".add-product-filter").click(function(){var t=e(".wdr-filter-group-items").children().last().attr("data-index");t=i(t),wdr_buildrule.wdr_clone_field({addFilterType:".wdr-build-filter-type",addFilterMethod:".products",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-filter-group-items",newIndex:t}),o(e('.wdr-filter-group[data-index="'+t+'"]').find('[data-field="autocomplete"]')),e(".wdr-filter-group[data-index="+t+"]").append("<div class='wdr_filter_desc_text'>"+wdr_data.localization_data.filter_products+"</div>")}),e(document).on("click",".remove-current-row",function(){e(".wdr-filter-group-items > div").length>=2&&wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-filter-group",thisObject:this})}),e(document).on("change",".wdr-product-filter-type",function(){let t=e(this).parents(".wdr-filter-group").data("index"),d=e(this).val();switch(wdr_buildrule.remove_wdr_field_group({parentRow:e(this).parent()}),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+d,addRemoveIcon:".wdr-icon-remove",ruleAppendTo:e(this).parents(".wdr-filter-group"),newIndex:t}),d){case"products":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_products+"</div>");break;case"product_category":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Category+"</div>");break;case"product_attributes":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Attributes+"</div>");break;case"product_tags":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_Tags+"</div>");break;case"product_sku":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_SKUs+"</div>");break;case"product_on_sale":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_On_sale_products+"</div>");break;case"all_products":e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_all_products+"</div>");break;default:e('.wdr-filter-group[data-index="'+t+'"]').append('<div class="wdr_filter_desc_text">'+wdr_data.localization_data.filter_custom_taxonomies+"</div>")}o(e(this).parents(".wdr-filter-group").find('[data-field="autocomplete"]'))}),e(".wdr-btn-add-condition").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-condition-template",hideBlockId:".wdr-filter-block, .wdr-discount-template, .wdr-advanced-layout-block",thisObject:this})}),e(".add-product-condition").click(function(){var t=e(".wdr-condition-group-items").children().last().attr("data-index");t=i(t),wdr_buildrule.wdr_clone_field({addConditionType:".wdr-build-condition-type",addFilterMethod:".cart_subtotal",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:t}),"1"==wdr_data.enable_subtotal_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-subtotal-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:t}),e(".subtotal_operator").trigger("change")}),e(document).on("change",".subtotal_operator",function(){"1"==wdr_data.enable_subtotal_promo_text&&d(e(this))}),e(document).on("change",".wdr_quantity_operator",function(){"1"==wdr_data.enable_cart_quantity_promo_text&&d(e(this))}),e(document).on("click",".remove-current-row",function(){if(e(".wdr-condition-group-items > div").length>=2&&(wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-conditions-container",thisObject:this}),"1"==wdr_data.enable_subtotal_promo_text||"1"==wdr_data.enable_cart_quantity_promo_text)){let t=e(this).parent(".wdr-btn-remove").siblings(".wdr-condition-type").find(".wdr-product-condition-type").val();if("cart_subtotal"==t){let t=e(this).parents(".wdr-conditions-container").attr("data-index");e(".promo_show_hide_"+t).remove()}if("cart_items_quantity"==t){let t=e(this).parents(".wdr-conditions-container").attr("data-index");e(".promo_show_hide_"+t).remove()}}}),e(document).on("change",".wdr-product-condition-type",function(){var t=e(this).parents(".wdr-condition-group").data("index"),d=e(this).val();wdr_buildrule.remove_wdr_field_group({parentRow:e(this).parent()}),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+d,addRemoveIcon:".wdr-icon-remove",ruleAppendTo:e(this).parents(".wdr-conditions-container"),newIndex:t});var a=e(this).parents(".wdr-conditions-container").attr("data-index");"undefined"!=e(".promo_show_hide_"+a)[0]&&e(".promo_show_hide_"+a).remove(),"order_time"==d?e(".wdr_time_picker").datetimepicker({datepicker:!1,format:"H:i"}):"cart_subtotal"==d?("1"==wdr_data.enable_subtotal_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-subtotal-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:t}),e(".subtotal_operator").trigger("change")):"cart_items_quantity"==d&&("1"==wdr_data.enable_cart_quantity_promo_text&&wdr_buildrule.wdr_clone_field({addConditionType:"empty-promo",addFilterMethod:".wdr-cart-quantity-promo-messeage-main",addRemoveIcon:".wdr-icon-remove",ruleAppendTo:".wdr-condition-group-items",newIndex:t}),e(".wdr_quantity_operator").trigger("change")),o(e(this).parents(".wdr-conditions-container").find('[data-field="autocomplete"]')),e(this).parents(".wdr-conditions-container").find('[data-field="preloaded"]').each(function(t,d){var a=e(d),o=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},minimumInputLength:1,placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:o}),a.parent().find(".select2-search__field").css("width","100%")}),function(t){t.each(function(t,d){var a=e(d),o=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:o}),a.parent().find(".select2-search__field").css("width","100%")})}(e(this).parents(".wdr-conditions-container").find('[data-field="autoloaded"]')),function(t){t.each(function(t,d){var a=e(d),o=a.data("class");"start_dateonly"==o?e('[data-class="'+o+'"]').datetimepicker({format:"Y-m-d",onShow:function(t){this.setOptions({maxDate:!!e('[data-class="end_dateonly"]').val()&&e('[data-class="end_dateonly"]').val()})},timepicker:!1}):"end_dateonly"==o?e('[data-class="'+o+'"]').datetimepicker({format:"Y-m-d",onShow:function(t){this.setOptions({minDate:!!e('[data-class="start_dateonly"]').val()&&e('[data-class="start_dateonly"]').val()})},timepicker:!1}):"start_datetimeonly"==o?e('[data-class="'+o+'"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(t){this.setOptions({maxDate:!!e('[data-class="end_datetimeonly"]').val()&&e('[data-class="end_datetimeonly"]').val()})}}):"end_datetimeonly"==o&&e('[data-class="'+o+'"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(t){this.setOptions({minDate:!!e('[data-class="start_datetimeonly"]').val()&&e('[data-class="start_datetimeonly"]').val()})}})})}(e(this).parents(".wdr-conditions-container").find('[data-field="date"]'))}),e(document).on("change",".wdr_copon_type",function(){var t=e(this).val();"at_least_one_any"===t?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none")):"none_at_all"===t?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none")):"custom_coupon"===t?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","block")):(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-value").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search").css("display","block"),o(e(this).parents(".wdr-conditions-container").find('[data-field="autocomplete"]')))}),e(".wdr-btn-add-discount").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-discount-template",hideBlockId:".wdr-filter-block, .wdr-advanced-layout-block",thisObject:this})}),e(document).on("click",".add_discount_elements",function(){var t=e(this).data("append"),d=e(this).data("discount-method"),a=e(this).data("next-starting-value"),r=e("."+t).children().last().attr("data-index");if(r=i(r),wdr_buildrule.wdr_clone_field({addFilterMethod:"."+d,ruleAppendTo:"."+t,addDiscountElement:"enable",newIndex:r}),""!=a&&"undefined"!=a){e("."+t+" "+a+":last-child").find(".awdr_value_selector").val("");let d=e("."+t+" "+a+":nth-last-child(2)").find(".awdr_auto_add_value").val();""==(d=parseInt(d)+1)||isNaN(d)||e("."+t+" "+a+":nth-last-child(1)").find(".awdr_next_value").val(d)}"add_buyx_gety_range"==d?(e(".buyx_gety_individual_range[data-index="+r+"]").find(".awdr-buyx-gety-max").show(),e(".buyx_gety_individual_range[data-index="+r+"]").find(".awdr-bogo-recurcive").prop("checked",!1),e(".wdr-buyx-gety-discount-inner").css("border-bottom","1px solid #ddd")):"add_buyx_getx_range"==d&&(e(".buyx_getx_individual_range[data-index="+r+"]").find(".awdr-buyx-getx-max").show(),e(".buyx_getx_individual_range[data-index="+r+"]").find(".awdr-bogo-recurcive").prop("checked",!1),e(".buyx_getx_individual_range").css("border-bottom","1px solid #ddd")),o(e("."+t+" div:last-child").find('[data-field="autocomplete"]')),o(e("."+t+" div:last-child").find('[data-list="product_category"]'))}),e(document).on("click",".wdr_discount_remove",function(){wdr_buildrule.remove_wdr_field_group({parentsRow:".wdr-discount-group",thisObject:this})}),e(document).on("click",'[data-click="wdr-bottombar"]',function(){var t=e(this).data("dtype");e(this).hide(),e("."+t).show()}),e(document).on("click","#awdr_rebuild_on_sale_list",function(){var t=e("#awdr_rebuild_on_sale_rules").val();e(".awdr_rebuild_on_sale_list_notice").html(""),null!=t?(e("#awdr_rebuild_on_sale_list").attr("disabled","disabled"),e("#awdr_rebuild_on_sale_list").html(wdr_data.localization_data.rebuild_on_sale_list_processing_text),a(t,e(this))):e(".awdr_rebuild_on_sale_list_notice").html(wdr_data.localization_data.rebuild_on_sale_list_error_please_select_rule)}),e(document).on("click","#awdr_rebuild_on_sale_list_on_rule_page",function(){e(this).attr("disabled","disabled"),e(this).html(wdr_data.localization_data.rebuild_on_sale_list_processing_text),a(null,e(this))}),e(document).on("click","#awdr_do_v1_v2_migration",function(){e(".wdr_migration_process").append(wdr_data.localization_data.processing_migration_text),function d(a){e.ajax({data:{method:"do_v1_v2_migration",action:"wdr_ajax",awdr_nonce:a},type:"post",url:ajaxurl,error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(o){null!=o.data.status?("completed"==o.data.status?(l(wdr_data.localization_data.processing_migration_success_message,"success",t),location.reload()):d(a),e(".wdr_migration_process_status").html(o.data.display_text)):location.reload()}})}(e(this).attr("data-awdr_nonce"))}),e(document).on("click","#awdr_skip_v1_v2_migration",function(){e(".wdr_migration_process").append(wdr_data.localization_data.skip_migration_text),e.ajax({data:{method:"skip_v1_v2_migration",action:"wdr_ajax"},type:"post",url:ajaxurl,error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(d){"failed"===d?l(wdr_data.localization_data.error,"error",t):!0===d.data&&(e(".wdr_migration_process").append(wdr_data.localization_data.skip_migration_success_message),l(wdr_data.localization_data.skip_migration_success_message,"success",t)),location.reload()}})}),e(".awdr-switch-version-button").on("click",function(t){t.preventDefault();var d=e(this).attr("data-version"),a=e(this).attr("data-page"),o=e(this).attr("data-nonce");e.ajax({url:ajaxurl,type:"POST",data:{action:"awdr_switch_version",version:d,page:a,wdr_nonce:o},success:function(t){1==t.data.status&&window.location.replace(t.data.url),e(".wdr_switch_message").html(t.data.message)}})}),e(document).on("click",".wdr_duplicate_rule",function(){let d=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("duplicate-rule"),awdr_nonce:e(this).data("awdr_nonce"),method:"duplicate_rule",action:"wdr_ajax"},type:"post",url:ajaxurl,beforeSend:function(){d.show()},complete:function(){d.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(e){"failed"===e?l(wdr_data.localization_data.error,"error",t):l(wdr_data.localization_data.duplicate_rule,"success",t),location.reload()}})}),e(document).on("click",".wdr_delete_rule",function(){var d=e(this).closest("tr");if(confirm(wdr_data.localization_data.delete_confirm)){let a=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("delete-rule"),awdr_nonce:e(this).data("awdr_nonce"),method:"delete_rule",action:"wdr_ajax"},type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(e){"failed"===e?l(wdr_data.localization_data.error,"error",t):(l(wdr_data.localization_data.deleted_rule,"success",t),d.hide(500,function(){d.remove()}))}})}}),e(document).on("change",".wdr_manage_status",function(){let d="",a=e(this).closest("tr");d=1==e(this).prop("checked")?1:0;let o=e(".woo_discount_loader");e.ajax({data:{rowid:e(this).data("manage-status"),awdr_nonce:e(this).data("awdr_nonce"),method:"manage_status",action:"wdr_ajax",changeto:d},type:"post",url:ajaxurl,beforeSend:function(){o.show()},complete:function(){o.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(o){"failed"===o?l(wdr_data.localization_data.error,"error",t):1==d?(e(a).find(".awdr-enabled-status").show(),l(wdr_data.localization_data.enabled_rule,"success",t)):(e(a).find(".awdr-enabled-status").hide(),l(wdr_data.localization_data.disabled_rule,"success",t))}})}),e(".edit-filters").selectWoo({width:"100%",minimumInputLength:1,placeholder:wdr_data.labels.placeholders,language:{noResults:function(){return wdr_data.labels.select2_no_results}},ajax:{url:ajaxurl,type:"POST",dataType:"json",delay:250,data:function(t){return{query:t.term,action:"wdr_ajax",method:e(this).data("list")||"products",awdr_nonce:e("input[name=wdr_ajax_select2]").val()||"",taxonomy:e(this).data("taxonomy")||"",selected:e(this).val()}},processResults:function(e){return{results:e.data||[]}}}}),e(".edit-filters").parent().find(".select2-search__field").css("width","100%"),e(".edit-preloaded-values").each(function(t,d){var a=e(d),o=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},minimumInputLength:1,placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:o}),a.parent().find(".select2-search__field").css("width","100%")}),e(".edit-all-loaded-values").each(function(t,d){var a=e(d),o=wdr_data.lists[a.data("list")];a.selectWoo({width:"100%",escapeMarkup:function(e){return e},placeholder:a.data("placeholder"),language:{noResults:function(){return wdr_data.labels.select2_no_results}},data:o}),a.parent().find(".select2-search__field").css("width","100%")}),e("#wdr-save-rule").submit(function(d){if(d.preventDefault(),!function(t){let d=e(".awdr-product-discount-type").val(),a=[],o=[],i=[];switch(d){case"wdr_simple_discount":case"wdr_cart_discount":a=r(),o=s(d),i=n();break;case"wdr_free_shipping":i=n();break;case"wdr_bulk_discount":case"wdr_set_discount":case"wdr_buy_x_get_x_discount":case"wdr_buy_x_get_y_discount":a=r(),o=s(d),i=n();break;default:case"not_selected":}if(-1!==a.indexOf("fails"))return!1;if(-1!==o.indexOf("fails"))return!1;if(-1!==i.indexOf("fails"))return!1;return!0}(e(this)))return!1;let a=e(".woo_discount_loader");e.ajax({data:e(this).serialize(),type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(d){var a=d.data;if(d.success)null!=a.build_index&&null!=a.build_index.required_rebuild&&1==a.build_index.required_rebuild&&e(".awdr_rebuild_on_sale_rule_page_con").addClass("need_attention"),a.redirect?(window.location.href=a.redirect,l(wdr_data.localization_data.save_rule,"success",t)):(e(".wdr_desc_text.coupon_error_msg").hide(),e(".coupon_name_msg").css("border",""),l(wdr_data.localization_data.save_rule,"success",t));else if(a.coupon_message)e(".coupon_name_msg").css("border","1px solid #FF0000").focus(),l(wdr_data.localization_data.coupon_exists,"error",t);else for(const[e,d]of Object.entries(a))a.hasOwnProperty(e)&&d.forEach(function(e){l(e,"error",t)})}})}),e(document).on("click",".wdr_save_close",function(){e("input[name=wdr_save_close]").val("1"),e(".wdr_save_stay").click()}),e("#configuration-form").submit(function(d){d.preventDefault();let a=e(this).serialize(),o=e(".woo_discount_loader");e.ajax({data:a,type:"post",url:ajaxurl,beforeSend:function(){o.show()},complete:function(){o.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(d){switch(d.data.save_popup){case"alert_in_popup":"alert_in_popup"==d.data.save_popup&&"passed"==d.data.security_pass?(e(".awdr-save-green").show(),setTimeout(function(){e(".awdr-save-green").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},2e3)):"alert_in_popup"==d.data.save_popup&&"fails"==d.data.security_pass&&(e(".awdr-error-red").show(),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},2e3));break;case"alert_in_normal":"alert_in_normal"==d.data.save_popup&&"passed"==d.data.security_pass?(l(wdr_data.localization_data.save_settings,"success",t),setTimeout(function(){window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3)):"alert_in_normal"==d.data.save_popup&&"fails"==d.data.security_pass&&(l(wdr_data.localization_data.error,"error",t),setTimeout(function(){window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3));break;default:e(".awdr-error-red").show(),l(wdr_data.localization_data.error,"error",t),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=settings")},1e3)}}})}),e("#awdr_advanced_configuration_form").submit(function(d){d.preventDefault();let a=e(this).serialize(),o=e(".woo_discount_loader");e.ajax({data:a,type:"post",url:ajaxurl,beforeSend:function(){o.show()},complete:function(){o.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(t){"passed"==t.data.security_pass?(e(".awdr-save-green").show(),setTimeout(function(){e(".awdr-save-green").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=advanced_section")},2e3)):"fails"==t.data.security_pass&&(e(".awdr-error-red").show(),setTimeout(function(){e(".awdr-error-red").fadeOut(500),window.location.replace(wdr_data.admin_url+"&tab=advanced_section")},2e3))}})}),e(document).on("click",".bulk-table-customized-setting",function(){e("input[name=customizer_save_alert]").val("1"),e(".save-configuration-submit").click()}),e("#sort_customizable_table").dragtable({persistState:function(t){t.el.find("th").each(function(d){""!=this.id&&(t.sortOrder[this.id]=d,"customize-bulk-table-title"==this.id?e(".customize_bulk_table_title").val(d):"customize-bulk-table-discount"==this.id?e(".customize_bulk_table_discount").val(d):"customize-bulk-table-range"==this.id&&e(".customize_bulk_table_range").val(d))})}}),e("#wdr-bulk-action-top").submit(function(d){if(d.preventDefault(),!(e('input[name="saved_rules[]"]:checked').length>0))return!1;{let t,d=e("#bulk-action-selector-top").val();if("enable"==d)t=confirm("Are you sure to enable the selected rules?");else if("disable"==d)t=confirm("Are you sure to disable the selected rules?");else{if("delete"!=d)return!1;t=confirm("Are you sure to delete the selected rules?")}if(0==t)return!1}let a=e(".woo_discount_loader");e.ajax({data:e(this).serialize(),type:"post",url:ajaxurl,beforeSend:function(){a.show()},complete:function(){a.hide()},error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(e){"disabled"==e.disable?l(wdr_data.localization_data.disabled_rule,"success",t):"enabled"==e.enable?l(wdr_data.localization_data.enabled_rule,"success",t):"deleted"==e.delete?l(wdr_data.localization_data.deleted_rule,"success",t):l(wdr_data.localization_data.error,"error",t),window.location.replace(wdr_data.admin_url)}})}),e("#wdr-search-top").submit(function(t){t.preventDefault();var d=e(this).serializeArray(),a=d[0].value+"&name="+d[1].value;window.location.replace(a)}),e(document).on("keypress keyup blur",".float_only_field",function(t){e(this).val(e(this).val().replace(/[^0-9\.]/g,"")),46===t.which&&-1===e(this).val().indexOf(".")||!(t.which<48||t.which>57)||t.preventDefault()}),e(document).on("keypress keyup blur",".number_only_field",function(e){(e.which<48||e.which>57)&&e.preventDefault()}),e('[data-class="start_dateonly"]').datetimepicker({timepicker:!1,format:"Y-m-d",onShow:function(t){this.setOptions({maxDate:!!e('[data-class="end_dateonly"]').val()&&e('[data-class="end_dateonly"]').val()})}}),e('[data-class="end_dateonly"]').datetimepicker({timepicker:!1,format:"Y-m-d",onShow:function(t){this.setOptions({minDate:!!e('[data-class="start_dateonly"]').val()&&e('[data-class="start_dateonly"]').val()})}}),e('[data-class="start_datetimeonly"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(t){this.setOptions({maxDate:!!e('[data-class="end_datetimeonly"]').val()&&e('[data-class="end_datetimeonly"]').val()})}}),e('[data-class="end_datetimeonly"]').datetimepicker({timepicker:!0,format:"Y-m-d H:i",onShow:function(t){this.setOptions({minDate:!!e('[data-class="start_datetimeonly"]').val()&&e('[data-class="start_datetimeonly"]').val()})}}),e(".wdr_time_picker").datetimepicker({datepicker:!1,format:"H:i"}),e(document).on("change",".wdr-bulk-type",function(){"product_selected_categories"==e(this).val()?e(".wdr-bulk-cat-selector").show():e(".wdr-bulk-cat-selector").hide()}),e(".settings_option_show_hide").click(function(){var t=e(this).data("name");"1"==e(this).val()?(e("."+t).show(),"hide_table_position"==t&&e(".wdr-popup-link").show()):(e("."+t).hide(),"hide_table_position"==t&&e(".wdr-popup-link").hide())}),e(".bulk_table_customizer_preview").click(function(){var t=e(this).data("colname");"show"==e(this).data("showhide")?e("."+t).show():e("."+t).hide()}),e(".settings_option_show_hide_on_change").change(function(){"disabled"==e(this).val()?e(".display_you_saved_text").hide():e(".display_you_saved_text").show()}),e(document).on("change",".wdr-rules-select",function(){var t=e(".wdr-rules-select"),d=e(this).val();"off"==d?(t.val("on"),e(".wdr-rules-selector").prop("checked",!0)):"on"==d&&(t.val("off"),e(".wdr-rules-selector").prop("checked",!1))}),e(document).on("change",".wdr-rules-selector",function(){var t=e(".wdr-rules-select"),d=e(".wdr-ruleboard input:checkbox").length,a=e(".wdr-ruleboard input:checkbox:checked").length;d==a?(t.val("on"),t.prop("checked",!0)):d!=a&&(t.val("off"),t.prop("checked",!1))});document.getElementById("ruleHeader");var c=!1;function _(){e("#sortable").sortable({handle:".awdr-sortable-handle",delay:150,stop:function(t,d){var a=new Array;e("#sortable>tr").each(function(){a.push(e(this).attr("id"))}),u(a)}})}function u(d){e.ajax({data:{position:d,method:"update_priority_order",action:"wdr_ajax",awdr_nonce:e("input[name=awdr_rule_list_nonce]").val()},type:"post",url:ajaxurl,error:function(e,d){l(wdr_data.localization_data.error,"error",t)},success:function(e){!1===e?l(wdr_data.localization_data.error,"error",t):l(wdr_data.localization_data.save_priority,"success",t)}})}if((/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(c=!0),e(window).width()>1024?1==c?_():e("#sortable").sortable({delay:150,stop:function(t,d){var a=new Array;e("#sortable>tr").each(function(){a.push(e(this).attr("id"))}),u(a)}}):_(),e("#sortable").disableSelection(),e(document).on("click",".help-popup",function(){var t="#"+e(this).attr("data-id");e(t).dialog({modal:!0,closeText:""})}),e(document).on("click",".remove-clicked-discount-block",function(){var t=e(this).data("showblock"),d=e(this).data("removeval"),a=e(this).data("removeopt");e("."+t).hide(),e("."+d).removeAttr("value"),e("."+a).prop("selectedIndex",0),e("[data-dtype="+t+"]").show(),"wdr-bulk-discount"==t&&(e(".bulk_product_category_selector option:selected").remove(),e(".wdr-bulk-cat-selector").hide())}),e(".wdr-btn-add-message").click(function(){wdr_buildrule.show_hide_rule_block({showBlockId:".wdr-advanced-layout-block",hideBlockId:".wdr-discount-template, .wdr-filter-block",thisObject:this})}),e(".bulk-min").length>=2){var p=e(".bulk_discount_min").val(),f=e(".bulk_discount_max").val(),w=e(".bulk_discount_value").val();(p||f||w)&&e(".adv-msg-min-qty, .adv-msg-max-qty").show()}if(e(".set-min").length>=2){p=e(".set_discount_min").val(),w=e(".set_discount_value").val();(p||w)&&(e(".adv-msg-min-qty").show(),e(".adv-msg-max-qty").hide())}function h(){e(".wdr-condition-group").each(function(t,d){let a=e(d).find(".wdr-product-condition-type").val();if(void 0!==a)switch(a){case"cart_item_product_onsale":e(this).remove()}})}e(".popup_table_discount_column_value").click(function(){1==e(this).val()?(e(".wdr_table_discounted_value").show(),e(".wdr_table_discounted_price").hide()):(e(".wdr_table_discounted_value").hide(),e(".wdr_table_discounted_price").show())}),e(".modal-trigger").click(function(t){t.preventDefault(),dataModal=e(this).attr("data-modal"),e("#"+dataModal).css({display:"block"})}),e(".close-modal, .modal-sandbox").click(function(){e(".modal").css({display:"none"})}),e("#badge_colorpicker").on("change",function(){e("#badge_hexcolor").val(this.value)}),e("#badge_hexcolor").on("change",function(){e("#badge_colorpicker").val(this.value)}),e("#text_colorpicker").on("change",function(){e("#text_hexcolor").val(this.value)}),e("#text_hexcolor").on("change",function(){e("#text_colorpicker").val(this.value)}),e("#awdr_shortcode_copy_btn").on("click",function(){var t,d;t="#awdr_shortcode_text",d=e("<input>"),e("body").append(d),d.val(e(t).text()).select(),document.execCommand("copy"),d.remove();var a=e(this);a.html(wdr_data.localization_data.copied),setTimeout(function(){a.html(wdr_data.localization_data.copy_shortcode)},2e3)}),e(".tips, .help_tip, .woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),e(".awdr_popup_col_name_text_box").keyup(function(){var t=e(this).val(),d=e(this).data("keyup");e("."+d).html(t)}),e(".awdr_popup_col_name_text_box").blur(function(){var t=e(this).val(),d=e(this).data("keyup");e("."+d).html(t)}),e(".apply_product_and_cart_discount_to").change(function(){let t=e(this).data("subsequent");"all"==e(this).val()?e("."+t).show():e("."+t).hide()}),e(document).on("change",".awdr-bogo-discount-type",function(){let t=e(this).val(),d=e(this).attr("data-parent"),a=e(this).attr("data-siblings");switch(t){case"flat":e(this).parent("."+d).siblings("."+a).show(),e(this).parent("."+d).siblings("."+a).find(".wdr_desc_text").text(wdr_data.localization_data.buyx_getx_value);break;case"percentage":e(this).parent("."+d).siblings("."+a).show(),e(this).parent("."+d).siblings("."+a).find(".wdr_desc_text").text(wdr_data.localization_data.buyx_getx_percentage);break;case"free_product":default:e(this).parent("."+d).siblings("."+a).hide()}}),e(document).on("change",".awdr-bogo-recurcive",function(){let t=e(this).attr("data-recursive-row"),d=e(this).attr("data-recursive-parent"),a=e(this).attr("data-hide-add-range"),o=e(this).attr("data-bogo-max-range"),i=e(this).attr("data-bogo-min-range"),r=e(this).attr("data-bogo-border"),s=e("."+t).length,n=e(this).attr("data-ranges-row-parent");if(0==e(this).prop("checked"))return e(this).parents("."+n).siblings("."+a).show(),""!=o&&(e(this).parents("."+d).siblings("."+o).show(),e(this).parents("."+d).siblings().find("."+o).show()),e(this).parents("."+d).siblings("."+i).find(".wdr_desc_text").text(wdr_data.localization_data.recursive_min_qty),void e("."+r).css("border-bottom","1px solid #ddd");if(s>3){confirm(wdr_data.localization_data.recursive_warning)?e(this).parents("."+t).siblings().remove():e(this).prop("checked",!1)}1==e(this).prop("checked")&&(e(this).parents("."+n).siblings("."+a).hide(),""!=o&&(e(this).parents("."+d).siblings("."+o).hide(),e(this).parents("."+d).siblings().find("."+o).hide()),e(this).parents("."+d).siblings("."+i).find(".wdr_desc_text").text(wdr_data.localization_data.recursive_qty),e("."+r).css("border-bottom","unset"))}),e(document).on("change",".awdr_mode_of_operator",function(){let t=e(this).val();"wdr_buy_x_get_y_discount"!=e(".awdr-product-discount-type").val()?"variation"==t?(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_variants_discount_description),e(".awdr-example").html(wdr_data.localization_data.mode_variation_cumulative_example)):"product"==t?(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_individual_product_discount_description),e(".awdr-example").html("")):(e(".awdr-discount-content").html(wdr_data.localization_data.bulk_filter_together_discount_description),e(".awdr-example").html("")):"variation"==t?(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_variants_discount_description_tool_tip),e(".awdr-example").html(wdr_data.localization_data.mode_variation_cumulative_example)):"product"==t?(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_individual_product_discount_description_tool_tip),e(".awdr-example").html("")):(e(".awdr-bxgy-dynamic-tip").attr("title",wdr_data.localization_data.bulk_filter_together_discount_description_tool_tip),e(".awdr-example").html(""))}),e(document).on("change",".awdr-product-discount-type",function(){e(".awdr-example").html("");var t=e(this).data("placement");let d=e(this).val();switch(d){case"wdr_simple_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_cart_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_free_shipping":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_bulk_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_set_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_buy_x_get_x_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide();break;case"wdr_buy_x_get_y_discount":e(".awdr_doc_"+d).show(),e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount").hide();break;default:case"not_selected":e(".awdr_doc_wdr_simple_discount,.awdr_doc_wdr_cart_discount,.awdr_doc_wdr_free_shipping,.awdr_doc_wdr_bulk_discount,.awdr_doc_wdr_set_discount,.awdr_doc_wdr_buy_x_get_x_discount,.awdr_doc_wdr_buy_x_get_y_discount").hide()}"not_selected"!=e(this).val()&&"wdr_free_shipping"!=e(this).val()?(wdr_buildrule.wdr_clone_field({addFilterMethod:"."+e(this).val(),ruleAppendTo:"."+t,addDiscountType:"enable"}),e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".calculate_cart_from option[value='from_filter']").show(),e(".adv-msg-discount, .adv-msg-discount-price").show(),e(".awdr-hidden-new-rule").fadeIn(500),e(".awdr-filter-section").fadeIn(500),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"),o(e("."+t).find('[data-field="autocomplete"]')),e(".awdr-discount-container").show(),e("."+t).find(".bulk_range_setter_group").addClass("bulk_range_setter").attr("id","bulk_adjustment_sortable"),e("."+t).find(".set_range_setter_group").addClass("set_range_setter").attr("id","bulk_adjustment_sortable"),e(window).width()>1024?1==c?e("#bulk_adjustment_sortable").sortable({handle:".awdr-sortable-handle"}):e("#bulk_adjustment_sortable").sortable():e("#bulk_adjustment_sortable").sortable({handle:".awdr-sortable-handle"}),e("#bulk_adjustment_sortable").disableSelection(),e(".awdr-filter-heading").html(wdr_data.localization_data.common_filter_heading),e(".awdr-filter-content").html(wdr_data.localization_data.common_filter_description),e(".awdr-discount-heading").html(wdr_data.localization_data.common_discount_heading),e(".awdr-discount-content").html(wdr_data.localization_data.common_discount_description),e(".awdr-rules-content").html(wdr_data.localization_data.common_rules_description),"wdr_buy_x_get_y_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_bxgy_discount_heading),o(e("."+t).find('[data-list="product_category"]')),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide()),"wdr_buy_x_get_x_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide()),"wdr_bulk_discount"==e(this).val()?(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_bulk_discount_heading),e(".awdr_mode_of_operator").trigger("change"),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").show()):"wdr_set_discount"==e(this).val()&&(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e(".awdr_mode_of_operator").trigger("change"),e(".awdr-discount-heading").html(wdr_data.localization_data.two_column_set_discount_heading),e(".adv-msg-min-qty, .adv-msg-discount, .adv-msg-discount-price").show(),e(".adv-msg-max-qty").hide())):"wdr_free_shipping"==e(this).val()?(e(".awdr-free-shipping-special-condition").removeClass("wdr-hide"),e(".awdr-hidden-new-rule").fadeIn(500),e(".awdr-filter-section").fadeOut(),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"),e("."+t).html(""),e(".awdr-discount-container").hide(),e(".adv-msg-min-qty, .adv-msg-max-qty, .adv-msg-discount, .adv-msg-discount-price").hide(),e(".calculate_cart_from option[value='from_filter']").hide()):(e(".awdr-free-shipping-special-condition").hasClass("wdr-hide")||e(".awdr-free-shipping-special-condition").addClass("wdr-hide"),h(),e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!0).addClass("wdr_save_btn_disabled"),e(".awdr-hidden-new-rule").fadeOut(500)),e(this).trigger("advanced_woo_discount_rules_on_change_adjustment_type",[e(this).val()])}),e(".awdr-product-discount-type").trigger("change"),"view"==wdr_data.rule_id?e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!1).removeClass("wdr_save_btn_disabled"):e("button.wdr_save_stay, button.wdr_save_close").attr("disabled",!0).addClass("wdr_save_btn_disabled"),e(document).on("change",".apply_fee_coupon_checkbox",function(){1==e(this).prop("checked")?e(this).parents(".awdr_rtl_compatible").siblings(".apply_fee_coupon_label").show():e(this).parents(".awdr_rtl_compatible").siblings(".apply_fee_coupon_label").hide()}),e(document).on("change",".bulk_table_customizer_show_hide_column",function(){var t=e(this).data("colname");1==e(this).prop("checked")?e("."+t).show():e("."+t).hide()});var b,m=document.getElementsByClassName("awdr-accordion");for(b=0;b<m.length;b++)m[b].addEventListener("click",function(t){t.preventDefault(),this.classList.toggle("awdr-accordion-active");var d=this.nextElementSibling;"block"===d.style.display?e(d).slideUp(1e3):e(d).slideDown(1e3)});e(document).on("change",".on_sale_badge_condition",function(){"disabled"===e(this).val()?(e(".sale_badge_toggle").hide(),e(".sale_badge_customizer,.sale_badge_percentage_customizer").hide()):(e(".sale_badge_toggle").show(),1==e("#customize_on_sale_badge").prop("checked")?(e(".sale_badge_customizer").show(),e(".display_percentage_on_sale_badge_con").show()):(e(".sale_badge_customizer").hide(),e("#display_percentage_on_sale_badge").prop("checked",!1).trigger("change"),e(".display_percentage_on_sale_badge_con").hide()),1==e("#display_percentage_on_sale_badge").prop("checked")?e(".sale_badge_percentage_customizer").show():e(".sale_badge_percentage_customizer").hide())}),e(document).on("change","#customize_on_sale_badge",function(){1==e(this).prop("checked")?(e(".sale_badge_customizer").show(),e(".display_percentage_on_sale_badge_con").show()):(e(".sale_badge_customizer").hide(),e("#display_percentage_on_sale_badge").prop("checked",!1).trigger("change"),e(".display_percentage_on_sale_badge_con").hide())}),e(document).on("change","#display_percentage_on_sale_badge",function(){1==e(this).prop("checked")?e(".sale_badge_percentage_customizer").show():e(".sale_badge_percentage_customizer").hide()}),e(document).on("change","#badge_colorpicker",function(){let t=e(this).val();e(".awdr_admin_discount_bar").css("background-color",t)}),e(document).on("change","#badge_hexcolor",function(){let t=e(this).val();e(".awdr_admin_discount_bar").css("background-color",t)}),e(document).on("change","#text_colorpicker",function(){let t=e(this).val();e(".awdr_admin_discount_bar").css("color",t)}),e(document).on("change","#text_hexcolor",function(){let t=e(this).val();e(".awdr_admin_discount_bar").css("color",t)}),e(document).on("change","#awdr_discount_bar_content",function(){let t=e(this).val();e(".awdr_admin_discount_bar").html(t)}),e(document).on("click",".awdr-hidden-search",function(){let t=e(".awdr-hidden-name").val();e(".wdr-rule-search-key").val(t),e("#wdr-search-top").submit()}),e(document).on("change","#select_usage_limits",function(){let t=e("#select_usage_limits").val();if(""==t)e(".awdr-rule-limit-disabled-outer .rule_limit_msg_outer").hide(),e(".awdr-rule-limit-disabled").hide();else{var d=e(".awdr-used-limit-total").html();t<=parseInt(d)?(e(".awdr-rule-limit-disabled").hide(),e(".awdr-rule-limit-disabled-outer").show(),e(".awdr-rule-limit-disabled-outer .rule_limit_msg_outer").html(wdr_data.localization_data.invalid_rule_limit)):(e(".awdr-rule-limit-disabled").hide(),e(".awdr-rule-limit-disabled-outer").hide())}}),e("#awdr-import-csv").on("submit",function(){return!!new RegExp("([a-zA-Z0-9s_\\.-:])+(.csv)$").test(e("#awdr-file-uploader").val().toLowerCase())||(e("#awdr-upload-response").html(wdr_data.localization_data.invalid_file_type),!1)}),e(document).on("change",".get_awdr_state_based_country",function(){let t=e(this).val();if(!t||""==t||0==t.length)return!1;let d=e(this).parents(".wdr-conditions-container").attr("data-index"),a=e(this).parents(".wdr_shipping_state_group"),o=e(this).parent().siblings(".wdr-shipping-state-value"),i=e(".woo_discount_loader");var r={action:"wdr_ajax",method:"get_state_details",selected_country:t,selected_state:e(this).parent().siblings(".wdr-shipping-state-value").find(".get_awdr_shipping_state").val(),selected_index:d,awdr_nonce:e("input[name=wdr_ajax_select2]").val()||""};e.ajax({url:ajaxurl,data:r,type:"POST",beforeSend:function(){i.show()},complete:function(){i.hide()},success:function(t){o.remove(),a.append("<div class='wdr-shipping-state-value wdr-select-filed-hight wdr-search-box' style='width: min-content;'>"+t.data+"<span class='wdr_select2_desc_text'>"+wdr_data.localization_data.select_state+"</span> </div>"),e(".append-preloaded-values").selectWoo()},error:function(e){console.log("error")}})}),e(".get_awdr_state_based_country").trigger("change"),e(document).on("change",".wdr_copon_type",function(){var t=e(this).val();"custom_coupon"===t?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-one, .wdr-cart-coupon-url-all").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom").css("display","block")):"at_least_one"===t?(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom, .wdr-cart-coupon-url-all").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-one").css("display","block")):"all"===t&&(e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom, .wdr-cart-coupon-url-one").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-all").css("display","block"))}),e(document).on("click",".wdr-copy-coupon-url",function(d){d.preventDefault(),e(this).parents(".wdr-coupon-url-group").find("input[type=url]").select(),document.execCommand("copy")?(e(this).html(wdr_data.localization_data.coupon_url_copied),l(wdr_data.localization_data.coupon_url_success,"success",t)):l(wdr_data.localization_data.error,"error",t)}),e(document).on("change",".wdr-cart-coupon-url-enable",function(t){t.preventDefault(),e(this).closest(".wdr-cart-coupon-url").find(".wdr-cart-coupon-url-lists").slideToggle()}),e(document).on("change keyup",".wdr-cart-coupon-value input",function(){var t=wdr_data.home_url,d=e(this).val();""!==d?($group='<span class="wdr-coupon-url-group"><label>',$group+=' <input type="url" value="'+t+"?wdr_coupon="+encodeURIComponent(d)+'"></label>',$group+='<button class="wdr-copy-coupon-url">'+wdr_data.localization_data.coupon_url_copy+"</button></span>",e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom").html($group),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom").css("display","block")):e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-custom").css("display","none")}),e(document).on("change",".wdr-cart-coupon-search select, select.wdr_copon_type",function(){var t=wdr_data.home_url,d=e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-search select").val(),a=e(this).parents(".wdr_cart_coupon_group").find("select.wdr_copon_type").val();if(0!==d.length){if("at_least_one"===a)$groups="",d.forEach(function(e){$groups+='<span class="wdr-coupon-url-group"><label>',$groups+=' <input type="url" value="'+t+"?wdr_coupon="+encodeURIComponent(e)+'"></label>',$groups+='<button class="wdr-copy-coupon-url">'+wdr_data.localization_data.coupon_url_copy+"</button></span><br>"}),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-one").html($groups),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-one").css("display","block");else if("all"===a){var o="";t+="?wdr_coupon=",d.forEach(function(e){o+=e+", ",t+=encodeURIComponent(e)+","}),o=o.replace(/(^, )|(, $)/g,""),t=t.replace(/(^,)|(,$)/g,""),$group='<span class="wdr-coupon-url-group"><label>',$group+=' <input type="url" value="'+t+'"></label>',$group+='<button class="wdr-copy-coupon-url">'+wdr_data.localization_data.coupon_url_copy+"</button></span>",e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-all").html($group),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-all").css("display","block")}}else e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-one").css("display","none"),e(this).parents(".wdr_cart_coupon_group").find(".wdr-cart-coupon-url-all").css("display","none")})});
woo-discount-rules.php CHANGED
@@ -5,13 +5,13 @@
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart
7
  * Author URI: https://www.flycart.org
8
- * Version: 2.3.12
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
- * WC tested up to: 6.1
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
@@ -21,7 +21,7 @@ if (!defined('ABSPATH')) {
21
  * Current version of our app
22
  */
23
  if (!defined('WDR_VERSION')) {
24
- define('WDR_VERSION', '2.3.12');
25
  }
26
 
27
  global $awdr_load_version;
5
  * Description: Simple to complex discount rules for your WooCommerce store. Core package.
6
  * Author: Flycart
7
  * Author URI: https://www.flycart.org
8
+ * Version: 2.3.13
9
  * Slug: woo-discount-rules
10
  * Text Domain: woo-discount-rules
11
  * Domain Path: /i18n/languages/
12
  * Requires at least: 4.6.1
13
  * WC requires at least: 3.0
14
+ * WC tested up to: 6.2
15
  */
16
  if (!defined('ABSPATH')) {
17
  exit;
21
  * Current version of our app
22
  */
23
  if (!defined('WDR_VERSION')) {
24
+ define('WDR_VERSION', '2.3.13');
25
  }
26
 
27
  global $awdr_load_version;