WPC Smart Wishlist for WooCommerce - Version 4.4.4

Version Description

  • Added: Function 'get_settings' & 'get_setting'
Download this release

Release Info

Developer wpclever
Plugin Icon 128x128 WPC Smart Wishlist for WooCommerce
Version 4.4.4
Comparing to
See all releases

Code changes from version 4.4.3 to 4.4.4

Files changed (3) hide show
  1. languages/woo-smart-wishlist.pot +257 -257
  2. readme.txt +4 -1
  3. wpc-smart-wishlist.php +187 -244
languages/woo-smart-wishlist.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the WPC Smart Wishlist for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPC Smart Wishlist for WooCommerce 4.4.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-smart-wishlist\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-11-02T23:23:04+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woo-smart-wishlist\n"
@@ -34,739 +34,739 @@ msgstr ""
34
  msgid "https://wpclever.net"
35
  msgstr ""
36
 
37
- #: wpc-smart-wishlist.php:311
38
- #: wpc-smart-wishlist.php:369
39
- #: wpc-smart-wishlist.php:416
40
- #: wpc-smart-wishlist.php:1574
41
  msgid "Please log in to use the Wishlist!"
42
  msgstr ""
43
 
44
- #: wpc-smart-wishlist.php:312
45
- #: wpc-smart-wishlist.php:391
46
- #: wpc-smart-wishlist.php:434
47
- #: wpc-smart-wishlist.php:453
48
- #: wpc-smart-wishlist.php:1547
49
- #: wpc-smart-wishlist.php:1833
50
  msgid "There are no products on the Wishlist!"
51
  msgstr ""
52
 
53
- #: wpc-smart-wishlist.php:331
54
- #: wpc-smart-wishlist.php:1502
55
  msgid "{name} has been added to Wishlist."
56
  msgstr ""
57
 
58
- #: wpc-smart-wishlist.php:333
59
- #: wpc-smart-wishlist.php:1511
60
  msgid "{name} is already in the Wishlist."
61
  msgstr ""
62
 
63
- #: wpc-smart-wishlist.php:351
64
- #: wpc-smart-wishlist.php:399
65
- #: wpc-smart-wishlist.php:1592
66
  msgid "Have an error, please try again!"
67
  msgstr ""
68
 
69
- #: wpc-smart-wishlist.php:383
70
- #: wpc-smart-wishlist.php:1520
71
  msgid "Product has been removed from the Wishlist."
72
  msgstr ""
73
 
74
- #: wpc-smart-wishlist.php:394
75
- #: wpc-smart-wishlist.php:1565
76
  msgid "The product does not exist on the Wishlist!"
77
  msgstr ""
78
 
79
- #: wpc-smart-wishlist.php:433
80
- #: wpc-smart-wishlist.php:1538
81
  msgid "All products have been removed from the Wishlist!"
82
  msgstr ""
83
 
84
- #: wpc-smart-wishlist.php:452
85
- #: wpc-smart-wishlist.php:481
86
  msgid "Please log in to use Wishlist!"
87
  msgstr ""
88
 
89
- #: wpc-smart-wishlist.php:521
90
- #: wpc-smart-wishlist.php:1381
91
- #: wpc-smart-wishlist.php:1386
92
  msgid "Add note"
93
  msgstr ""
94
 
95
- #: wpc-smart-wishlist.php:674
96
- #: wpc-smart-wishlist.php:1359
97
- #: wpc-smart-wishlist.php:1676
98
  msgid "Browse wishlist"
99
  msgstr ""
100
 
101
- #: wpc-smart-wishlist.php:677
102
- #: wpc-smart-wishlist.php:1350
103
- #: wpc-smart-wishlist.php:1675
104
  msgid "Add to wishlist"
105
  msgstr ""
106
 
107
- #: wpc-smart-wishlist.php:727
108
- #: wpc-smart-wishlist.php:1258
109
  msgid "Facebook"
110
  msgstr ""
111
 
112
- #: wpc-smart-wishlist.php:728
113
- #: wpc-smart-wishlist.php:1261
114
  msgid "Twitter"
115
  msgstr ""
116
 
117
- #: wpc-smart-wishlist.php:729
118
- #: wpc-smart-wishlist.php:1264
119
  msgid "Pinterest"
120
  msgstr ""
121
 
122
- #: wpc-smart-wishlist.php:730
123
- #: wpc-smart-wishlist.php:1267
124
  msgid "Mail"
125
  msgstr ""
126
 
127
- #: wpc-smart-wishlist.php:740
128
  msgid "Share on:"
129
  msgstr ""
130
 
131
- #: wpc-smart-wishlist.php:751
132
  msgid "Wishlist link:"
133
  msgstr ""
134
 
135
- #: wpc-smart-wishlist.php:753
136
  msgid "Copy"
137
  msgstr ""
138
 
139
- #: wpc-smart-wishlist.php:818
140
  msgid "Thank you for using our plugin! If you are satisfied, please reward it a full five-star %s rating."
141
  msgstr ""
142
 
143
- #: wpc-smart-wishlist.php:821
144
  msgid "Reviews"
145
  msgstr ""
146
 
147
- #: wpc-smart-wishlist.php:823
148
  msgid "Changelog"
149
  msgstr ""
150
 
151
- #: wpc-smart-wishlist.php:825
152
  msgid "Discussion"
153
  msgstr ""
154
 
155
- #: wpc-smart-wishlist.php:830
156
  msgid "Settings updated."
157
  msgstr ""
158
 
159
- #: wpc-smart-wishlist.php:837
160
- #: wpc-smart-wishlist.php:1705
161
  msgid "Settings"
162
  msgstr ""
163
 
164
- #: wpc-smart-wishlist.php:841
165
- #: wpc-smart-wishlist.php:1339
166
  msgid "Localization"
167
  msgstr ""
168
 
169
- #: wpc-smart-wishlist.php:846
170
- #: wpc-smart-wishlist.php:1706
171
  msgid "Premium Version"
172
  msgstr ""
173
 
174
- #: wpc-smart-wishlist.php:849
175
  msgid "Essential Kit"
176
  msgstr ""
177
 
178
- #: wpc-smart-wishlist.php:885
179
  msgid "General"
180
  msgstr ""
181
 
182
- #: wpc-smart-wishlist.php:889
183
  msgid "Disable the wishlist for unauthenticated users"
184
  msgstr ""
185
 
186
- #: wpc-smart-wishlist.php:892
187
- #: wpc-smart-wishlist.php:901
188
- #: wpc-smart-wishlist.php:921
189
- #: wpc-smart-wishlist.php:1144
190
- #: wpc-smart-wishlist.php:1177
191
- #: wpc-smart-wishlist.php:1192
192
- #: wpc-smart-wishlist.php:1231
193
- #: wpc-smart-wishlist.php:1241
194
- #: wpc-smart-wishlist.php:1276
195
- #: wpc-smart-wishlist.php:1286
196
  msgid "Yes"
197
  msgstr ""
198
 
199
- #: wpc-smart-wishlist.php:893
200
- #: wpc-smart-wishlist.php:902
201
- #: wpc-smart-wishlist.php:922
202
- #: wpc-smart-wishlist.php:958
203
- #: wpc-smart-wishlist.php:1145
204
- #: wpc-smart-wishlist.php:1166
205
- #: wpc-smart-wishlist.php:1178
206
- #: wpc-smart-wishlist.php:1193
207
- #: wpc-smart-wishlist.php:1232
208
- #: wpc-smart-wishlist.php:1242
209
- #: wpc-smart-wishlist.php:1277
210
- #: wpc-smart-wishlist.php:1287
211
  msgid "No"
212
  msgstr ""
213
 
214
- #: wpc-smart-wishlist.php:898
215
  msgid "Auto remove"
216
  msgstr ""
217
 
218
- #: wpc-smart-wishlist.php:904
219
  msgid "Auto remove product from the wishlist after adding to the cart."
220
  msgstr ""
221
 
222
- #: wpc-smart-wishlist.php:909
223
- #: wpc-smart-wishlist.php:1426
224
  msgid "Multiple Wishlist"
225
  msgstr ""
226
 
227
- #: wpc-smart-wishlist.php:918
228
  msgid "Enable"
229
  msgstr ""
230
 
231
- #: wpc-smart-wishlist.php:924
232
  msgid "Enable/disable multiple wishlist."
233
  msgstr ""
234
 
235
- #: wpc-smart-wishlist.php:928
236
  msgid "Maximum wishlists per user"
237
  msgstr ""
238
 
239
- #: wpc-smart-wishlist.php:936
240
- #: wpc-smart-wishlist.php:946
241
  msgid "Button"
242
  msgstr ""
243
 
244
- #: wpc-smart-wishlist.php:939
245
  msgid "Settings for \"Add to wishlist\" button."
246
  msgstr ""
247
 
248
- #: wpc-smart-wishlist.php:943
249
  msgid "Type"
250
  msgstr ""
251
 
252
- #: wpc-smart-wishlist.php:947
253
  msgid "Link"
254
  msgstr ""
255
 
256
- #: wpc-smart-wishlist.php:952
257
- #: wpc-smart-wishlist.php:1238
258
  msgid "Use icon"
259
  msgstr ""
260
 
261
- #: wpc-smart-wishlist.php:955
262
  msgid "Icon on the left"
263
  msgstr ""
264
 
265
- #: wpc-smart-wishlist.php:956
266
  msgid "Icon on the right"
267
  msgstr ""
268
 
269
- #: wpc-smart-wishlist.php:957
270
  msgid "Icon only"
271
  msgstr ""
272
 
273
- #: wpc-smart-wishlist.php:963
274
  msgid "Normal icon"
275
  msgstr ""
276
 
277
- #: wpc-smart-wishlist.php:973
278
  msgid "Added icon"
279
  msgstr ""
280
 
281
- #: wpc-smart-wishlist.php:983
282
  msgid "Loading icon"
283
  msgstr ""
284
 
285
- #: wpc-smart-wishlist.php:993
286
- #: wpc-smart-wishlist.php:1318
287
  msgid "Action"
288
  msgstr ""
289
 
290
- #: wpc-smart-wishlist.php:996
291
  msgid "Show message"
292
  msgstr ""
293
 
294
- #: wpc-smart-wishlist.php:997
295
- #: wpc-smart-wishlist.php:1020
296
- #: wpc-smart-wishlist.php:1322
297
  msgid "Open wishlist popup"
298
  msgstr ""
299
 
300
- #: wpc-smart-wishlist.php:998
301
  msgid "Add to wishlist solely"
302
  msgstr ""
303
 
304
- #: wpc-smart-wishlist.php:1000
305
  msgid "Action triggered by clicking on the wishlist button."
306
  msgstr ""
307
 
308
- #: wpc-smart-wishlist.php:1004
309
  msgid "Message position"
310
  msgstr ""
311
 
312
- #: wpc-smart-wishlist.php:1007
313
  msgid "right-top"
314
  msgstr ""
315
 
316
- #: wpc-smart-wishlist.php:1008
317
  msgid "right-bottom"
318
  msgstr ""
319
 
320
- #: wpc-smart-wishlist.php:1009
321
  msgid "center-top"
322
  msgstr ""
323
 
324
- #: wpc-smart-wishlist.php:1010
325
  msgid "center-bottom"
326
  msgstr ""
327
 
328
- #: wpc-smart-wishlist.php:1011
329
  msgid "left-top"
330
  msgstr ""
331
 
332
- #: wpc-smart-wishlist.php:1012
333
  msgid "left-bottom"
334
  msgstr ""
335
 
336
- #: wpc-smart-wishlist.php:1017
337
  msgid "Action (added)"
338
  msgstr ""
339
 
340
- #: wpc-smart-wishlist.php:1021
341
- #: wpc-smart-wishlist.php:1321
342
- #: wpc-smart-wishlist.php:1399
343
- #: wpc-smart-wishlist.php:1404
344
- #: wpc-smart-wishlist.php:1940
345
  msgid "Open wishlist page"
346
  msgstr ""
347
 
348
- #: wpc-smart-wishlist.php:1023
349
  msgid "Action triggered by clicking on the wishlist button after adding an item to the wishlist."
350
  msgstr ""
351
 
352
- #: wpc-smart-wishlist.php:1027
353
  msgid "Extra class (optional)"
354
  msgstr ""
355
 
356
- #: wpc-smart-wishlist.php:1031
357
  msgid "Add extra class for action button/link, split by one space."
358
  msgstr ""
359
 
360
- #: wpc-smart-wishlist.php:1035
361
  msgid "Position on archive page"
362
  msgstr ""
363
 
364
- #: wpc-smart-wishlist.php:1040
365
- #: wpc-smart-wishlist.php:1067
366
  msgid "Under title"
367
  msgstr ""
368
 
369
- #: wpc-smart-wishlist.php:1041
370
- #: wpc-smart-wishlist.php:1068
371
  msgid "Under rating"
372
  msgstr ""
373
 
374
- #: wpc-smart-wishlist.php:1042
375
  msgid "Under price"
376
  msgstr ""
377
 
378
- #: wpc-smart-wishlist.php:1043
379
- #: wpc-smart-wishlist.php:1070
380
  msgid "Above add to cart button"
381
  msgstr ""
382
 
383
- #: wpc-smart-wishlist.php:1044
384
- #: wpc-smart-wishlist.php:1071
385
  msgid "Under add to cart button"
386
  msgstr ""
387
 
388
- #: wpc-smart-wishlist.php:1045
389
- #: wpc-smart-wishlist.php:1074
390
  msgid "None (hide it)"
391
  msgstr ""
392
 
393
- #: wpc-smart-wishlist.php:1062
394
  msgid "Position on single page"
395
  msgstr ""
396
 
397
- #: wpc-smart-wishlist.php:1069
398
  msgid "Under excerpt"
399
  msgstr ""
400
 
401
- #: wpc-smart-wishlist.php:1072
402
  msgid "Under meta"
403
  msgstr ""
404
 
405
- #: wpc-smart-wishlist.php:1073
406
  msgid "Under sharing"
407
  msgstr ""
408
 
409
- #: wpc-smart-wishlist.php:1091
410
  msgid "Shortcode"
411
  msgstr ""
412
 
413
- #: wpc-smart-wishlist.php:1094
414
  msgid "You can add a button manually by using the shortcode %s, eg. %s for the product whose ID is 99."
415
  msgstr ""
416
 
417
- #: wpc-smart-wishlist.php:1099
418
  msgid "Categories"
419
  msgstr ""
420
 
421
- #: wpc-smart-wishlist.php:1114
422
  msgid "All categories"
423
  msgstr ""
424
 
425
- #: wpc-smart-wishlist.php:1119
426
  msgid "Only show the wishlist button for products in selected categories."
427
  msgstr ""
428
 
429
- #: wpc-smart-wishlist.php:1124
430
  msgid "Popup"
431
  msgstr ""
432
 
433
- #: wpc-smart-wishlist.php:1127
434
  msgid "Settings for the wishlist popup."
435
  msgstr ""
436
 
437
- #: wpc-smart-wishlist.php:1131
438
  msgid "Position"
439
  msgstr ""
440
 
441
- #: wpc-smart-wishlist.php:1134
442
  msgid "Center"
443
  msgstr ""
444
 
445
- #: wpc-smart-wishlist.php:1135
446
  msgid "Right"
447
  msgstr ""
448
 
449
- #: wpc-smart-wishlist.php:1136
450
  msgid "Left"
451
  msgstr ""
452
 
453
- #: wpc-smart-wishlist.php:1141
454
  msgid "Use perfect-scrollbar"
455
  msgstr ""
456
 
457
- #: wpc-smart-wishlist.php:1147
458
  msgid "Read more about %s"
459
  msgstr ""
460
 
461
- #: wpc-smart-wishlist.php:1151
462
  msgid "Color"
463
  msgstr ""
464
 
465
- #: wpc-smart-wishlist.php:1156
466
  msgid "Choose the color, default %s"
467
  msgstr ""
468
 
469
- #: wpc-smart-wishlist.php:1160
470
  msgid "Link to individual product"
471
  msgstr ""
472
 
473
- #: wpc-smart-wishlist.php:1163
474
  msgid "Yes, open in the same tab"
475
  msgstr ""
476
 
477
- #: wpc-smart-wishlist.php:1164
478
  msgid "Yes, open in the new tab"
479
  msgstr ""
480
 
481
- #: wpc-smart-wishlist.php:1165
482
  msgid "Yes, open quick view popup"
483
  msgstr ""
484
 
485
- #: wpc-smart-wishlist.php:1174
486
  msgid "Show note"
487
  msgstr ""
488
 
489
- #: wpc-smart-wishlist.php:1180
490
  msgid "Show note on each product for all visitors. Only wishlist owner can add/edit these notes."
491
  msgstr ""
492
 
493
- #: wpc-smart-wishlist.php:1189
494
- #: wpc-smart-wishlist.php:1372
495
  msgid "Empty wishlist button"
496
  msgstr ""
497
 
498
- #: wpc-smart-wishlist.php:1195
499
  msgid "Show empty wishlist button on the popup?"
500
  msgstr ""
501
 
502
- #: wpc-smart-wishlist.php:1199
503
  msgid "Continue shopping link"
504
  msgstr ""
505
 
506
- #: wpc-smart-wishlist.php:1204
507
  msgid "By default, the wishlist popup will only be closed when customers click on the \"Continue Shopping\" button."
508
  msgstr ""
509
 
510
- #: wpc-smart-wishlist.php:1209
511
  msgid "Page"
512
  msgstr ""
513
 
514
- #: wpc-smart-wishlist.php:1212
515
  msgid "Settings for wishlist page."
516
  msgstr ""
517
 
518
- #: wpc-smart-wishlist.php:1216
519
  msgid "Wishlist page"
520
  msgstr ""
521
 
522
- #: wpc-smart-wishlist.php:1221
523
  msgid "Choose a page"
524
  msgstr ""
525
 
526
- #: wpc-smart-wishlist.php:1224
527
  msgid "Add shortcode %s to display the wishlist on a page."
528
  msgstr ""
529
 
530
- #: wpc-smart-wishlist.php:1228
531
  msgid "Share buttons"
532
  msgstr ""
533
 
534
- #: wpc-smart-wishlist.php:1234
535
  msgid "Enable share buttons on the wishlist page?"
536
  msgstr ""
537
 
538
- #: wpc-smart-wishlist.php:1247
539
  msgid "Social links"
540
  msgstr ""
541
 
542
- #: wpc-smart-wishlist.php:1273
543
  msgid "Copy link"
544
  msgstr ""
545
 
546
- #: wpc-smart-wishlist.php:1279
547
  msgid "Enable copy wishlist link to share?"
548
  msgstr ""
549
 
550
- #: wpc-smart-wishlist.php:1283
551
  msgid "Add Wishlist page to My Account"
552
  msgstr ""
553
 
554
- #: wpc-smart-wishlist.php:1293
555
  msgid "Menu"
556
  msgstr ""
557
 
558
- #: wpc-smart-wishlist.php:1296
559
  msgid "Settings for the wishlist menu item."
560
  msgstr ""
561
 
562
- #: wpc-smart-wishlist.php:1300
563
  msgid "Menu(s)"
564
  msgstr ""
565
 
566
- #: wpc-smart-wishlist.php:1314
567
  msgid "Choose the menu(s) you want to add the \"wishlist menu\" at the end."
568
  msgstr ""
569
 
570
- #: wpc-smart-wishlist.php:1324
571
  msgid "Action when clicking on the \"wishlist menu\"."
572
  msgstr ""
573
 
574
- #: wpc-smart-wishlist.php:1341
575
  msgid "Leave blank to use the default text and its equivalent translation in multiple languages."
576
  msgstr ""
577
 
578
- #: wpc-smart-wishlist.php:1345
579
  msgid "Button text"
580
  msgstr ""
581
 
582
- #: wpc-smart-wishlist.php:1354
583
  msgid "Button text (added)"
584
  msgstr ""
585
 
586
- #: wpc-smart-wishlist.php:1363
587
  msgid "Wishlist popup heading"
588
  msgstr ""
589
 
590
- #: wpc-smart-wishlist.php:1368
591
- #: wpc-smart-wishlist.php:1422
592
- #: wpc-smart-wishlist.php:1435
593
- #: wpc-smart-wishlist.php:1624
594
- #: wpc-smart-wishlist.php:1674
595
- #: wpc-smart-wishlist.php:1888
596
- #: wpc-smart-wishlist.php:1910
597
- #: wpc-smart-wishlist.php:1984
598
- #: wpc-smart-wishlist.php:2185
599
- #: wpc-smart-wishlist.php:2266
600
- #: wpc-smart-wishlist.php:2273
601
- #: wpc-smart-wishlist.php:2493
602
  msgid "Wishlist"
603
  msgstr ""
604
 
605
- #: wpc-smart-wishlist.php:1377
606
- #: wpc-smart-wishlist.php:1923
607
  msgid "remove all"
608
  msgstr ""
609
 
610
- #: wpc-smart-wishlist.php:1390
611
  msgid "Save note"
612
  msgstr ""
613
 
614
- #: wpc-smart-wishlist.php:1395
615
  msgid "Save"
616
  msgstr ""
617
 
618
- #: wpc-smart-wishlist.php:1408
619
- #: wpc-smart-wishlist.php:1413
620
- #: wpc-smart-wishlist.php:1945
621
  msgid "Continue shopping"
622
  msgstr ""
623
 
624
- #: wpc-smart-wishlist.php:1417
625
  msgid "Menu item label"
626
  msgstr ""
627
 
628
- #: wpc-smart-wishlist.php:1430
629
  msgid "Primary wishlist name"
630
  msgstr ""
631
 
632
- #: wpc-smart-wishlist.php:1439
633
- #: wpc-smart-wishlist.php:1444
634
- #: wpc-smart-wishlist.php:1961
635
  msgid "Manage wishlists"
636
  msgstr ""
637
 
638
- #: wpc-smart-wishlist.php:1448
639
  msgid "Set default"
640
  msgstr ""
641
 
642
- #: wpc-smart-wishlist.php:1453
643
- #: wpc-smart-wishlist.php:1998
644
  msgid "set default"
645
  msgstr ""
646
 
647
- #: wpc-smart-wishlist.php:1457
648
  msgid "Default"
649
  msgstr ""
650
 
651
- #: wpc-smart-wishlist.php:1462
652
- #: wpc-smart-wishlist.php:1996
653
  msgid "default"
654
  msgstr ""
655
 
656
- #: wpc-smart-wishlist.php:1466
657
  msgid "Delete"
658
  msgstr ""
659
 
660
- #: wpc-smart-wishlist.php:1471
661
- #: wpc-smart-wishlist.php:2004
662
  msgid "delete"
663
  msgstr ""
664
 
665
- #: wpc-smart-wishlist.php:1475
666
  msgid "Wishlist name placeholder"
667
  msgstr ""
668
 
669
- #: wpc-smart-wishlist.php:1480
670
- #: wpc-smart-wishlist.php:2015
671
  msgid "New Wishlist"
672
  msgstr ""
673
 
674
- #: wpc-smart-wishlist.php:1484
675
  msgid "Add new wishlist"
676
  msgstr ""
677
 
678
- #: wpc-smart-wishlist.php:1489
679
- #: wpc-smart-wishlist.php:2017
680
  msgid "Add New Wishlist"
681
  msgstr ""
682
 
683
- #: wpc-smart-wishlist.php:1493
684
  msgid "Message"
685
  msgstr ""
686
 
687
- #: wpc-smart-wishlist.php:1497
688
  msgid "Added to the wishlist"
689
  msgstr ""
690
 
691
- #: wpc-smart-wishlist.php:1506
692
  msgid "Already in the wishlist"
693
  msgstr ""
694
 
695
- #: wpc-smart-wishlist.php:1515
696
  msgid "Removed from wishlist"
697
  msgstr ""
698
 
699
- #: wpc-smart-wishlist.php:1524
700
  msgid "Empty wishlist confirm"
701
  msgstr ""
702
 
703
- #: wpc-smart-wishlist.php:1529
704
- #: wpc-smart-wishlist.php:1556
705
- #: wpc-smart-wishlist.php:1671
706
- #: wpc-smart-wishlist.php:1672
707
  msgid "This action cannot be undone. Are you sure?"
708
  msgstr ""
709
 
710
- #: wpc-smart-wishlist.php:1533
711
  msgid "Empty wishlist notice"
712
  msgstr ""
713
 
714
- #: wpc-smart-wishlist.php:1542
715
  msgid "Empty wishlist"
716
  msgstr ""
717
 
718
- #: wpc-smart-wishlist.php:1551
719
  msgid "Delete wishlist confirm"
720
  msgstr ""
721
 
722
- #: wpc-smart-wishlist.php:1560
723
  msgid "Product does not exist"
724
  msgstr ""
725
 
726
- #: wpc-smart-wishlist.php:1569
727
  msgid "Need to login"
728
  msgstr ""
729
 
730
- #: wpc-smart-wishlist.php:1578
731
  msgid "Copied wishlist link"
732
  msgstr ""
733
 
734
- #: wpc-smart-wishlist.php:1583
735
- #: wpc-smart-wishlist.php:1673
736
  msgid "Copied the wishlist link:"
737
  msgstr ""
738
 
739
- #: wpc-smart-wishlist.php:1587
740
  msgid "Have an error"
741
  msgstr ""
742
 
743
- #: wpc-smart-wishlist.php:1722
744
  msgid "Community support"
745
  msgstr ""
746
 
747
- #: wpc-smart-wishlist.php:2319
748
- #: wpc-smart-wishlist.php:2322
749
- #: wpc-smart-wishlist.php:2386
750
- #: wpc-smart-wishlist.php:2389
751
  msgid "%s product"
752
  msgid_plural "%s products"
753
  msgstr[0] ""
754
  msgstr[1] ""
755
 
756
- #: wpc-smart-wishlist.php:2321
757
- #: wpc-smart-wishlist.php:2388
758
  msgid "Guest"
759
  msgstr ""
760
 
761
- #: wpc-smart-wishlist.php:2336
762
- #: wpc-smart-wishlist.php:2365
763
  msgid "Edit"
764
  msgstr ""
765
 
766
- #: wpc-smart-wishlist.php:2336
767
  msgid "See in wishlist"
768
  msgstr ""
769
 
770
- #: wpc-smart-wishlist.php:2344
771
  msgid "Empty Wishlist"
772
  msgstr ""
2
  # This file is distributed under the same license as the WPC Smart Wishlist for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPC Smart Wishlist for WooCommerce 4.4.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-smart-wishlist\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-11-07T16:01:11+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woo-smart-wishlist\n"
34
  msgid "https://wpclever.net"
35
  msgstr ""
36
 
37
+ #: wpc-smart-wishlist.php:318
38
+ #: wpc-smart-wishlist.php:372
39
+ #: wpc-smart-wishlist.php:415
40
+ #: wpc-smart-wishlist.php:1521
41
  msgid "Please log in to use the Wishlist!"
42
  msgstr ""
43
 
44
+ #: wpc-smart-wishlist.php:319
45
+ #: wpc-smart-wishlist.php:390
46
+ #: wpc-smart-wishlist.php:429
47
+ #: wpc-smart-wishlist.php:448
48
+ #: wpc-smart-wishlist.php:1494
49
+ #: wpc-smart-wishlist.php:1780
50
  msgid "There are no products on the Wishlist!"
51
  msgstr ""
52
 
53
+ #: wpc-smart-wishlist.php:334
54
+ #: wpc-smart-wishlist.php:1449
55
  msgid "{name} has been added to Wishlist."
56
  msgstr ""
57
 
58
+ #: wpc-smart-wishlist.php:336
59
+ #: wpc-smart-wishlist.php:1458
60
  msgid "{name} is already in the Wishlist."
61
  msgstr ""
62
 
63
+ #: wpc-smart-wishlist.php:354
64
+ #: wpc-smart-wishlist.php:398
65
+ #: wpc-smart-wishlist.php:1539
66
  msgid "Have an error, please try again!"
67
  msgstr ""
68
 
69
+ #: wpc-smart-wishlist.php:382
70
+ #: wpc-smart-wishlist.php:1467
71
  msgid "Product has been removed from the Wishlist."
72
  msgstr ""
73
 
74
+ #: wpc-smart-wishlist.php:393
75
+ #: wpc-smart-wishlist.php:1512
76
  msgid "The product does not exist on the Wishlist!"
77
  msgstr ""
78
 
79
+ #: wpc-smart-wishlist.php:428
80
+ #: wpc-smart-wishlist.php:1485
81
  msgid "All products have been removed from the Wishlist!"
82
  msgstr ""
83
 
84
+ #: wpc-smart-wishlist.php:447
85
+ #: wpc-smart-wishlist.php:471
86
  msgid "Please log in to use Wishlist!"
87
  msgstr ""
88
 
89
+ #: wpc-smart-wishlist.php:506
90
+ #: wpc-smart-wishlist.php:1328
91
+ #: wpc-smart-wishlist.php:1333
92
  msgid "Add note"
93
  msgstr ""
94
 
95
+ #: wpc-smart-wishlist.php:654
96
+ #: wpc-smart-wishlist.php:1306
97
+ #: wpc-smart-wishlist.php:1623
98
  msgid "Browse wishlist"
99
  msgstr ""
100
 
101
+ #: wpc-smart-wishlist.php:657
102
+ #: wpc-smart-wishlist.php:1297
103
+ #: wpc-smart-wishlist.php:1622
104
  msgid "Add to wishlist"
105
  msgstr ""
106
 
107
+ #: wpc-smart-wishlist.php:707
108
+ #: wpc-smart-wishlist.php:1212
109
  msgid "Facebook"
110
  msgstr ""
111
 
112
+ #: wpc-smart-wishlist.php:708
113
+ #: wpc-smart-wishlist.php:1213
114
  msgid "Twitter"
115
  msgstr ""
116
 
117
+ #: wpc-smart-wishlist.php:709
118
+ #: wpc-smart-wishlist.php:1214
119
  msgid "Pinterest"
120
  msgstr ""
121
 
122
+ #: wpc-smart-wishlist.php:710
123
+ #: wpc-smart-wishlist.php:1215
124
  msgid "Mail"
125
  msgstr ""
126
 
127
+ #: wpc-smart-wishlist.php:720
128
  msgid "Share on:"
129
  msgstr ""
130
 
131
+ #: wpc-smart-wishlist.php:731
132
  msgid "Wishlist link:"
133
  msgstr ""
134
 
135
+ #: wpc-smart-wishlist.php:733
136
  msgid "Copy"
137
  msgstr ""
138
 
139
+ #: wpc-smart-wishlist.php:766
140
  msgid "Thank you for using our plugin! If you are satisfied, please reward it a full five-star %s rating."
141
  msgstr ""
142
 
143
+ #: wpc-smart-wishlist.php:769
144
  msgid "Reviews"
145
  msgstr ""
146
 
147
+ #: wpc-smart-wishlist.php:771
148
  msgid "Changelog"
149
  msgstr ""
150
 
151
+ #: wpc-smart-wishlist.php:773
152
  msgid "Discussion"
153
  msgstr ""
154
 
155
+ #: wpc-smart-wishlist.php:778
156
  msgid "Settings updated."
157
  msgstr ""
158
 
159
+ #: wpc-smart-wishlist.php:785
160
+ #: wpc-smart-wishlist.php:1652
161
  msgid "Settings"
162
  msgstr ""
163
 
164
+ #: wpc-smart-wishlist.php:789
165
+ #: wpc-smart-wishlist.php:1286
166
  msgid "Localization"
167
  msgstr ""
168
 
169
+ #: wpc-smart-wishlist.php:794
170
+ #: wpc-smart-wishlist.php:1653
171
  msgid "Premium Version"
172
  msgstr ""
173
 
174
+ #: wpc-smart-wishlist.php:797
175
  msgid "Essential Kit"
176
  msgstr ""
177
 
178
+ #: wpc-smart-wishlist.php:833
179
  msgid "General"
180
  msgstr ""
181
 
182
+ #: wpc-smart-wishlist.php:837
183
  msgid "Disable the wishlist for unauthenticated users"
184
  msgstr ""
185
 
186
+ #: wpc-smart-wishlist.php:840
187
+ #: wpc-smart-wishlist.php:849
188
+ #: wpc-smart-wishlist.php:869
189
+ #: wpc-smart-wishlist.php:1097
190
+ #: wpc-smart-wishlist.php:1131
191
+ #: wpc-smart-wishlist.php:1146
192
+ #: wpc-smart-wishlist.php:1185
193
+ #: wpc-smart-wishlist.php:1195
194
+ #: wpc-smart-wishlist.php:1223
195
+ #: wpc-smart-wishlist.php:1233
196
  msgid "Yes"
197
  msgstr ""
198
 
199
+ #: wpc-smart-wishlist.php:841
200
+ #: wpc-smart-wishlist.php:850
201
+ #: wpc-smart-wishlist.php:870
202
+ #: wpc-smart-wishlist.php:907
203
+ #: wpc-smart-wishlist.php:1098
204
+ #: wpc-smart-wishlist.php:1120
205
+ #: wpc-smart-wishlist.php:1132
206
+ #: wpc-smart-wishlist.php:1147
207
+ #: wpc-smart-wishlist.php:1186
208
+ #: wpc-smart-wishlist.php:1196
209
+ #: wpc-smart-wishlist.php:1224
210
+ #: wpc-smart-wishlist.php:1234
211
  msgid "No"
212
  msgstr ""
213
 
214
+ #: wpc-smart-wishlist.php:846
215
  msgid "Auto remove"
216
  msgstr ""
217
 
218
+ #: wpc-smart-wishlist.php:852
219
  msgid "Auto remove product from the wishlist after adding to the cart."
220
  msgstr ""
221
 
222
+ #: wpc-smart-wishlist.php:857
223
+ #: wpc-smart-wishlist.php:1373
224
  msgid "Multiple Wishlist"
225
  msgstr ""
226
 
227
+ #: wpc-smart-wishlist.php:866
228
  msgid "Enable"
229
  msgstr ""
230
 
231
+ #: wpc-smart-wishlist.php:872
232
  msgid "Enable/disable multiple wishlist."
233
  msgstr ""
234
 
235
+ #: wpc-smart-wishlist.php:876
236
  msgid "Maximum wishlists per user"
237
  msgstr ""
238
 
239
+ #: wpc-smart-wishlist.php:885
240
+ #: wpc-smart-wishlist.php:895
241
  msgid "Button"
242
  msgstr ""
243
 
244
+ #: wpc-smart-wishlist.php:888
245
  msgid "Settings for \"Add to wishlist\" button."
246
  msgstr ""
247
 
248
+ #: wpc-smart-wishlist.php:892
249
  msgid "Type"
250
  msgstr ""
251
 
252
+ #: wpc-smart-wishlist.php:896
253
  msgid "Link"
254
  msgstr ""
255
 
256
+ #: wpc-smart-wishlist.php:901
257
+ #: wpc-smart-wishlist.php:1192
258
  msgid "Use icon"
259
  msgstr ""
260
 
261
+ #: wpc-smart-wishlist.php:904
262
  msgid "Icon on the left"
263
  msgstr ""
264
 
265
+ #: wpc-smart-wishlist.php:905
266
  msgid "Icon on the right"
267
  msgstr ""
268
 
269
+ #: wpc-smart-wishlist.php:906
270
  msgid "Icon only"
271
  msgstr ""
272
 
273
+ #: wpc-smart-wishlist.php:912
274
  msgid "Normal icon"
275
  msgstr ""
276
 
277
+ #: wpc-smart-wishlist.php:923
278
  msgid "Added icon"
279
  msgstr ""
280
 
281
+ #: wpc-smart-wishlist.php:934
282
  msgid "Loading icon"
283
  msgstr ""
284
 
285
+ #: wpc-smart-wishlist.php:945
286
+ #: wpc-smart-wishlist.php:1265
287
  msgid "Action"
288
  msgstr ""
289
 
290
+ #: wpc-smart-wishlist.php:948
291
  msgid "Show message"
292
  msgstr ""
293
 
294
+ #: wpc-smart-wishlist.php:949
295
+ #: wpc-smart-wishlist.php:972
296
+ #: wpc-smart-wishlist.php:1269
297
  msgid "Open wishlist popup"
298
  msgstr ""
299
 
300
+ #: wpc-smart-wishlist.php:950
301
  msgid "Add to wishlist solely"
302
  msgstr ""
303
 
304
+ #: wpc-smart-wishlist.php:952
305
  msgid "Action triggered by clicking on the wishlist button."
306
  msgstr ""
307
 
308
+ #: wpc-smart-wishlist.php:956
309
  msgid "Message position"
310
  msgstr ""
311
 
312
+ #: wpc-smart-wishlist.php:959
313
  msgid "right-top"
314
  msgstr ""
315
 
316
+ #: wpc-smart-wishlist.php:960
317
  msgid "right-bottom"
318
  msgstr ""
319
 
320
+ #: wpc-smart-wishlist.php:961
321
  msgid "center-top"
322
  msgstr ""
323
 
324
+ #: wpc-smart-wishlist.php:962
325
  msgid "center-bottom"
326
  msgstr ""
327
 
328
+ #: wpc-smart-wishlist.php:963
329
  msgid "left-top"
330
  msgstr ""
331
 
332
+ #: wpc-smart-wishlist.php:964
333
  msgid "left-bottom"
334
  msgstr ""
335
 
336
+ #: wpc-smart-wishlist.php:969
337
  msgid "Action (added)"
338
  msgstr ""
339
 
340
+ #: wpc-smart-wishlist.php:973
341
+ #: wpc-smart-wishlist.php:1268
342
+ #: wpc-smart-wishlist.php:1346
343
+ #: wpc-smart-wishlist.php:1351
344
+ #: wpc-smart-wishlist.php:1875
345
  msgid "Open wishlist page"
346
  msgstr ""
347
 
348
+ #: wpc-smart-wishlist.php:975
349
  msgid "Action triggered by clicking on the wishlist button after adding an item to the wishlist."
350
  msgstr ""
351
 
352
+ #: wpc-smart-wishlist.php:979
353
  msgid "Extra class (optional)"
354
  msgstr ""
355
 
356
+ #: wpc-smart-wishlist.php:984
357
  msgid "Add extra class for action button/link, split by one space."
358
  msgstr ""
359
 
360
+ #: wpc-smart-wishlist.php:988
361
  msgid "Position on archive page"
362
  msgstr ""
363
 
364
+ #: wpc-smart-wishlist.php:993
365
+ #: wpc-smart-wishlist.php:1020
366
  msgid "Under title"
367
  msgstr ""
368
 
369
+ #: wpc-smart-wishlist.php:994
370
+ #: wpc-smart-wishlist.php:1021
371
  msgid "Under rating"
372
  msgstr ""
373
 
374
+ #: wpc-smart-wishlist.php:995
375
  msgid "Under price"
376
  msgstr ""
377
 
378
+ #: wpc-smart-wishlist.php:996
379
+ #: wpc-smart-wishlist.php:1023
380
  msgid "Above add to cart button"
381
  msgstr ""
382
 
383
+ #: wpc-smart-wishlist.php:997
384
+ #: wpc-smart-wishlist.php:1024
385
  msgid "Under add to cart button"
386
  msgstr ""
387
 
388
+ #: wpc-smart-wishlist.php:998
389
+ #: wpc-smart-wishlist.php:1027
390
  msgid "None (hide it)"
391
  msgstr ""
392
 
393
+ #: wpc-smart-wishlist.php:1015
394
  msgid "Position on single page"
395
  msgstr ""
396
 
397
+ #: wpc-smart-wishlist.php:1022
398
  msgid "Under excerpt"
399
  msgstr ""
400
 
401
+ #: wpc-smart-wishlist.php:1025
402
  msgid "Under meta"
403
  msgstr ""
404
 
405
+ #: wpc-smart-wishlist.php:1026
406
  msgid "Under sharing"
407
  msgstr ""
408
 
409
+ #: wpc-smart-wishlist.php:1044
410
  msgid "Shortcode"
411
  msgstr ""
412
 
413
+ #: wpc-smart-wishlist.php:1047
414
  msgid "You can add a button manually by using the shortcode %s, eg. %s for the product whose ID is 99."
415
  msgstr ""
416
 
417
+ #: wpc-smart-wishlist.php:1052
418
  msgid "Categories"
419
  msgstr ""
420
 
421
+ #: wpc-smart-wishlist.php:1067
422
  msgid "All categories"
423
  msgstr ""
424
 
425
+ #: wpc-smart-wishlist.php:1072
426
  msgid "Only show the wishlist button for products in selected categories."
427
  msgstr ""
428
 
429
+ #: wpc-smart-wishlist.php:1077
430
  msgid "Popup"
431
  msgstr ""
432
 
433
+ #: wpc-smart-wishlist.php:1080
434
  msgid "Settings for the wishlist popup."
435
  msgstr ""
436
 
437
+ #: wpc-smart-wishlist.php:1084
438
  msgid "Position"
439
  msgstr ""
440
 
441
+ #: wpc-smart-wishlist.php:1087
442
  msgid "Center"
443
  msgstr ""
444
 
445
+ #: wpc-smart-wishlist.php:1088
446
  msgid "Right"
447
  msgstr ""
448
 
449
+ #: wpc-smart-wishlist.php:1089
450
  msgid "Left"
451
  msgstr ""
452
 
453
+ #: wpc-smart-wishlist.php:1094
454
  msgid "Use perfect-scrollbar"
455
  msgstr ""
456
 
457
+ #: wpc-smart-wishlist.php:1100
458
  msgid "Read more about %s"
459
  msgstr ""
460
 
461
+ #: wpc-smart-wishlist.php:1104
462
  msgid "Color"
463
  msgstr ""
464
 
465
+ #: wpc-smart-wishlist.php:1110
466
  msgid "Choose the color, default %s"
467
  msgstr ""
468
 
469
+ #: wpc-smart-wishlist.php:1114
470
  msgid "Link to individual product"
471
  msgstr ""
472
 
473
+ #: wpc-smart-wishlist.php:1117
474
  msgid "Yes, open in the same tab"
475
  msgstr ""
476
 
477
+ #: wpc-smart-wishlist.php:1118
478
  msgid "Yes, open in the new tab"
479
  msgstr ""
480
 
481
+ #: wpc-smart-wishlist.php:1119
482
  msgid "Yes, open quick view popup"
483
  msgstr ""
484
 
485
+ #: wpc-smart-wishlist.php:1128
486
  msgid "Show note"
487
  msgstr ""
488
 
489
+ #: wpc-smart-wishlist.php:1134
490
  msgid "Show note on each product for all visitors. Only wishlist owner can add/edit these notes."
491
  msgstr ""
492
 
493
+ #: wpc-smart-wishlist.php:1143
494
+ #: wpc-smart-wishlist.php:1319
495
  msgid "Empty wishlist button"
496
  msgstr ""
497
 
498
+ #: wpc-smart-wishlist.php:1149
499
  msgid "Show empty wishlist button on the popup?"
500
  msgstr ""
501
 
502
+ #: wpc-smart-wishlist.php:1153
503
  msgid "Continue shopping link"
504
  msgstr ""
505
 
506
+ #: wpc-smart-wishlist.php:1158
507
  msgid "By default, the wishlist popup will only be closed when customers click on the \"Continue Shopping\" button."
508
  msgstr ""
509
 
510
+ #: wpc-smart-wishlist.php:1163
511
  msgid "Page"
512
  msgstr ""
513
 
514
+ #: wpc-smart-wishlist.php:1166
515
  msgid "Settings for wishlist page."
516
  msgstr ""
517
 
518
+ #: wpc-smart-wishlist.php:1170
519
  msgid "Wishlist page"
520
  msgstr ""
521
 
522
+ #: wpc-smart-wishlist.php:1175
523
  msgid "Choose a page"
524
  msgstr ""
525
 
526
+ #: wpc-smart-wishlist.php:1178
527
  msgid "Add shortcode %s to display the wishlist on a page."
528
  msgstr ""
529
 
530
+ #: wpc-smart-wishlist.php:1182
531
  msgid "Share buttons"
532
  msgstr ""
533
 
534
+ #: wpc-smart-wishlist.php:1188
535
  msgid "Enable share buttons on the wishlist page?"
536
  msgstr ""
537
 
538
+ #: wpc-smart-wishlist.php:1201
539
  msgid "Social links"
540
  msgstr ""
541
 
542
+ #: wpc-smart-wishlist.php:1220
543
  msgid "Copy link"
544
  msgstr ""
545
 
546
+ #: wpc-smart-wishlist.php:1226
547
  msgid "Enable copy wishlist link to share?"
548
  msgstr ""
549
 
550
+ #: wpc-smart-wishlist.php:1230
551
  msgid "Add Wishlist page to My Account"
552
  msgstr ""
553
 
554
+ #: wpc-smart-wishlist.php:1240
555
  msgid "Menu"
556
  msgstr ""
557
 
558
+ #: wpc-smart-wishlist.php:1243
559
  msgid "Settings for the wishlist menu item."
560
  msgstr ""
561
 
562
+ #: wpc-smart-wishlist.php:1247
563
  msgid "Menu(s)"
564
  msgstr ""
565
 
566
+ #: wpc-smart-wishlist.php:1261
567
  msgid "Choose the menu(s) you want to add the \"wishlist menu\" at the end."
568
  msgstr ""
569
 
570
+ #: wpc-smart-wishlist.php:1271
571
  msgid "Action when clicking on the \"wishlist menu\"."
572
  msgstr ""
573
 
574
+ #: wpc-smart-wishlist.php:1288
575
  msgid "Leave blank to use the default text and its equivalent translation in multiple languages."
576
  msgstr ""
577
 
578
+ #: wpc-smart-wishlist.php:1292
579
  msgid "Button text"
580
  msgstr ""
581
 
582
+ #: wpc-smart-wishlist.php:1301
583
  msgid "Button text (added)"
584
  msgstr ""
585
 
586
+ #: wpc-smart-wishlist.php:1310
587
  msgid "Wishlist popup heading"
588
  msgstr ""
589
 
590
+ #: wpc-smart-wishlist.php:1315
591
+ #: wpc-smart-wishlist.php:1369
592
+ #: wpc-smart-wishlist.php:1382
593
+ #: wpc-smart-wishlist.php:1571
594
+ #: wpc-smart-wishlist.php:1621
595
+ #: wpc-smart-wishlist.php:1827
596
+ #: wpc-smart-wishlist.php:1845
597
+ #: wpc-smart-wishlist.php:1916
598
+ #: wpc-smart-wishlist.php:2126
599
+ #: wpc-smart-wishlist.php:2207
600
+ #: wpc-smart-wishlist.php:2214
601
+ #: wpc-smart-wishlist.php:2436
602
  msgid "Wishlist"
603
  msgstr ""
604
 
605
+ #: wpc-smart-wishlist.php:1324
606
+ #: wpc-smart-wishlist.php:1858
607
  msgid "remove all"
608
  msgstr ""
609
 
610
+ #: wpc-smart-wishlist.php:1337
611
  msgid "Save note"
612
  msgstr ""
613
 
614
+ #: wpc-smart-wishlist.php:1342
615
  msgid "Save"
616
  msgstr ""
617
 
618
+ #: wpc-smart-wishlist.php:1355
619
+ #: wpc-smart-wishlist.php:1360
620
+ #: wpc-smart-wishlist.php:1880
621
  msgid "Continue shopping"
622
  msgstr ""
623
 
624
+ #: wpc-smart-wishlist.php:1364
625
  msgid "Menu item label"
626
  msgstr ""
627
 
628
+ #: wpc-smart-wishlist.php:1377
629
  msgid "Primary wishlist name"
630
  msgstr ""
631
 
632
+ #: wpc-smart-wishlist.php:1386
633
+ #: wpc-smart-wishlist.php:1391
634
+ #: wpc-smart-wishlist.php:1896
635
  msgid "Manage wishlists"
636
  msgstr ""
637
 
638
+ #: wpc-smart-wishlist.php:1395
639
  msgid "Set default"
640
  msgstr ""
641
 
642
+ #: wpc-smart-wishlist.php:1400
643
+ #: wpc-smart-wishlist.php:1930
644
  msgid "set default"
645
  msgstr ""
646
 
647
+ #: wpc-smart-wishlist.php:1404
648
  msgid "Default"
649
  msgstr ""
650
 
651
+ #: wpc-smart-wishlist.php:1409
652
+ #: wpc-smart-wishlist.php:1928
653
  msgid "default"
654
  msgstr ""
655
 
656
+ #: wpc-smart-wishlist.php:1413
657
  msgid "Delete"
658
  msgstr ""
659
 
660
+ #: wpc-smart-wishlist.php:1418
661
+ #: wpc-smart-wishlist.php:1936
662
  msgid "delete"
663
  msgstr ""
664
 
665
+ #: wpc-smart-wishlist.php:1422
666
  msgid "Wishlist name placeholder"
667
  msgstr ""
668
 
669
+ #: wpc-smart-wishlist.php:1427
670
+ #: wpc-smart-wishlist.php:1947
671
  msgid "New Wishlist"
672
  msgstr ""
673
 
674
+ #: wpc-smart-wishlist.php:1431
675
  msgid "Add new wishlist"
676
  msgstr ""
677
 
678
+ #: wpc-smart-wishlist.php:1436
679
+ #: wpc-smart-wishlist.php:1949
680
  msgid "Add New Wishlist"
681
  msgstr ""
682
 
683
+ #: wpc-smart-wishlist.php:1440
684
  msgid "Message"
685
  msgstr ""
686
 
687
+ #: wpc-smart-wishlist.php:1444
688
  msgid "Added to the wishlist"
689
  msgstr ""
690
 
691
+ #: wpc-smart-wishlist.php:1453
692
  msgid "Already in the wishlist"
693
  msgstr ""
694
 
695
+ #: wpc-smart-wishlist.php:1462
696
  msgid "Removed from wishlist"
697
  msgstr ""
698
 
699
+ #: wpc-smart-wishlist.php:1471
700
  msgid "Empty wishlist confirm"
701
  msgstr ""
702
 
703
+ #: wpc-smart-wishlist.php:1476
704
+ #: wpc-smart-wishlist.php:1503
705
+ #: wpc-smart-wishlist.php:1618
706
+ #: wpc-smart-wishlist.php:1619
707
  msgid "This action cannot be undone. Are you sure?"
708
  msgstr ""
709
 
710
+ #: wpc-smart-wishlist.php:1480
711
  msgid "Empty wishlist notice"
712
  msgstr ""
713
 
714
+ #: wpc-smart-wishlist.php:1489
715
  msgid "Empty wishlist"
716
  msgstr ""
717
 
718
+ #: wpc-smart-wishlist.php:1498
719
  msgid "Delete wishlist confirm"
720
  msgstr ""
721
 
722
+ #: wpc-smart-wishlist.php:1507
723
  msgid "Product does not exist"
724
  msgstr ""
725
 
726
+ #: wpc-smart-wishlist.php:1516
727
  msgid "Need to login"
728
  msgstr ""
729
 
730
+ #: wpc-smart-wishlist.php:1525
731
  msgid "Copied wishlist link"
732
  msgstr ""
733
 
734
+ #: wpc-smart-wishlist.php:1530
735
+ #: wpc-smart-wishlist.php:1620
736
  msgid "Copied the wishlist link:"
737
  msgstr ""
738
 
739
+ #: wpc-smart-wishlist.php:1534
740
  msgid "Have an error"
741
  msgstr ""
742
 
743
+ #: wpc-smart-wishlist.php:1669
744
  msgid "Community support"
745
  msgstr ""
746
 
747
+ #: wpc-smart-wishlist.php:2262
748
+ #: wpc-smart-wishlist.php:2265
749
+ #: wpc-smart-wishlist.php:2329
750
+ #: wpc-smart-wishlist.php:2332
751
  msgid "%s product"
752
  msgid_plural "%s products"
753
  msgstr[0] ""
754
  msgstr[1] ""
755
 
756
+ #: wpc-smart-wishlist.php:2264
757
+ #: wpc-smart-wishlist.php:2331
758
  msgid "Guest"
759
  msgstr ""
760
 
761
+ #: wpc-smart-wishlist.php:2279
762
+ #: wpc-smart-wishlist.php:2308
763
  msgid "Edit"
764
  msgstr ""
765
 
766
+ #: wpc-smart-wishlist.php:2279
767
  msgid "See in wishlist"
768
  msgstr ""
769
 
770
+ #: wpc-smart-wishlist.php:2287
771
  msgid "Empty Wishlist"
772
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpclever.net
4
  Tags: woocommerce, woo, wpc, smart, wishlist, wish list
5
  Requires at least: 4.0
6
  Tested up to: 6.1
7
- Stable tag: 4.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -106,6 +106,9 @@ Example:
106
 
107
  == Changelog ==
108
 
 
 
 
109
  = 4.4.3 =
110
  * Updated: Optimized the code
111
 
4
  Tags: woocommerce, woo, wpc, smart, wishlist, wish list
5
  Requires at least: 4.0
6
  Tested up to: 6.1
7
+ Stable tag: 4.4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
106
 
107
  == Changelog ==
108
 
109
+ = 4.4.4 =
110
+ * Added: Function 'get_settings' & 'get_setting'
111
+
112
  = 4.4.3 =
113
  * Updated: Optimized the code
114
 
wpc-smart-wishlist.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WPC Smart Wishlist for WooCommerce
4
  Plugin URI: https://wpclever.net/
5
  Description: WPC Smart Wishlist is a simple but powerful tool that can help your customer save products for buy later.
6
- Version: 4.4.3
7
  Author: WPClever
8
  Author URI: https://wpclever.net
9
  Text Domain: woo-smart-wishlist
@@ -16,7 +16,7 @@ WC tested up to: 7.0
16
 
17
  defined( 'ABSPATH' ) || exit;
18
 
19
- ! defined( 'WOOSW_VERSION' ) && define( 'WOOSW_VERSION', '4.4.3' );
20
  ! defined( 'WOOSW_FILE' ) && define( 'WOOSW_FILE', __FILE__ );
21
  ! defined( 'WOOSW_URI' ) && define( 'WOOSW_URI', plugin_dir_url( __FILE__ ) );
22
  ! defined( 'WOOSW_DIR' ) && define( 'WOOSW_DIR', plugin_dir_path( __FILE__ ) );
@@ -48,7 +48,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
48
 
49
  if ( ! class_exists( 'WPCleverWoosw' ) ) {
50
  class WPCleverWoosw {
51
- protected static $added_products = array();
 
52
  protected static $localization = array();
53
  protected static $instance = null;
54
 
@@ -61,6 +62,9 @@ if ( ! function_exists( 'woosw_init' ) ) {
61
  }
62
 
63
  function __construct() {
 
 
 
64
  // add query var
65
  add_filter( 'query_vars', [ $this, 'query_vars' ], 1 );
66
  add_action( 'init', [ $this, 'init' ] );
@@ -70,7 +74,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
70
  add_action( 'admin_menu', [ $this, 'admin_menu' ] );
71
 
72
  // my account
73
- if ( get_option( 'woosw_page_myaccount', 'yes' ) === 'yes' ) {
74
  add_filter( 'woocommerce_account_menu_items', [ $this, 'account_items' ], 99 );
75
  add_action( 'woocommerce_account_wishlist_endpoint', [ $this, 'account_endpoint' ], 99 );
76
  }
@@ -92,7 +96,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
92
  add_action( 'template_redirect', [ $this, 'wishlist_add_by_link' ] );
93
 
94
  // added to cart
95
- if ( get_option( 'woosw_auto_remove', 'no' ) === 'yes' ) {
96
  add_action( 'woocommerce_add_to_cart', [ $this, 'add_to_cart' ], 10, 2 );
97
  }
98
 
@@ -160,14 +164,11 @@ if ( ! function_exists( 'woosw_init' ) ) {
160
  }
161
 
162
  function init() {
163
- // localization
164
- self::$localization = (array) get_option( 'woosw_localization' );
165
-
166
  // get key
167
  $key = isset( $_COOKIE['woosw_key'] ) ? sanitize_text_field( $_COOKIE['woosw_key'] ) : '#';
168
 
169
  // get products
170
- self::$added_products = get_option( 'woosw_list_' . $key ) ?: array();
171
 
172
  // rewrite
173
  if ( $page_id = self::get_page_id() ) {
@@ -179,7 +180,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
179
  }
180
 
181
  // my account page
182
- if ( get_option( 'woosw_page_myaccount', 'yes' ) === 'yes' ) {
183
  add_rewrite_endpoint( 'wishlist', EP_PAGES );
184
  }
185
 
@@ -188,7 +189,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
188
  add_shortcode( 'woosw_list', array( $this, 'list_shortcode' ) );
189
 
190
  // add button for archive
191
- $button_position_archive = apply_filters( 'woosw_button_position_archive', get_option( 'woosw_button_position_archive', apply_filters( 'woosw_button_position_archive_default', 'after_add_to_cart' ) ) );
192
 
193
  if ( ! empty( $button_position_archive ) ) {
194
  switch ( $button_position_archive ) {
@@ -219,7 +220,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
219
  }
220
 
221
  // add button for single
222
- $button_position_single = apply_filters( 'woosw_button_position_single', get_option( 'woosw_button_position_single', apply_filters( 'woosw_button_position_single_default', '31' ) ) );
223
 
224
  if ( ! empty( $button_position_single ) ) {
225
  if ( is_numeric( $button_position_single ) ) {
@@ -236,7 +237,21 @@ if ( ! function_exists( 'woosw_init' ) ) {
236
  }
237
  }
238
 
239
- function localization( $key = '', $default = '' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  $str = '';
241
 
242
  if ( ! empty( $key ) && ! empty( self::$localization[ $key ] ) ) {
@@ -252,11 +267,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
252
  $key = self::get_key();
253
 
254
  if ( $key !== '#' ) {
255
- $products = array();
256
-
257
- if ( get_option( 'woosw_list_' . $key ) ) {
258
- $products = get_option( 'woosw_list_' . $key );
259
- }
260
 
261
  if ( array_key_exists( $product_id, $products ) ) {
262
  unset( $products[ $product_id ] );
@@ -277,11 +288,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
277
 
278
  if ( $product_id ) {
279
  if ( $key !== '#' && $key !== 'WOOSW' ) {
280
- $products = array();
281
-
282
- if ( get_option( 'woosw_list_' . $key ) ) {
283
- $products = get_option( 'woosw_list_' . $key );
284
- }
285
 
286
  if ( ! array_key_exists( $product_id, $products ) ) {
287
  // insert if not exists
@@ -311,11 +318,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
311
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
312
  $return['content'] = self::wishlist_content( $key, self::localization( 'empty_message', esc_html__( 'There are no products on the Wishlist!', 'woo-smart-wishlist' ) ) );
313
  } else {
314
- $products = array();
315
-
316
- if ( get_option( 'woosw_list_' . $key ) ) {
317
- $products = get_option( 'woosw_list_' . $key );
318
- }
319
 
320
  if ( ! array_key_exists( $product_id, $products ) ) {
321
  // insert if not exists
@@ -341,7 +344,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
341
  'fragments' => self::get_fragments(),
342
  );
343
 
344
- if ( get_option( 'woosw_button_action', 'list' ) === 'list' ) {
345
  $return['content'] = self::wishlist_content( $key );
346
  }
347
  }
@@ -368,11 +371,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
368
  if ( $key === '#' ) {
369
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
370
  } else {
371
- $products = array();
372
-
373
- if ( get_option( 'woosw_list_' . $key ) ) {
374
- $products = get_option( 'woosw_list_' . $key );
375
- }
376
 
377
  if ( array_key_exists( $product_id, $products ) ) {
378
  unset( $products[ $product_id ] );
@@ -415,19 +414,15 @@ if ( ! function_exists( 'woosw_init' ) ) {
415
  if ( $key === '#' ) {
416
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
417
  } else {
418
- if ( get_option( 'woosw_list_' . $key ) ) {
419
- $products = get_option( 'woosw_list_' . $key );
420
-
421
- if ( ! empty( $products ) ) {
422
- foreach ( array_keys( $products ) as $product_id ) {
423
- // update count
424
- self::update_product_count( $product_id, 'remove' );
425
- }
426
  }
427
  }
428
 
429
  // remove option
430
- update_option( 'woosw_list_' . $key, array() );
431
  $return['status'] = 1;
432
  $return['count'] = 0;
433
  $return['notice'] = self::localization( 'empty_notice', esc_html__( 'All products have been removed from the Wishlist!', 'woo-smart-wishlist' ) );
@@ -452,12 +447,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
452
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use Wishlist!', 'woo-smart-wishlist' ) );
453
  $return['content'] = self::wishlist_content( $key, self::localization( 'empty_message', esc_html__( 'There are no products on the Wishlist!', 'woo-smart-wishlist' ) ) );
454
  } else {
455
- $products = array();
456
-
457
- if ( get_option( 'woosw_list_' . $key ) ) {
458
- $products = get_option( 'woosw_list_' . $key );
459
- }
460
-
461
  $return['status'] = 1;
462
  $return['count'] = count( $products );
463
  $return['content'] = self::wishlist_content( $key );
@@ -480,12 +470,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
480
  if ( $key === '#' ) {
481
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use Wishlist!', 'woo-smart-wishlist' ) );
482
  } else {
483
- $products = array();
484
-
485
- if ( get_option( 'woosw_list_' . $key ) ) {
486
- $products = get_option( 'woosw_list_' . $key );
487
- }
488
-
489
  $return['status'] = 1;
490
  $return['count'] = count( $products );
491
  }
@@ -499,7 +484,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
499
  $note = trim( isset( $_POST['note'] ) ? sanitize_text_field( $_POST['note'] ) : '' );
500
  $key = isset( $_POST['woosw_key'] ) ? sanitize_text_field( $_POST['woosw_key'] ) : '';
501
  $product_id = isset( $_POST['product_id'] ) ? (int) sanitize_text_field( $_POST['product_id'] ) : 0;
502
- $products = get_option( 'woosw_list_' . $key );
503
 
504
  if ( isset( $products[ $product_id ] ) ) {
505
  if ( is_array( $products[ $product_id ] ) ) {
@@ -539,7 +524,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
539
  if ( $user_id = get_current_user_id() ) {
540
  $key = self::get_key( true );
541
  $keys = get_user_meta( $user_id, 'woosw_keys', true ) ?: array();
542
- $max = get_option( 'woosw_maximum_wishlists', '5' );
543
 
544
  if ( is_array( $keys ) && ( count( $keys ) < (int) $max ) ) {
545
  $keys[ $key ] = array(
@@ -593,15 +578,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
593
  }
594
 
595
  function set_default() {
596
- $return = [];
597
- $key = trim( isset( $_POST['key'] ) ? sanitize_text_field( $_POST['key'] ) : '' );
598
-
599
- if ( $products = get_option( 'woosw_list_' . $key ) ) {
600
- $count = count( $products );
601
- } else {
602
- $products = array();
603
- $count = 0;
604
- }
605
 
606
  if ( ! empty( $key ) && ( $user_id = get_current_user_id() ) ) {
607
  update_user_meta( $user_id, 'woosw_key', $key );
@@ -636,7 +616,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
636
 
637
  $attrs = shortcode_atts( array(
638
  'id' => null,
639
- 'type' => get_option( 'woosw_button_type', 'button' )
640
  ), $attrs, 'woosw' );
641
 
642
  if ( ! $attrs['id'] ) {
@@ -658,7 +638,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
658
 
659
  if ( $attrs['id'] ) {
660
  // check cats
661
- $selected_cats = get_option( 'woosw_cats', array() );
662
 
663
  if ( ! empty( $selected_cats ) && ( $selected_cats[0] !== '0' ) ) {
664
  if ( ! has_term( $selected_cats, 'product_cat', $attrs['id'] ) ) {
@@ -668,20 +648,20 @@ if ( ! function_exists( 'woosw_init' ) ) {
668
 
669
  $class = 'woosw-btn woosw-btn-' . esc_attr( $attrs['id'] );
670
 
671
- if ( array_key_exists( $attrs['id'], self::$added_products ) || in_array( $attrs['id'], array_column( self::$added_products, 'parent' ) ) ) {
672
  $class .= ' woosw-added';
673
- $icon = apply_filters( 'woosw_button_added_icon', get_option( 'woosw_button_added_icon', 'woosw-icon-8' ) );
674
  $text = apply_filters( 'woosw_button_text_added', self::localization( 'button_added', esc_html__( 'Browse wishlist', 'woo-smart-wishlist' ) ) );
675
  } else {
676
- $icon = apply_filters( 'woosw_button_normal_icon', get_option( 'woosw_button_normal_icon', 'woosw-icon-5' ) );
677
  $text = apply_filters( 'woosw_button_text', self::localization( 'button', esc_html__( 'Add to wishlist', 'woo-smart-wishlist' ) ) );
678
  }
679
 
680
- if ( get_option( 'woosw_button_class', '' ) !== '' ) {
681
- $class .= ' ' . esc_attr( get_option( 'woosw_button_class' ) );
682
  }
683
 
684
- $button_icon = get_option( 'woosw_button_icon', 'no' );
685
 
686
  if ( $button_icon !== 'no' ) {
687
  $class .= ' woosw-btn-has-icon';
@@ -723,17 +703,17 @@ if ( ! function_exists( 'woosw_init' ) ) {
723
  $return_html .= self::get_items( $key, 'table' );
724
  $return_html .= '<div class="woosw-actions">';
725
 
726
- if ( get_option( 'woosw_page_share', 'yes' ) === 'yes' ) {
727
  $facebook = esc_html__( 'Facebook', 'woo-smart-wishlist' );
728
  $twitter = esc_html__( 'Twitter', 'woo-smart-wishlist' );
729
  $pinterest = esc_html__( 'Pinterest', 'woo-smart-wishlist' );
730
  $mail = esc_html__( 'Mail', 'woo-smart-wishlist' );
731
 
732
- if ( get_option( 'woosw_page_icon', 'yes' ) === 'yes' ) {
733
  $facebook = $twitter = $pinterest = $mail = "<i class='woosw-icon'></i>";
734
  }
735
 
736
- $share_items = get_option( 'woosw_page_items' );
737
 
738
  if ( ! empty( $share_items ) ) {
739
  $return_html .= '<div class="woosw-share">';
@@ -746,7 +726,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
746
  }
747
  }
748
 
749
- if ( get_option( 'woosw_page_copy', 'yes' ) === 'yes' ) {
750
  $return_html .= '<div class="woosw-copy">';
751
  $return_html .= '<span class="woosw-copy-label">' . esc_html__( 'Wishlist link:', 'woo-smart-wishlist' ) . '</span>';
752
  $return_html .= '<span class="woosw-copy-url"><input id="woosw_copy_url" type="url" value="' . esc_attr( $share_url_raw ) . '" readonly/></span>';
@@ -762,39 +742,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
762
 
763
  function register_settings() {
764
  // settings
765
- register_setting( 'woosw_settings', 'woosw_disable_unauthenticated' );
766
- register_setting( 'woosw_settings', 'woosw_auto_remove' );
767
- register_setting( 'woosw_settings', 'woosw_enable_multiple' );
768
- register_setting( 'woosw_settings', 'woosw_maximum_wishlists' );
769
- register_setting( 'woosw_settings', 'woosw_link' );
770
- register_setting( 'woosw_settings', 'woosw_show_note' );
771
- register_setting( 'woosw_settings', 'woosw_page_id' );
772
- register_setting( 'woosw_settings', 'woosw_page_share' );
773
- register_setting( 'woosw_settings', 'woosw_page_icon' );
774
- register_setting( 'woosw_settings', 'woosw_page_items' );
775
- register_setting( 'woosw_settings', 'woosw_page_copy' );
776
- register_setting( 'woosw_settings', 'woosw_page_myaccount' );
777
- register_setting( 'woosw_settings', 'woosw_button_type' );
778
- register_setting( 'woosw_settings', 'woosw_button_icon' );
779
- register_setting( 'woosw_settings', 'woosw_button_normal_icon' );
780
- register_setting( 'woosw_settings', 'woosw_button_added_icon' );
781
- register_setting( 'woosw_settings', 'woosw_button_loading_icon' );
782
- register_setting( 'woosw_settings', 'woosw_button_text' );
783
- register_setting( 'woosw_settings', 'woosw_button_action' );
784
- register_setting( 'woosw_settings', 'woosw_message_position' );
785
- register_setting( 'woosw_settings', 'woosw_button_text_added' );
786
- register_setting( 'woosw_settings', 'woosw_button_action_added' );
787
- register_setting( 'woosw_settings', 'woosw_button_class' );
788
- register_setting( 'woosw_settings', 'woosw_button_position_archive' );
789
- register_setting( 'woosw_settings', 'woosw_button_position_single' );
790
- register_setting( 'woosw_settings', 'woosw_cats' );
791
- register_setting( 'woosw_settings', 'woosw_popup_position' );
792
- register_setting( 'woosw_settings', 'woosw_perfect_scrollbar' );
793
- register_setting( 'woosw_settings', 'woosw_color' );
794
- register_setting( 'woosw_settings', 'woosw_empty_button' );
795
- register_setting( 'woosw_settings', 'woosw_continue_url' );
796
- register_setting( 'woosw_settings', 'woosw_menus' );
797
- register_setting( 'woosw_settings', 'woosw_menu_action' );
798
 
799
  // localization
800
  register_setting( 'woosw_localization', 'woosw_localization' );
@@ -856,27 +804,27 @@ if ( ! function_exists( 'woosw_init' ) ) {
856
  flush_rewrite_rules();
857
  }
858
 
859
- $disable_unauthenticated = get_option( 'woosw_disable_unauthenticated', 'no' );
860
- $auto_remove = get_option( 'woosw_auto_remove', 'no' );
861
- $enable_multiple = get_option( 'woosw_enable_multiple', 'no' );
862
- $button_type = get_option( 'woosw_button_type', 'button' );
863
- $button_icon = get_option( 'woosw_button_icon', 'no' );
864
- $button_normal_icon = get_option( 'woosw_button_normal_icon', 'woosw-icon-5' );
865
- $button_added_icon = get_option( 'woosw_button_added_icon', 'woosw-icon-8' );
866
- $button_loading_icon = get_option( 'woosw_button_loading_icon', 'woosw-icon-4' );
867
- $button_action = get_option( 'woosw_button_action', 'list' );
868
- $message_position = get_option( 'woosw_message_position', 'right-top' );
869
- $button_action_added = get_option( 'woosw_button_action_added', 'popup' );
870
- $popup_position = get_option( 'woosw_popup_position', 'center' );
871
- $perfect_scrollbar = get_option( 'woosw_perfect_scrollbar', 'yes' );
872
- $link = get_option( 'woosw_link', 'yes' );
873
- $show_note = get_option( 'woosw_show_note', 'no' );
874
- $empty_button = get_option( 'woosw_empty_button', 'no' );
875
- $page_share = get_option( 'woosw_page_share', 'yes' );
876
- $page_icon = get_option( 'woosw_page_icon', 'yes' );
877
- $page_copy = get_option( 'woosw_page_copy', 'yes' );
878
- $page_myaccount = get_option( 'woosw_page_myaccount', 'yes' );
879
- $menu_action = get_option( 'woosw_menu_action', 'open_page' );
880
  ?>
881
  <form method="post" action="options.php">
882
  <table class="form-table">
@@ -888,7 +836,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
888
  <tr>
889
  <th scope="row"><?php esc_html_e( 'Disable the wishlist for unauthenticated users', 'woo-smart-wishlist' ); ?></th>
890
  <td>
891
- <select name="woosw_disable_unauthenticated">
892
  <option value="yes" <?php selected( $disable_unauthenticated, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
893
  <option value="no" <?php selected( $disable_unauthenticated, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
894
  </select>
@@ -897,7 +845,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
897
  <tr>
898
  <th scope="row"><?php esc_html_e( 'Auto remove', 'woo-smart-wishlist' ); ?></th>
899
  <td>
900
- <select name="woosw_auto_remove">
901
  <option value="yes" <?php selected( $auto_remove, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
902
  <option value="no" <?php selected( $auto_remove, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
903
  </select>
@@ -917,7 +865,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
917
  <tr>
918
  <th scope="row"><?php esc_html_e( 'Enable', 'woo-smart-wishlist' ); ?></th>
919
  <td>
920
- <select name="woosw_enable_multiple">
921
  <option value="yes" <?php selected( $enable_multiple, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
922
  <option value="no" <?php selected( $enable_multiple, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
923
  </select>
@@ -927,8 +875,9 @@ if ( ! function_exists( 'woosw_init' ) ) {
927
  <tr>
928
  <th scope="row"><?php esc_html_e( 'Maximum wishlists per user', 'woo-smart-wishlist' ); ?></th>
929
  <td>
930
- <input type="number" min="1" max="100" name="woosw_maximum_wishlists"
931
- value="<?php echo esc_attr( get_option( 'woosw_maximum_wishlists', '5' ) ); ?>"/>
 
932
  </td>
933
  </tr>
934
  <tr class="heading">
@@ -942,7 +891,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
942
  <tr>
943
  <th scope="row"><?php esc_html_e( 'Type', 'woo-smart-wishlist' ); ?></th>
944
  <td>
945
- <select name="woosw_button_type">
946
  <option value="button" <?php selected( $button_type, 'button' ); ?>><?php esc_html_e( 'Button', 'woo-smart-wishlist' ); ?></option>
947
  <option value="link" <?php selected( $button_type, 'link' ); ?>><?php esc_html_e( 'Link', 'woo-smart-wishlist' ); ?></option>
948
  </select>
@@ -951,7 +900,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
951
  <tr>
952
  <th scope="row"><?php esc_html_e( 'Use icon', 'woo-smart-wishlist' ); ?></th>
953
  <td>
954
- <select name="woosw_button_icon">
955
  <option value="left" <?php selected( $button_icon, 'left' ); ?>><?php esc_html_e( 'Icon on the left', 'woo-smart-wishlist' ); ?></option>
956
  <option value="right" <?php selected( $button_icon, 'right' ); ?>><?php esc_html_e( 'Icon on the right', 'woo-smart-wishlist' ); ?></option>
957
  <option value="only" <?php selected( $button_icon, 'only' ); ?>><?php esc_html_e( 'Icon only', 'woo-smart-wishlist' ); ?></option>
@@ -962,7 +911,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
962
  <tr class="woosw-show-if-button-icon">
963
  <th><?php esc_html_e( 'Normal icon', 'woo-smart-wishlist' ); ?></th>
964
  <td>
965
- <select name="woosw_button_normal_icon" class="woosw_icon_picker">
 
966
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
967
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_normal_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
968
  } ?>
@@ -972,7 +922,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
972
  <tr class="woosw-show-if-button-icon">
973
  <th><?php esc_html_e( 'Added icon', 'woo-smart-wishlist' ); ?></th>
974
  <td>
975
- <select name="woosw_button_added_icon" class="woosw_icon_picker">
 
976
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
977
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_added_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
978
  } ?>
@@ -982,7 +933,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
982
  <tr class="woosw-show-if-button-icon">
983
  <th><?php esc_html_e( 'Loading icon', 'woo-smart-wishlist' ); ?></th>
984
  <td>
985
- <select name="woosw_button_loading_icon" class="woosw_icon_picker">
 
986
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
987
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_loading_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
988
  } ?>
@@ -992,7 +944,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
992
  <tr>
993
  <th scope="row"><?php esc_html_e( 'Action', 'woo-smart-wishlist' ); ?></th>
994
  <td>
995
- <select name="woosw_button_action">
996
  <option value="message" <?php selected( $button_action, 'message' ); ?>><?php esc_html_e( 'Show message', 'woo-smart-wishlist' ); ?></option>
997
  <option value="list" <?php selected( $button_action, 'list' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
998
  <option value="no" <?php selected( $button_action, 'no' ); ?>><?php esc_html_e( 'Add to wishlist solely', 'woo-smart-wishlist' ); ?></option>
@@ -1003,7 +955,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1003
  <tr class="woosw_button_action_hide woosw_button_action_message">
1004
  <th scope="row"><?php esc_html_e( 'Message position', 'woo-smart-wishlist' ); ?></th>
1005
  <td>
1006
- <select name="woosw_message_position">
1007
  <option value="right-top" <?php selected( $message_position, 'right-top' ); ?>><?php esc_html_e( 'right-top', 'woo-smart-wishlist' ); ?></option>
1008
  <option value="right-bottom" <?php selected( $message_position, 'right-bottom' ); ?>><?php esc_html_e( 'right-bottom', 'woo-smart-wishlist' ); ?></option>
1009
  <option value="fluid-top" <?php selected( $message_position, 'fluid-top' ); ?>><?php esc_html_e( 'center-top', 'woo-smart-wishlist' ); ?></option>
@@ -1016,7 +968,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1016
  <tr>
1017
  <th scope="row"><?php esc_html_e( 'Action (added)', 'woo-smart-wishlist' ); ?></th>
1018
  <td>
1019
- <select name="woosw_button_action_added">
1020
  <option value="popup" <?php selected( $button_action_added, 'popup' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
1021
  <option value="page" <?php selected( $button_action_added, 'page' ); ?>><?php esc_html_e( 'Open wishlist page', 'woo-smart-wishlist' ); ?></option>
1022
  </select>
@@ -1026,8 +978,9 @@ if ( ! function_exists( 'woosw_init' ) ) {
1026
  <tr>
1027
  <th scope="row"><?php esc_html_e( 'Extra class (optional)', 'woo-smart-wishlist' ); ?></th>
1028
  <td>
1029
- <input type="text" name="woosw_button_class" class="regular-text"
1030
- value="<?php echo esc_attr( get_option( 'woosw_button_class', '' ) ); ?>"/>
 
1031
  <span class="description"><?php esc_html_e( 'Add extra class for action button/link, split by one space.', 'woo-smart-wishlist' ); ?></span>
1032
  </td>
1033
  </tr>
@@ -1045,10 +998,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
1045
  '0' => esc_html__( 'None (hide it)', 'woo-smart-wishlist' ),
1046
  ) );
1047
  ?>
1048
- <select name="woosw_button_position_archive" <?php echo( $position_archive !== 'default' ? 'disabled' : '' ); ?>>
1049
  <?php
1050
  if ( $position_archive === 'default' ) {
1051
- $position_archive = get_option( 'woosw_button_position_archive', apply_filters( 'woosw_button_position_archive_default', 'after_add_to_cart' ) );
1052
  }
1053
 
1054
  foreach ( $positions_archive as $k => $p ) {
@@ -1074,10 +1027,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
1074
  '0' => esc_html__( 'None (hide it)', 'woo-smart-wishlist' ),
1075
  ) );
1076
  ?>
1077
- <select name="woosw_button_position_single" <?php echo( $position_single !== 'default' ? 'disabled' : '' ); ?>>
1078
  <?php
1079
  if ( $position_single === 'default' ) {
1080
- $position_single = get_option( 'woosw_button_position_single', apply_filters( 'woosw_button_position_single_default', '31' ) );
1081
  }
1082
 
1083
  foreach ( $positions_single as $k => $p ) {
@@ -1099,7 +1052,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1099
  <th scope="row"><?php esc_html_e( 'Categories', 'woo-smart-wishlist' ); ?></th>
1100
  <td>
1101
  <?php
1102
- $selected_cats = get_option( 'woosw_cats' );
1103
 
1104
  if ( empty( $selected_cats ) ) {
1105
  $selected_cats = array( 0 );
@@ -1107,7 +1060,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1107
 
1108
  wc_product_dropdown_categories(
1109
  array(
1110
- 'name' => 'woosw_cats',
1111
  'hide_empty' => 0,
1112
  'value_field' => 'id',
1113
  'multiple' => true,
@@ -1130,7 +1083,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1130
  <tr>
1131
  <th scope="row"><?php esc_html_e( 'Position', 'woo-smart-wishlist' ); ?></th>
1132
  <td>
1133
- <select name="woosw_popup_position">
1134
  <option value="center" <?php selected( $popup_position, 'center' ); ?>><?php esc_html_e( 'Center', 'woo-smart-wishlist' ); ?></option>
1135
  <option value="right" <?php selected( $popup_position, 'right' ); ?>><?php esc_html_e( 'Right', 'woo-smart-wishlist' ); ?></option>
1136
  <option value="left" <?php selected( $popup_position, 'left' ); ?>><?php esc_html_e( 'Left', 'woo-smart-wishlist' ); ?></option>
@@ -1140,7 +1093,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1140
  <tr>
1141
  <th scope="row"><?php esc_html_e( 'Use perfect-scrollbar', 'woo-smart-wishlist' ); ?></th>
1142
  <td>
1143
- <select name="woosw_perfect_scrollbar">
1144
  <option value="yes" <?php selected( $perfect_scrollbar, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1145
  <option value="no" <?php selected( $perfect_scrollbar, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1146
  </select>
@@ -1151,15 +1104,16 @@ if ( ! function_exists( 'woosw_init' ) ) {
1151
  <th scope="row"><?php esc_html_e( 'Color', 'woo-smart-wishlist' ); ?></th>
1152
  <td>
1153
  <?php $color_default = apply_filters( 'woosw_color_default', '#5fbd74' ); ?>
1154
- <input type="text" name="woosw_color" class="woosw_color_picker"
1155
- value="<?php echo esc_attr( get_option( 'woosw_color', $color_default ) ); ?>"/>
 
1156
  <span class="description"><?php printf( esc_html__( 'Choose the color, default %s', 'woo-smart-wishlist' ), '<code>' . $color_default . '</code>' ); ?></span>
1157
  </td>
1158
  </tr>
1159
  <tr>
1160
  <th><?php esc_html_e( 'Link to individual product', 'woo-smart-wishlist' ); ?></th>
1161
  <td>
1162
- <select name="woosw_link">
1163
  <option value="yes" <?php selected( $link, 'yes' ); ?>><?php esc_html_e( 'Yes, open in the same tab', 'woo-smart-wishlist' ); ?></option>
1164
  <option value="yes_blank" <?php selected( $link, 'yes_blank' ); ?>><?php esc_html_e( 'Yes, open in the new tab', 'woo-smart-wishlist' ); ?></option>
1165
  <option value="yes_popup" <?php selected( $link, 'yes_popup' ); ?>><?php esc_html_e( 'Yes, open quick view popup', 'woo-smart-wishlist' ); ?></option>
@@ -1173,7 +1127,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1173
  <tr>
1174
  <th scope="row"><?php esc_html_e( 'Show note', 'woo-smart-wishlist' ); ?></th>
1175
  <td>
1176
- <select name="woosw_show_note">
1177
  <option value="yes" <?php selected( $show_note, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1178
  <option value="no" <?php selected( $show_note, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1179
  </select>
@@ -1188,7 +1142,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1188
  <tr>
1189
  <th scope="row"><?php esc_html_e( 'Empty wishlist button', 'woo-smart-wishlist' ); ?></th>
1190
  <td>
1191
- <select name="woosw_empty_button">
1192
  <option value="yes" <?php selected( $empty_button, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1193
  <option value="no" <?php selected( $empty_button, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1194
  </select>
@@ -1198,8 +1152,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
1198
  <tr>
1199
  <th scope="row"><?php esc_html_e( 'Continue shopping link', 'woo-smart-wishlist' ); ?></th>
1200
  <td>
1201
- <input type="url" name="woosw_continue_url"
1202
- value="<?php echo esc_attr( get_option( 'woosw_continue_url' ) ); ?>"
1203
  class="regular-text code"/>
1204
  <span class="description"><?php esc_html_e( 'By default, the wishlist popup will only be closed when customers click on the "Continue Shopping" button.', 'woo-smart-wishlist' ); ?></span>
1205
  </td>
@@ -1216,8 +1170,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
1216
  <th scope="row"><?php esc_html_e( 'Wishlist page', 'woo-smart-wishlist' ); ?></th>
1217
  <td>
1218
  <?php wp_dropdown_pages( array(
1219
- 'selected' => get_option( 'woosw_page_id', '' ),
1220
- 'name' => 'woosw_page_id',
1221
  'show_option_none' => esc_html__( 'Choose a page', 'woo-smart-wishlist' ),
1222
  'option_none_value' => '',
1223
  ) ); ?>
@@ -1227,7 +1181,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1227
  <tr>
1228
  <th scope="row"><?php esc_html_e( 'Share buttons', 'woo-smart-wishlist' ); ?></th>
1229
  <td>
1230
- <select name="woosw_page_share">
1231
  <option value="yes" <?php selected( $page_share, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1232
  <option value="no" <?php selected( $page_share, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1233
  </select>
@@ -1237,7 +1191,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1237
  <tr>
1238
  <th scope="row"><?php esc_html_e( 'Use icon', 'woo-smart-wishlist' ); ?></th>
1239
  <td>
1240
- <select name="woosw_page_icon">
1241
  <option value="yes" <?php selected( $page_icon, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1242
  <option value="no" <?php selected( $page_icon, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1243
  </select>
@@ -1247,32 +1201,25 @@ if ( ! function_exists( 'woosw_init' ) ) {
1247
  <th scope="row"><?php esc_html_e( 'Social links', 'woo-smart-wishlist' ); ?></th>
1248
  <td>
1249
  <?php
1250
- $share_items = get_option( 'woosw_page_items' );
1251
 
1252
  if ( empty( $share_items ) ) {
1253
  $share_items = array();
1254
  }
1255
  ?>
1256
- <select multiple name="woosw_page_items[]" id='woosw_page_items'>
1257
- <option value="facebook" <?php echo esc_attr( in_array( 'facebook', $share_items ) ? 'selected' : '' ); ?>>
1258
- <?php esc_html_e( 'Facebook', 'woo-smart-wishlist' ); ?>
1259
- </option>
1260
- <option value="twitter" <?php echo esc_attr( in_array( 'twitter', $share_items ) ? 'selected' : '' ); ?>>
1261
- <?php esc_html_e( 'Twitter', 'woo-smart-wishlist' ); ?>
1262
- </option>
1263
- <option value="pinterest" <?php echo esc_attr( in_array( 'pinterest', $share_items ) ? 'selected' : '' ); ?>>
1264
- <?php esc_html_e( 'Pinterest', 'woo-smart-wishlist' ); ?>
1265
- </option>
1266
- <option value="mail" <?php echo esc_attr( in_array( 'mail', $share_items ) ? 'selected' : '' ); ?>>
1267
- <?php esc_html_e( 'Mail', 'woo-smart-wishlist' ); ?>
1268
- </option>
1269
  </select>
1270
  </td>
1271
  </tr>
1272
  <tr>
1273
  <th scope="row"><?php esc_html_e( 'Copy link', 'woo-smart-wishlist' ); ?></th>
1274
  <td>
1275
- <select name="woosw_page_copy">
1276
  <option value="yes" <?php selected( $page_copy, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1277
  <option value="no" <?php selected( $page_copy, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1278
  </select>
@@ -1282,7 +1229,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1282
  <tr>
1283
  <th scope="row"><?php esc_html_e( 'Add Wishlist page to My Account', 'woo-smart-wishlist' ); ?></th>
1284
  <td>
1285
- <select name="woosw_page_myaccount">
1286
  <option value="yes" <?php selected( $page_myaccount, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1287
  <option value="no" <?php selected( $page_myaccount, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1288
  </select>
@@ -1305,10 +1252,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
1305
  'fields' => 'id=>name',
1306
  );
1307
  $nav_menus = get_terms( 'nav_menu', $nav_args );
1308
- $saved_menus = get_option( 'woosw_menus', array() );
1309
 
1310
  foreach ( $nav_menus as $nav_id => $nav_name ) {
1311
- echo '<input type="checkbox" name="woosw_menus[]" value="' . esc_attr( $nav_id ) . '" ' . ( is_array( $saved_menus ) && in_array( $nav_id, $saved_menus, false ) ? 'checked' : '' ) . '/><label>' . esc_html( $nav_name ) . '</label><br/>';
1312
  }
1313
  ?>
1314
  <span class="description"><?php esc_html_e( 'Choose the menu(s) you want to add the "wishlist menu" at the end.', 'woo-smart-wishlist' ); ?></span>
@@ -1317,7 +1264,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1317
  <tr>
1318
  <th scope="row"><?php esc_html_e( 'Action', 'woo-smart-wishlist' ); ?></th>
1319
  <td>
1320
- <select name="woosw_menu_action">
1321
  <option value="open_page" <?php selected( $menu_action, 'open_page' ); ?>><?php esc_html_e( 'Open wishlist page', 'woo-smart-wishlist' ); ?></option>
1322
  <option value="open_popup" <?php selected( $menu_action, 'open_popup' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
1323
  </select>
@@ -1633,13 +1580,13 @@ if ( ! function_exists( 'woosw_init' ) ) {
1633
 
1634
  function enqueue_scripts() {
1635
  // perfect srollbar
1636
- if ( get_option( 'woosw_perfect_scrollbar', 'yes' ) === 'yes' ) {
1637
  wp_enqueue_style( 'perfect-scrollbar', WOOSW_URI . 'assets/libs/perfect-scrollbar/css/perfect-scrollbar.min.css' );
1638
  wp_enqueue_style( 'perfect-scrollbar-wpc', WOOSW_URI . 'assets/libs/perfect-scrollbar/css/custom-theme.css' );
1639
  wp_enqueue_script( 'perfect-scrollbar', WOOSW_URI . 'assets/libs/perfect-scrollbar/js/perfect-scrollbar.jquery.min.js', array( 'jquery' ), WOOSW_VERSION, true );
1640
  }
1641
 
1642
- if ( get_option( 'woosw_button_action', 'list' ) === 'message' ) {
1643
  wp_enqueue_style( 'notiny', WOOSW_URI . 'assets/libs/notiny/notiny.css' );
1644
  wp_enqueue_script( 'notiny', WOOSW_URI . 'assets/libs/notiny/notiny.js', array( 'jquery' ), WOOSW_VERSION, true );
1645
  }
@@ -1648,7 +1595,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1648
  wp_enqueue_style( 'woosw-icons', WOOSW_URI . 'assets/css/icons.css', array(), WOOSW_VERSION );
1649
  wp_enqueue_style( 'woosw-frontend', WOOSW_URI . 'assets/css/frontend.css', array(), WOOSW_VERSION );
1650
  $color_default = apply_filters( 'woosw_color_default', '#5fbd74' );
1651
- $color = apply_filters( 'woosw_color', get_option( 'woosw_color', $color_default ) );
1652
  $custom_css = ".woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-notice { background-color: {$color}; } ";
1653
  $custom_css .= ".woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-popup-content-bot-inner a:hover { color: {$color}; border-color: {$color}; } ";
1654
  wp_add_inline_style( 'woosw-frontend', $custom_css );
@@ -1662,21 +1609,21 @@ if ( ! function_exists( 'woosw_init' ) ) {
1662
  // localize
1663
  wp_localize_script( 'woosw-frontend', 'woosw_vars', array(
1664
  'ajax_url' => admin_url( 'admin-ajax.php' ),
1665
- 'menu_action' => get_option( 'woosw_menu_action', 'open_page' ),
1666
- 'perfect_scrollbar' => get_option( 'woosw_perfect_scrollbar', 'yes' ),
1667
  'wishlist_url' => self::get_url(),
1668
- 'button_action' => get_option( 'woosw_button_action', 'list' ),
1669
- 'message_position' => get_option( 'woosw_message_position', 'right-top' ),
1670
- 'button_action_added' => get_option( 'woosw_button_action_added', 'popup' ),
1671
  'empty_confirm' => self::localization( 'empty_confirm', esc_html__( 'This action cannot be undone. Are you sure?', 'woo-smart-wishlist' ) ),
1672
  'delete_confirm' => self::localization( 'delete_confirm', esc_html__( 'This action cannot be undone. Are you sure?', 'woo-smart-wishlist' ) ),
1673
  'copied_text' => self::localization( 'copied', esc_html__( 'Copied the wishlist link:', 'woo-smart-wishlist' ) ),
1674
  'menu_text' => apply_filters( 'woosw_menu_item_label', self::localization( 'menu_label', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) ) ),
1675
  'button_text' => apply_filters( 'woosw_button_text', self::localization( 'button', esc_html__( 'Add to wishlist', 'woo-smart-wishlist' ) ) ),
1676
  'button_text_added' => apply_filters( 'woosw_button_text_added', self::localization( 'button_added', esc_html__( 'Browse wishlist', 'woo-smart-wishlist' ) ) ),
1677
- 'button_normal_icon' => apply_filters( 'woosw_button_normal_icon', get_option( 'woosw_button_normal_icon', 'woosw-icon-5' ) ),
1678
- 'button_added_icon' => apply_filters( 'woosw_button_added_icon', get_option( 'woosw_button_added_icon', 'woosw-icon-8' ) ),
1679
- 'button_loading_icon' => apply_filters( 'woosw_button_loading_icon', get_option( 'woosw_button_loading_icon', 'woosw-icon-4' ) ),
1680
  )
1681
  );
1682
  }
@@ -1731,8 +1678,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
1731
  function get_items( $key, $layout = null ) {
1732
  ob_start();
1733
 
1734
- $products = get_option( 'woosw_list_' . $key );
1735
- $link = get_option( 'woosw_link', 'yes' );
1736
  $table_tag = $tr_tag = $td_tag = 'div';
1737
 
1738
  if ( $layout === 'table' ) {
@@ -1838,17 +1785,9 @@ if ( ! function_exists( 'woosw_init' ) ) {
1838
  return apply_filters( 'woosw_wishlist_items', ob_get_clean(), $key, $products );
1839
  }
1840
 
1841
- function get_ids( $key = null ) {
1842
- if ( ! $key ) {
1843
- $key = self::get_key();
1844
- }
1845
-
1846
- return get_option( 'woosw_list_' . $key );
1847
- }
1848
-
1849
  function nav_menu_items( $items, $args ) {
1850
  $selected = false;
1851
- $saved_menus = get_option( 'woosw_menus', array() );
1852
 
1853
  if ( ! is_array( $saved_menus ) || empty( $saved_menus ) || ! property_exists( $args, 'menu' ) ) {
1854
  return $items;
@@ -1893,7 +1832,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1893
  return;
1894
  }
1895
 
1896
- echo '<div id="woosw_wishlist" class="woosw-popup ' . esc_attr( 'woosw-popup-' . get_option( 'woosw_popup_position', 'center' ) ) . '"></div>';
1897
  }
1898
 
1899
  function wishlist_content( $key = false, $message = '' ) {
@@ -1901,13 +1840,9 @@ if ( ! function_exists( 'woosw_init' ) ) {
1901
  $key = self::get_key();
1902
  }
1903
 
1904
- if ( $products = get_option( 'woosw_list_' . $key ) ) {
1905
- $count = count( $products );
1906
- } else {
1907
- $count = 0;
1908
- }
1909
-
1910
- $name = self::localization( 'popup_heading', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) );
1911
 
1912
  ob_start();
1913
  ?>
@@ -1919,7 +1854,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
1919
  echo '<span class="woosw-count-wrapper">';
1920
  echo '<span class="woosw-count">' . esc_html( $count ) . '</span>';
1921
 
1922
- if ( get_option( 'woosw_empty_button', 'no' ) === 'yes' ) {
1923
  echo '<span class="woosw-empty"' . ( $count ? '' : ' style="display:none"' ) . '>' . self::localization( 'empty_button', esc_html__( 'remove all', 'woo-smart-wishlist' ) ) . '</span>';
1924
  }
1925
 
@@ -1940,8 +1875,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
1940
  <?php echo self::localization( 'open_page', esc_html__( 'Open wishlist page', 'woo-smart-wishlist' ) ); ?>
1941
  </a>
1942
  <a class="woosw-continue"
1943
- href="<?php echo esc_url( get_option( 'woosw_continue_url' ) ); ?>"
1944
- data-url="<?php echo esc_url( get_option( 'woosw_continue_url' ) ); ?>">
1945
  <?php echo self::localization( 'continue', esc_html__( 'Continue shopping', 'woo-smart-wishlist' ) ); ?>
1946
  </a>
1947
  </div>
@@ -1967,15 +1902,12 @@ if ( ! function_exists( 'woosw_init' ) ) {
1967
  <?php
1968
  $key = get_user_meta( $user_id, 'woosw_key', true );
1969
  $keys = get_user_meta( $user_id, 'woosw_keys', true ) ?: array();
1970
- $max = get_option( 'woosw_maximum_wishlists', '5' );
1971
 
1972
  if ( is_array( $keys ) && ! empty( $keys ) ) {
1973
  foreach ( $keys as $k => $wl ) {
1974
- if ( $products = get_option( 'woosw_list_' . $k ) ) {
1975
- $count = count( $products );
1976
- } else {
1977
- $count = 0;
1978
- }
1979
 
1980
  echo '<tr class="woosw-item">';
1981
  echo '<td>';
@@ -2062,14 +1994,6 @@ if ( ! function_exists( 'woosw_init' ) ) {
2062
  return apply_filters( 'woosw_generate_key', $key );
2063
  }
2064
 
2065
- public static function exists_key( $key ) {
2066
- if ( get_option( 'woosw_list_' . $key ) ) {
2067
- return true;
2068
- }
2069
-
2070
- return false;
2071
- }
2072
-
2073
  public static function can_edit( $key ) {
2074
  if ( is_user_logged_in() ) {
2075
  if ( get_user_meta( get_current_user_id(), 'woosw_key', true ) === $key ) {
@@ -2089,8 +2013,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
2089
  }
2090
 
2091
  public static function get_page_id() {
2092
- if ( get_option( 'woosw_page_id' ) ) {
2093
- return absint( get_option( 'woosw_page_id' ) );
2094
  }
2095
 
2096
  return false;
@@ -2107,7 +2031,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
2107
 
2108
  return $key;
2109
  } else {
2110
- if ( ! is_user_logged_in() && ( get_option( 'woosw_disable_unauthenticated', 'no' ) === 'yes' ) ) {
2111
  return '#';
2112
  }
2113
 
@@ -2145,6 +2069,26 @@ if ( ! function_exists( 'woosw_init' ) ) {
2145
  }
2146
  }
2147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2148
  public static function get_url( $key = null, $full = false ) {
2149
  $url = home_url( '/' );
2150
 
@@ -2172,11 +2116,8 @@ if ( ! function_exists( 'woosw_init' ) ) {
2172
  $key = self::get_key();
2173
  }
2174
 
2175
- if ( ( $key != '' ) && ( $products = get_option( 'woosw_list_' . $key ) ) && is_array( $products ) ) {
2176
- $count = count( $products );
2177
- } else {
2178
- $count = 0;
2179
- }
2180
 
2181
  return esc_html( apply_filters( 'woosw_wishlist_count', $count, $key ) );
2182
  }
@@ -2262,7 +2203,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
2262
  }
2263
 
2264
  function display_post_states( $states, $post ) {
2265
- if ( 'page' == get_post_type( $post->ID ) && $post->ID === absint( get_option( 'woosw_page_id' ) ) ) {
2266
  $states[] = esc_html__( 'Wishlist', 'woo-smart-wishlist' );
2267
  }
2268
 
@@ -2279,8 +2220,10 @@ if ( ! function_exists( 'woosw_init' ) ) {
2279
  if ( $column_name === 'woosw' ) {
2280
  $key = get_user_meta( $user_id, 'woosw_key', true );
2281
 
2282
- if ( ! empty( $key ) && ( $products = get_option( 'woosw_list_' . $key, true ) ) ) {
2283
- if ( is_array( $products ) && ( $count = count( $products ) ) ) {
 
 
2284
  $val = '<a href="#" class="woosw_action" data-key="' . esc_attr( $key ) . '">' . esc_html( $count ) . '</a>';
2285
  }
2286
  }
@@ -2299,7 +2242,7 @@ if ( ! function_exists( 'woosw_init' ) ) {
2299
  ob_start();
2300
 
2301
  $key = sanitize_text_field( $_POST['key'] );
2302
- $products = get_option( 'woosw_list_' . $key, true );
2303
  $count = count( $products );
2304
 
2305
  if ( count( $products ) > 0 ) {
3
  Plugin Name: WPC Smart Wishlist for WooCommerce
4
  Plugin URI: https://wpclever.net/
5
  Description: WPC Smart Wishlist is a simple but powerful tool that can help your customer save products for buy later.
6
+ Version: 4.4.4
7
  Author: WPClever
8
  Author URI: https://wpclever.net
9
  Text Domain: woo-smart-wishlist
16
 
17
  defined( 'ABSPATH' ) || exit;
18
 
19
+ ! defined( 'WOOSW_VERSION' ) && define( 'WOOSW_VERSION', '4.4.4' );
20
  ! defined( 'WOOSW_FILE' ) && define( 'WOOSW_FILE', __FILE__ );
21
  ! defined( 'WOOSW_URI' ) && define( 'WOOSW_URI', plugin_dir_url( __FILE__ ) );
22
  ! defined( 'WOOSW_DIR' ) && define( 'WOOSW_DIR', plugin_dir_path( __FILE__ ) );
48
 
49
  if ( ! class_exists( 'WPCleverWoosw' ) ) {
50
  class WPCleverWoosw {
51
+ protected static $products = array();
52
+ protected static $settings = array();
53
  protected static $localization = array();
54
  protected static $instance = null;
55
 
62
  }
63
 
64
  function __construct() {
65
+ self::$settings = (array) get_option( 'woosw_settings', [] );
66
+ self::$localization = (array) get_option( 'woosw_localization', [] );
67
+
68
  // add query var
69
  add_filter( 'query_vars', [ $this, 'query_vars' ], 1 );
70
  add_action( 'init', [ $this, 'init' ] );
74
  add_action( 'admin_menu', [ $this, 'admin_menu' ] );
75
 
76
  // my account
77
+ if ( self::get_setting( 'page_myaccount', 'yes' ) === 'yes' ) {
78
  add_filter( 'woocommerce_account_menu_items', [ $this, 'account_items' ], 99 );
79
  add_action( 'woocommerce_account_wishlist_endpoint', [ $this, 'account_endpoint' ], 99 );
80
  }
96
  add_action( 'template_redirect', [ $this, 'wishlist_add_by_link' ] );
97
 
98
  // added to cart
99
+ if ( self::get_setting( 'auto_remove', 'no' ) === 'yes' ) {
100
  add_action( 'woocommerce_add_to_cart', [ $this, 'add_to_cart' ], 10, 2 );
101
  }
102
 
164
  }
165
 
166
  function init() {
 
 
 
167
  // get key
168
  $key = isset( $_COOKIE['woosw_key'] ) ? sanitize_text_field( $_COOKIE['woosw_key'] ) : '#';
169
 
170
  // get products
171
+ self::$products = self::get_ids( $key );
172
 
173
  // rewrite
174
  if ( $page_id = self::get_page_id() ) {
180
  }
181
 
182
  // my account page
183
+ if ( self::get_setting( 'page_myaccount', 'yes' ) === 'yes' ) {
184
  add_rewrite_endpoint( 'wishlist', EP_PAGES );
185
  }
186
 
189
  add_shortcode( 'woosw_list', array( $this, 'list_shortcode' ) );
190
 
191
  // add button for archive
192
+ $button_position_archive = apply_filters( 'woosw_button_position_archive', self::get_setting( 'button_position_archive', apply_filters( 'woosw_button_position_archive_default', 'after_add_to_cart' ) ) );
193
 
194
  if ( ! empty( $button_position_archive ) ) {
195
  switch ( $button_position_archive ) {
220
  }
221
 
222
  // add button for single
223
+ $button_position_single = apply_filters( 'woosw_button_position_single', self::get_setting( 'button_position_single', apply_filters( 'woosw_button_position_single_default', '31' ) ) );
224
 
225
  if ( ! empty( $button_position_single ) ) {
226
  if ( is_numeric( $button_position_single ) ) {
237
  }
238
  }
239
 
240
+ public static function get_settings() {
241
+ return apply_filters( 'woosw_get_settings', self::$settings );
242
+ }
243
+
244
+ public static function get_setting( $name, $default = false ) {
245
+ if ( ! empty( self::$settings ) && isset( self::$settings[ $name ] ) ) {
246
+ $setting = self::$settings[ $name ];
247
+ } else {
248
+ $setting = get_option( 'woosw_' . $name, $default );
249
+ }
250
+
251
+ return apply_filters( 'woosw_get_setting', $setting, $name, $default );
252
+ }
253
+
254
+ public static function localization( $key = '', $default = '' ) {
255
  $str = '';
256
 
257
  if ( ! empty( $key ) && ! empty( self::$localization[ $key ] ) ) {
267
  $key = self::get_key();
268
 
269
  if ( $key !== '#' ) {
270
+ $products = self::get_ids( $key );
 
 
 
 
271
 
272
  if ( array_key_exists( $product_id, $products ) ) {
273
  unset( $products[ $product_id ] );
288
 
289
  if ( $product_id ) {
290
  if ( $key !== '#' && $key !== 'WOOSW' ) {
291
+ $products = self::get_ids( $key );
 
 
 
 
292
 
293
  if ( ! array_key_exists( $product_id, $products ) ) {
294
  // insert if not exists
318
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
319
  $return['content'] = self::wishlist_content( $key, self::localization( 'empty_message', esc_html__( 'There are no products on the Wishlist!', 'woo-smart-wishlist' ) ) );
320
  } else {
321
+ $products = self::get_ids( $key );
 
 
 
 
322
 
323
  if ( ! array_key_exists( $product_id, $products ) ) {
324
  // insert if not exists
344
  'fragments' => self::get_fragments(),
345
  );
346
 
347
+ if ( self::get_setting( 'button_action', 'list' ) === 'list' ) {
348
  $return['content'] = self::wishlist_content( $key );
349
  }
350
  }
371
  if ( $key === '#' ) {
372
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
373
  } else {
374
+ $products = self::get_ids( $key );
 
 
 
 
375
 
376
  if ( array_key_exists( $product_id, $products ) ) {
377
  unset( $products[ $product_id ] );
414
  if ( $key === '#' ) {
415
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use the Wishlist!', 'woo-smart-wishlist' ) );
416
  } else {
417
+ if ( ( $products = self::get_ids( $key ) ) && ! empty( $products ) ) {
418
+ foreach ( array_keys( $products ) as $product_id ) {
419
+ // update count
420
+ self::update_product_count( $product_id, 'remove' );
 
 
 
 
421
  }
422
  }
423
 
424
  // remove option
425
+ update_option( 'woosw_list_' . $key, [] );
426
  $return['status'] = 1;
427
  $return['count'] = 0;
428
  $return['notice'] = self::localization( 'empty_notice', esc_html__( 'All products have been removed from the Wishlist!', 'woo-smart-wishlist' ) );
447
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use Wishlist!', 'woo-smart-wishlist' ) );
448
  $return['content'] = self::wishlist_content( $key, self::localization( 'empty_message', esc_html__( 'There are no products on the Wishlist!', 'woo-smart-wishlist' ) ) );
449
  } else {
450
+ $products = self::get_ids( $key );
 
 
 
 
 
451
  $return['status'] = 1;
452
  $return['count'] = count( $products );
453
  $return['content'] = self::wishlist_content( $key );
470
  if ( $key === '#' ) {
471
  $return['notice'] = self::localization( 'login_message', esc_html__( 'Please log in to use Wishlist!', 'woo-smart-wishlist' ) );
472
  } else {
473
+ $products = self::get_ids( $key );
 
 
 
 
 
474
  $return['status'] = 1;
475
  $return['count'] = count( $products );
476
  }
484
  $note = trim( isset( $_POST['note'] ) ? sanitize_text_field( $_POST['note'] ) : '' );
485
  $key = isset( $_POST['woosw_key'] ) ? sanitize_text_field( $_POST['woosw_key'] ) : '';
486
  $product_id = isset( $_POST['product_id'] ) ? (int) sanitize_text_field( $_POST['product_id'] ) : 0;
487
+ $products = self::get_ids( $key );
488
 
489
  if ( isset( $products[ $product_id ] ) ) {
490
  if ( is_array( $products[ $product_id ] ) ) {
524
  if ( $user_id = get_current_user_id() ) {
525
  $key = self::get_key( true );
526
  $keys = get_user_meta( $user_id, 'woosw_keys', true ) ?: array();
527
+ $max = self::get_setting( 'maximum_wishlists', '5' );
528
 
529
  if ( is_array( $keys ) && ( count( $keys ) < (int) $max ) ) {
530
  $keys[ $key ] = array(
578
  }
579
 
580
  function set_default() {
581
+ $return = [];
582
+ $key = trim( isset( $_POST['key'] ) ? sanitize_text_field( $_POST['key'] ) : '' );
583
+ $products = self::get_ids( $key );
584
+ $count = count( $products );
 
 
 
 
 
585
 
586
  if ( ! empty( $key ) && ( $user_id = get_current_user_id() ) ) {
587
  update_user_meta( $user_id, 'woosw_key', $key );
616
 
617
  $attrs = shortcode_atts( array(
618
  'id' => null,
619
+ 'type' => self::get_setting( 'button_type', 'button' )
620
  ), $attrs, 'woosw' );
621
 
622
  if ( ! $attrs['id'] ) {
638
 
639
  if ( $attrs['id'] ) {
640
  // check cats
641
+ $selected_cats = self::get_setting( 'cats', array() );
642
 
643
  if ( ! empty( $selected_cats ) && ( $selected_cats[0] !== '0' ) ) {
644
  if ( ! has_term( $selected_cats, 'product_cat', $attrs['id'] ) ) {
648
 
649
  $class = 'woosw-btn woosw-btn-' . esc_attr( $attrs['id'] );
650
 
651
+ if ( array_key_exists( $attrs['id'], self::$products ) || in_array( $attrs['id'], array_column( self::$products, 'parent' ) ) ) {
652
  $class .= ' woosw-added';
653
+ $icon = apply_filters( 'woosw_button_added_icon', self::get_setting( 'button_added_icon', 'woosw-icon-8' ) );
654
  $text = apply_filters( 'woosw_button_text_added', self::localization( 'button_added', esc_html__( 'Browse wishlist', 'woo-smart-wishlist' ) ) );
655
  } else {
656
+ $icon = apply_filters( 'woosw_button_normal_icon', self::get_setting( 'button_normal_icon', 'woosw-icon-5' ) );
657
  $text = apply_filters( 'woosw_button_text', self::localization( 'button', esc_html__( 'Add to wishlist', 'woo-smart-wishlist' ) ) );
658
  }
659
 
660
+ if ( self::get_setting( 'button_class', '' ) !== '' ) {
661
+ $class .= ' ' . esc_attr( self::get_setting( 'button_class' ) );
662
  }
663
 
664
+ $button_icon = self::get_setting( 'button_icon', 'no' );
665
 
666
  if ( $button_icon !== 'no' ) {
667
  $class .= ' woosw-btn-has-icon';
703
  $return_html .= self::get_items( $key, 'table' );
704
  $return_html .= '<div class="woosw-actions">';
705
 
706
+ if ( self::get_setting( 'page_share', 'yes' ) === 'yes' ) {
707
  $facebook = esc_html__( 'Facebook', 'woo-smart-wishlist' );
708
  $twitter = esc_html__( 'Twitter', 'woo-smart-wishlist' );
709
  $pinterest = esc_html__( 'Pinterest', 'woo-smart-wishlist' );
710
  $mail = esc_html__( 'Mail', 'woo-smart-wishlist' );
711
 
712
+ if ( self::get_setting( 'page_icon', 'yes' ) === 'yes' ) {
713
  $facebook = $twitter = $pinterest = $mail = "<i class='woosw-icon'></i>";
714
  }
715
 
716
+ $share_items = self::get_setting( 'page_items' );
717
 
718
  if ( ! empty( $share_items ) ) {
719
  $return_html .= '<div class="woosw-share">';
726
  }
727
  }
728
 
729
+ if ( self::get_setting( 'page_copy', 'yes' ) === 'yes' ) {
730
  $return_html .= '<div class="woosw-copy">';
731
  $return_html .= '<span class="woosw-copy-label">' . esc_html__( 'Wishlist link:', 'woo-smart-wishlist' ) . '</span>';
732
  $return_html .= '<span class="woosw-copy-url"><input id="woosw_copy_url" type="url" value="' . esc_attr( $share_url_raw ) . '" readonly/></span>';
742
 
743
  function register_settings() {
744
  // settings
745
+ register_setting( 'woosw_settings', 'woosw_settings' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
746
 
747
  // localization
748
  register_setting( 'woosw_localization', 'woosw_localization' );
804
  flush_rewrite_rules();
805
  }
806
 
807
+ $disable_unauthenticated = self::get_setting( 'disable_unauthenticated', 'no' );
808
+ $auto_remove = self::get_setting( 'auto_remove', 'no' );
809
+ $enable_multiple = self::get_setting( 'enable_multiple', 'no' );
810
+ $button_type = self::get_setting( 'button_type', 'button' );
811
+ $button_icon = self::get_setting( 'button_icon', 'no' );
812
+ $button_normal_icon = self::get_setting( 'button_normal_icon', 'woosw-icon-5' );
813
+ $button_added_icon = self::get_setting( 'button_added_icon', 'woosw-icon-8' );
814
+ $button_loading_icon = self::get_setting( 'button_loading_icon', 'woosw-icon-4' );
815
+ $button_action = self::get_setting( 'button_action', 'list' );
816
+ $message_position = self::get_setting( 'message_position', 'right-top' );
817
+ $button_action_added = self::get_setting( 'button_action_added', 'popup' );
818
+ $popup_position = self::get_setting( 'popup_position', 'center' );
819
+ $perfect_scrollbar = self::get_setting( 'perfect_scrollbar', 'yes' );
820
+ $link = self::get_setting( 'link', 'yes' );
821
+ $show_note = self::get_setting( 'show_note', 'no' );
822
+ $empty_button = self::get_setting( 'empty_button', 'no' );
823
+ $page_share = self::get_setting( 'page_share', 'yes' );
824
+ $page_icon = self::get_setting( 'page_icon', 'yes' );
825
+ $page_copy = self::get_setting( 'page_copy', 'yes' );
826
+ $page_myaccount = self::get_setting( 'page_myaccount', 'yes' );
827
+ $menu_action = self::get_setting( 'menu_action', 'open_page' );
828
  ?>
829
  <form method="post" action="options.php">
830
  <table class="form-table">
836
  <tr>
837
  <th scope="row"><?php esc_html_e( 'Disable the wishlist for unauthenticated users', 'woo-smart-wishlist' ); ?></th>
838
  <td>
839
+ <select name="woosw_settings[disable_unauthenticated]">
840
  <option value="yes" <?php selected( $disable_unauthenticated, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
841
  <option value="no" <?php selected( $disable_unauthenticated, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
842
  </select>
845
  <tr>
846
  <th scope="row"><?php esc_html_e( 'Auto remove', 'woo-smart-wishlist' ); ?></th>
847
  <td>
848
+ <select name="woosw_settings[auto_remove]">
849
  <option value="yes" <?php selected( $auto_remove, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
850
  <option value="no" <?php selected( $auto_remove, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
851
  </select>
865
  <tr>
866
  <th scope="row"><?php esc_html_e( 'Enable', 'woo-smart-wishlist' ); ?></th>
867
  <td>
868
+ <select name="woosw_settings[enable_multiple]">
869
  <option value="yes" <?php selected( $enable_multiple, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
870
  <option value="no" <?php selected( $enable_multiple, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
871
  </select>
875
  <tr>
876
  <th scope="row"><?php esc_html_e( 'Maximum wishlists per user', 'woo-smart-wishlist' ); ?></th>
877
  <td>
878
+ <input type="number" min="1" max="100"
879
+ name="woosw_settings[maximum_wishlists]"
880
+ value="<?php echo esc_attr( self::get_setting( 'maximum_wishlists', '5' ) ); ?>"/>
881
  </td>
882
  </tr>
883
  <tr class="heading">
891
  <tr>
892
  <th scope="row"><?php esc_html_e( 'Type', 'woo-smart-wishlist' ); ?></th>
893
  <td>
894
+ <select name="woosw_settings[button_type]">
895
  <option value="button" <?php selected( $button_type, 'button' ); ?>><?php esc_html_e( 'Button', 'woo-smart-wishlist' ); ?></option>
896
  <option value="link" <?php selected( $button_type, 'link' ); ?>><?php esc_html_e( 'Link', 'woo-smart-wishlist' ); ?></option>
897
  </select>
900
  <tr>
901
  <th scope="row"><?php esc_html_e( 'Use icon', 'woo-smart-wishlist' ); ?></th>
902
  <td>
903
+ <select name="woosw_settings[button_icon]">
904
  <option value="left" <?php selected( $button_icon, 'left' ); ?>><?php esc_html_e( 'Icon on the left', 'woo-smart-wishlist' ); ?></option>
905
  <option value="right" <?php selected( $button_icon, 'right' ); ?>><?php esc_html_e( 'Icon on the right', 'woo-smart-wishlist' ); ?></option>
906
  <option value="only" <?php selected( $button_icon, 'only' ); ?>><?php esc_html_e( 'Icon only', 'woo-smart-wishlist' ); ?></option>
911
  <tr class="woosw-show-if-button-icon">
912
  <th><?php esc_html_e( 'Normal icon', 'woo-smart-wishlist' ); ?></th>
913
  <td>
914
+ <select name="woosw_settings[button_normal_icon]"
915
+ class="woosw_icon_picker">
916
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
917
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_normal_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
918
  } ?>
922
  <tr class="woosw-show-if-button-icon">
923
  <th><?php esc_html_e( 'Added icon', 'woo-smart-wishlist' ); ?></th>
924
  <td>
925
+ <select name="woosw_settings[button_added_icon]"
926
+ class="woosw_icon_picker">
927
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
928
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_added_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
929
  } ?>
933
  <tr class="woosw-show-if-button-icon">
934
  <th><?php esc_html_e( 'Loading icon', 'woo-smart-wishlist' ); ?></th>
935
  <td>
936
+ <select name="woosw_settings[button_loading_icon]"
937
+ class="woosw_icon_picker">
938
  <?php for ( $i = 1; $i <= 41; $i ++ ) {
939
  echo '<option value="woosw-icon-' . $i . '" ' . selected( $button_loading_icon, 'woosw-icon-' . $i, false ) . '>woosw-icon-' . $i . '</option>';
940
  } ?>
944
  <tr>
945
  <th scope="row"><?php esc_html_e( 'Action', 'woo-smart-wishlist' ); ?></th>
946
  <td>
947
+ <select name="woosw_settings[button_action]">
948
  <option value="message" <?php selected( $button_action, 'message' ); ?>><?php esc_html_e( 'Show message', 'woo-smart-wishlist' ); ?></option>
949
  <option value="list" <?php selected( $button_action, 'list' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
950
  <option value="no" <?php selected( $button_action, 'no' ); ?>><?php esc_html_e( 'Add to wishlist solely', 'woo-smart-wishlist' ); ?></option>
955
  <tr class="woosw_button_action_hide woosw_button_action_message">
956
  <th scope="row"><?php esc_html_e( 'Message position', 'woo-smart-wishlist' ); ?></th>
957
  <td>
958
+ <select name="woosw_settings[message_position]">
959
  <option value="right-top" <?php selected( $message_position, 'right-top' ); ?>><?php esc_html_e( 'right-top', 'woo-smart-wishlist' ); ?></option>
960
  <option value="right-bottom" <?php selected( $message_position, 'right-bottom' ); ?>><?php esc_html_e( 'right-bottom', 'woo-smart-wishlist' ); ?></option>
961
  <option value="fluid-top" <?php selected( $message_position, 'fluid-top' ); ?>><?php esc_html_e( 'center-top', 'woo-smart-wishlist' ); ?></option>
968
  <tr>
969
  <th scope="row"><?php esc_html_e( 'Action (added)', 'woo-smart-wishlist' ); ?></th>
970
  <td>
971
+ <select name="woosw_settings[button_action_added]">
972
  <option value="popup" <?php selected( $button_action_added, 'popup' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
973
  <option value="page" <?php selected( $button_action_added, 'page' ); ?>><?php esc_html_e( 'Open wishlist page', 'woo-smart-wishlist' ); ?></option>
974
  </select>
978
  <tr>
979
  <th scope="row"><?php esc_html_e( 'Extra class (optional)', 'woo-smart-wishlist' ); ?></th>
980
  <td>
981
+ <input type="text" name="woosw_settings[button_class]"
982
+ class="regular-text"
983
+ value="<?php echo esc_attr( self::get_setting( 'button_class', '' ) ); ?>"/>
984
  <span class="description"><?php esc_html_e( 'Add extra class for action button/link, split by one space.', 'woo-smart-wishlist' ); ?></span>
985
  </td>
986
  </tr>
998
  '0' => esc_html__( 'None (hide it)', 'woo-smart-wishlist' ),
999
  ) );
1000
  ?>
1001
+ <select name="woosw_settings[button_position_archive]" <?php echo( $position_archive !== 'default' ? 'disabled' : '' ); ?>>
1002
  <?php
1003
  if ( $position_archive === 'default' ) {
1004
+ $position_archive = self::get_setting( 'button_position_archive', apply_filters( 'woosw_button_position_archive_default', 'after_add_to_cart' ) );
1005
  }
1006
 
1007
  foreach ( $positions_archive as $k => $p ) {
1027
  '0' => esc_html__( 'None (hide it)', 'woo-smart-wishlist' ),
1028
  ) );
1029
  ?>
1030
+ <select name="woosw_settings[button_position_single]" <?php echo( $position_single !== 'default' ? 'disabled' : '' ); ?>>
1031
  <?php
1032
  if ( $position_single === 'default' ) {
1033
+ $position_single = self::get_setting( 'button_position_single', apply_filters( 'woosw_button_position_single_default', '31' ) );
1034
  }
1035
 
1036
  foreach ( $positions_single as $k => $p ) {
1052
  <th scope="row"><?php esc_html_e( 'Categories', 'woo-smart-wishlist' ); ?></th>
1053
  <td>
1054
  <?php
1055
+ $selected_cats = self::get_setting( 'cats' );
1056
 
1057
  if ( empty( $selected_cats ) ) {
1058
  $selected_cats = array( 0 );
1060
 
1061
  wc_product_dropdown_categories(
1062
  array(
1063
+ 'name' => 'woosw_settings[cats]',
1064
  'hide_empty' => 0,
1065
  'value_field' => 'id',
1066
  'multiple' => true,
1083
  <tr>
1084
  <th scope="row"><?php esc_html_e( 'Position', 'woo-smart-wishlist' ); ?></th>
1085
  <td>
1086
+ <select name="woosw_settings[popup_position]">
1087
  <option value="center" <?php selected( $popup_position, 'center' ); ?>><?php esc_html_e( 'Center', 'woo-smart-wishlist' ); ?></option>
1088
  <option value="right" <?php selected( $popup_position, 'right' ); ?>><?php esc_html_e( 'Right', 'woo-smart-wishlist' ); ?></option>
1089
  <option value="left" <?php selected( $popup_position, 'left' ); ?>><?php esc_html_e( 'Left', 'woo-smart-wishlist' ); ?></option>
1093
  <tr>
1094
  <th scope="row"><?php esc_html_e( 'Use perfect-scrollbar', 'woo-smart-wishlist' ); ?></th>
1095
  <td>
1096
+ <select name="woosw_settings[perfect_scrollbar]">
1097
  <option value="yes" <?php selected( $perfect_scrollbar, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1098
  <option value="no" <?php selected( $perfect_scrollbar, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1099
  </select>
1104
  <th scope="row"><?php esc_html_e( 'Color', 'woo-smart-wishlist' ); ?></th>
1105
  <td>
1106
  <?php $color_default = apply_filters( 'woosw_color_default', '#5fbd74' ); ?>
1107
+ <input type="text" name="woosw_settings[color]"
1108
+ class="woosw_color_picker"
1109
+ value="<?php echo esc_attr( self::get_setting( 'color', $color_default ) ); ?>"/>
1110
  <span class="description"><?php printf( esc_html__( 'Choose the color, default %s', 'woo-smart-wishlist' ), '<code>' . $color_default . '</code>' ); ?></span>
1111
  </td>
1112
  </tr>
1113
  <tr>
1114
  <th><?php esc_html_e( 'Link to individual product', 'woo-smart-wishlist' ); ?></th>
1115
  <td>
1116
+ <select name="woosw_settings[link]">
1117
  <option value="yes" <?php selected( $link, 'yes' ); ?>><?php esc_html_e( 'Yes, open in the same tab', 'woo-smart-wishlist' ); ?></option>
1118
  <option value="yes_blank" <?php selected( $link, 'yes_blank' ); ?>><?php esc_html_e( 'Yes, open in the new tab', 'woo-smart-wishlist' ); ?></option>
1119
  <option value="yes_popup" <?php selected( $link, 'yes_popup' ); ?>><?php esc_html_e( 'Yes, open quick view popup', 'woo-smart-wishlist' ); ?></option>
1127
  <tr>
1128
  <th scope="row"><?php esc_html_e( 'Show note', 'woo-smart-wishlist' ); ?></th>
1129
  <td>
1130
+ <select name="woosw_settings[show_note]">
1131
  <option value="yes" <?php selected( $show_note, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1132
  <option value="no" <?php selected( $show_note, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1133
  </select>
1142
  <tr>
1143
  <th scope="row"><?php esc_html_e( 'Empty wishlist button', 'woo-smart-wishlist' ); ?></th>
1144
  <td>
1145
+ <select name="woosw_settings[empty_button]">
1146
  <option value="yes" <?php selected( $empty_button, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1147
  <option value="no" <?php selected( $empty_button, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1148
  </select>
1152
  <tr>
1153
  <th scope="row"><?php esc_html_e( 'Continue shopping link', 'woo-smart-wishlist' ); ?></th>
1154
  <td>
1155
+ <input type="url" name="woosw_settings[continue_url]"
1156
+ value="<?php echo esc_attr( self::get_setting( 'continue_url' ) ); ?>"
1157
  class="regular-text code"/>
1158
  <span class="description"><?php esc_html_e( 'By default, the wishlist popup will only be closed when customers click on the "Continue Shopping" button.', 'woo-smart-wishlist' ); ?></span>
1159
  </td>
1170
  <th scope="row"><?php esc_html_e( 'Wishlist page', 'woo-smart-wishlist' ); ?></th>
1171
  <td>
1172
  <?php wp_dropdown_pages( array(
1173
+ 'selected' => self::get_setting( 'page_id', '' ),
1174
+ 'name' => 'woosw_settings[page_id]',
1175
  'show_option_none' => esc_html__( 'Choose a page', 'woo-smart-wishlist' ),
1176
  'option_none_value' => '',
1177
  ) ); ?>
1181
  <tr>
1182
  <th scope="row"><?php esc_html_e( 'Share buttons', 'woo-smart-wishlist' ); ?></th>
1183
  <td>
1184
+ <select name="woosw_settings[page_share]">
1185
  <option value="yes" <?php selected( $page_share, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1186
  <option value="no" <?php selected( $page_share, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1187
  </select>
1191
  <tr>
1192
  <th scope="row"><?php esc_html_e( 'Use icon', 'woo-smart-wishlist' ); ?></th>
1193
  <td>
1194
+ <select name="woosw_settings[page_icon]">
1195
  <option value="yes" <?php selected( $page_icon, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1196
  <option value="no" <?php selected( $page_icon, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1197
  </select>
1201
  <th scope="row"><?php esc_html_e( 'Social links', 'woo-smart-wishlist' ); ?></th>
1202
  <td>
1203
  <?php
1204
+ $share_items = self::get_setting( 'page_items' );
1205
 
1206
  if ( empty( $share_items ) ) {
1207
  $share_items = array();
1208
  }
1209
  ?>
1210
+ <select name="woosw_settings[page_items][]" id='woosw_page_items'
1211
+ multiple>
1212
+ <option value="facebook" <?php echo esc_attr( in_array( 'facebook', $share_items ) ? 'selected' : '' ); ?>><?php esc_html_e( 'Facebook', 'woo-smart-wishlist' ); ?></option>
1213
+ <option value="twitter" <?php echo esc_attr( in_array( 'twitter', $share_items ) ? 'selected' : '' ); ?>><?php esc_html_e( 'Twitter', 'woo-smart-wishlist' ); ?></option>
1214
+ <option value="pinterest" <?php echo esc_attr( in_array( 'pinterest', $share_items ) ? 'selected' : '' ); ?>><?php esc_html_e( 'Pinterest', 'woo-smart-wishlist' ); ?></option>
1215
+ <option value="mail" <?php echo esc_attr( in_array( 'mail', $share_items ) ? 'selected' : '' ); ?>><?php esc_html_e( 'Mail', 'woo-smart-wishlist' ); ?></option>
 
 
 
 
 
 
 
1216
  </select>
1217
  </td>
1218
  </tr>
1219
  <tr>
1220
  <th scope="row"><?php esc_html_e( 'Copy link', 'woo-smart-wishlist' ); ?></th>
1221
  <td>
1222
+ <select name="woosw_settings[page_copy]">
1223
  <option value="yes" <?php selected( $page_copy, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1224
  <option value="no" <?php selected( $page_copy, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1225
  </select>
1229
  <tr>
1230
  <th scope="row"><?php esc_html_e( 'Add Wishlist page to My Account', 'woo-smart-wishlist' ); ?></th>
1231
  <td>
1232
+ <select name="woosw_settings[page_myaccount]">
1233
  <option value="yes" <?php selected( $page_myaccount, 'yes' ); ?>><?php esc_html_e( 'Yes', 'woo-smart-wishlist' ); ?></option>
1234
  <option value="no" <?php selected( $page_myaccount, 'no' ); ?>><?php esc_html_e( 'No', 'woo-smart-wishlist' ); ?></option>
1235
  </select>
1252
  'fields' => 'id=>name',
1253
  );
1254
  $nav_menus = get_terms( 'nav_menu', $nav_args );
1255
+ $saved_menus = self::get_setting( 'menus', [] );
1256
 
1257
  foreach ( $nav_menus as $nav_id => $nav_name ) {
1258
+ echo '<input type="checkbox" name="woosw_settings[menus][]" value="' . esc_attr( $nav_id ) . '" ' . ( is_array( $saved_menus ) && in_array( $nav_id, $saved_menus, false ) ? 'checked' : '' ) . '/><label>' . esc_html( $nav_name ) . '</label><br/>';
1259
  }
1260
  ?>
1261
  <span class="description"><?php esc_html_e( 'Choose the menu(s) you want to add the "wishlist menu" at the end.', 'woo-smart-wishlist' ); ?></span>
1264
  <tr>
1265
  <th scope="row"><?php esc_html_e( 'Action', 'woo-smart-wishlist' ); ?></th>
1266
  <td>
1267
+ <select name="woosw_settings[menu_action]">
1268
  <option value="open_page" <?php selected( $menu_action, 'open_page' ); ?>><?php esc_html_e( 'Open wishlist page', 'woo-smart-wishlist' ); ?></option>
1269
  <option value="open_popup" <?php selected( $menu_action, 'open_popup' ); ?>><?php esc_html_e( 'Open wishlist popup', 'woo-smart-wishlist' ); ?></option>
1270
  </select>
1580
 
1581
  function enqueue_scripts() {
1582
  // perfect srollbar
1583
+ if ( self::get_setting( 'perfect_scrollbar', 'yes' ) === 'yes' ) {
1584
  wp_enqueue_style( 'perfect-scrollbar', WOOSW_URI . 'assets/libs/perfect-scrollbar/css/perfect-scrollbar.min.css' );
1585
  wp_enqueue_style( 'perfect-scrollbar-wpc', WOOSW_URI . 'assets/libs/perfect-scrollbar/css/custom-theme.css' );
1586
  wp_enqueue_script( 'perfect-scrollbar', WOOSW_URI . 'assets/libs/perfect-scrollbar/js/perfect-scrollbar.jquery.min.js', array( 'jquery' ), WOOSW_VERSION, true );
1587
  }
1588
 
1589
+ if ( self::get_setting( 'button_action', 'list' ) === 'message' ) {
1590
  wp_enqueue_style( 'notiny', WOOSW_URI . 'assets/libs/notiny/notiny.css' );
1591
  wp_enqueue_script( 'notiny', WOOSW_URI . 'assets/libs/notiny/notiny.js', array( 'jquery' ), WOOSW_VERSION, true );
1592
  }
1595
  wp_enqueue_style( 'woosw-icons', WOOSW_URI . 'assets/css/icons.css', array(), WOOSW_VERSION );
1596
  wp_enqueue_style( 'woosw-frontend', WOOSW_URI . 'assets/css/frontend.css', array(), WOOSW_VERSION );
1597
  $color_default = apply_filters( 'woosw_color_default', '#5fbd74' );
1598
+ $color = apply_filters( 'woosw_color', self::get_setting( 'color', $color_default ) );
1599
  $custom_css = ".woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-notice { background-color: {$color}; } ";
1600
  $custom_css .= ".woosw-popup .woosw-popup-inner .woosw-popup-content .woosw-popup-content-bot .woosw-popup-content-bot-inner a:hover { color: {$color}; border-color: {$color}; } ";
1601
  wp_add_inline_style( 'woosw-frontend', $custom_css );
1609
  // localize
1610
  wp_localize_script( 'woosw-frontend', 'woosw_vars', array(
1611
  'ajax_url' => admin_url( 'admin-ajax.php' ),
1612
+ 'menu_action' => self::get_setting( 'menu_action', 'open_page' ),
1613
+ 'perfect_scrollbar' => self::get_setting( 'perfect_scrollbar', 'yes' ),
1614
  'wishlist_url' => self::get_url(),
1615
+ 'button_action' => self::get_setting( 'button_action', 'list' ),
1616
+ 'message_position' => self::get_setting( 'message_position', 'right-top' ),
1617
+ 'button_action_added' => self::get_setting( 'button_action_added', 'popup' ),
1618
  'empty_confirm' => self::localization( 'empty_confirm', esc_html__( 'This action cannot be undone. Are you sure?', 'woo-smart-wishlist' ) ),
1619
  'delete_confirm' => self::localization( 'delete_confirm', esc_html__( 'This action cannot be undone. Are you sure?', 'woo-smart-wishlist' ) ),
1620
  'copied_text' => self::localization( 'copied', esc_html__( 'Copied the wishlist link:', 'woo-smart-wishlist' ) ),
1621
  'menu_text' => apply_filters( 'woosw_menu_item_label', self::localization( 'menu_label', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) ) ),
1622
  'button_text' => apply_filters( 'woosw_button_text', self::localization( 'button', esc_html__( 'Add to wishlist', 'woo-smart-wishlist' ) ) ),
1623
  'button_text_added' => apply_filters( 'woosw_button_text_added', self::localization( 'button_added', esc_html__( 'Browse wishlist', 'woo-smart-wishlist' ) ) ),
1624
+ 'button_normal_icon' => apply_filters( 'woosw_button_normal_icon', self::get_setting( 'button_normal_icon', 'woosw-icon-5' ) ),
1625
+ 'button_added_icon' => apply_filters( 'woosw_button_added_icon', self::get_setting( 'button_added_icon', 'woosw-icon-8' ) ),
1626
+ 'button_loading_icon' => apply_filters( 'woosw_button_loading_icon', self::get_setting( 'button_loading_icon', 'woosw-icon-4' ) ),
1627
  )
1628
  );
1629
  }
1678
  function get_items( $key, $layout = null ) {
1679
  ob_start();
1680
 
1681
+ $products = self::get_ids( $key );
1682
+ $link = self::get_setting( 'link', 'yes' );
1683
  $table_tag = $tr_tag = $td_tag = 'div';
1684
 
1685
  if ( $layout === 'table' ) {
1785
  return apply_filters( 'woosw_wishlist_items', ob_get_clean(), $key, $products );
1786
  }
1787
 
 
 
 
 
 
 
 
 
1788
  function nav_menu_items( $items, $args ) {
1789
  $selected = false;
1790
+ $saved_menus = self::get_setting( 'menus', [] );
1791
 
1792
  if ( ! is_array( $saved_menus ) || empty( $saved_menus ) || ! property_exists( $args, 'menu' ) ) {
1793
  return $items;
1832
  return;
1833
  }
1834
 
1835
+ echo '<div id="woosw_wishlist" class="woosw-popup ' . esc_attr( 'woosw-popup-' . self::get_setting( 'popup_position', 'center' ) ) . '"></div>';
1836
  }
1837
 
1838
  function wishlist_content( $key = false, $message = '' ) {
1840
  $key = self::get_key();
1841
  }
1842
 
1843
+ $products = self::get_ids( $key );
1844
+ $count = count( $products );
1845
+ $name = self::localization( 'popup_heading', esc_html__( 'Wishlist', 'woo-smart-wishlist' ) );
 
 
 
 
1846
 
1847
  ob_start();
1848
  ?>
1854
  echo '<span class="woosw-count-wrapper">';
1855
  echo '<span class="woosw-count">' . esc_html( $count ) . '</span>';
1856
 
1857
+ if ( self::get_setting( 'empty_button', 'no' ) === 'yes' ) {
1858
  echo '<span class="woosw-empty"' . ( $count ? '' : ' style="display:none"' ) . '>' . self::localization( 'empty_button', esc_html__( 'remove all', 'woo-smart-wishlist' ) ) . '</span>';
1859
  }
1860
 
1875
  <?php echo self::localization( 'open_page', esc_html__( 'Open wishlist page', 'woo-smart-wishlist' ) ); ?>
1876
  </a>
1877
  <a class="woosw-continue"
1878
+ href="<?php echo esc_url( self::get_setting( 'continue_url' ) ); ?>"
1879
+ data-url="<?php echo esc_url( self::get_setting( 'continue_url' ) ); ?>">
1880
  <?php echo self::localization( 'continue', esc_html__( 'Continue shopping', 'woo-smart-wishlist' ) ); ?>
1881
  </a>
1882
  </div>
1902
  <?php
1903
  $key = get_user_meta( $user_id, 'woosw_key', true );
1904
  $keys = get_user_meta( $user_id, 'woosw_keys', true ) ?: array();
1905
+ $max = self::get_setting( 'maximum_wishlists', '5' );
1906
 
1907
  if ( is_array( $keys ) && ! empty( $keys ) ) {
1908
  foreach ( $keys as $k => $wl ) {
1909
+ $products = self::get_ids( $k );
1910
+ $count = count( $products );
 
 
 
1911
 
1912
  echo '<tr class="woosw-item">';
1913
  echo '<td>';
1994
  return apply_filters( 'woosw_generate_key', $key );
1995
  }
1996
 
 
 
 
 
 
 
 
 
1997
  public static function can_edit( $key ) {
1998
  if ( is_user_logged_in() ) {
1999
  if ( get_user_meta( get_current_user_id(), 'woosw_key', true ) === $key ) {
2013
  }
2014
 
2015
  public static function get_page_id() {
2016
+ if ( self::get_setting( 'page_id' ) ) {
2017
+ return absint( self::get_setting( 'page_id' ) );
2018
  }
2019
 
2020
  return false;
2031
 
2032
  return $key;
2033
  } else {
2034
+ if ( ! is_user_logged_in() && ( self::get_setting( 'disable_unauthenticated', 'no' ) === 'yes' ) ) {
2035
  return '#';
2036
  }
2037
 
2069
  }
2070
  }
2071
 
2072
+ public static function exists_key( $key ) {
2073
+ if ( get_option( 'woosw_list_' . $key ) ) {
2074
+ return true;
2075
+ }
2076
+
2077
+ return false;
2078
+ }
2079
+
2080
+ public static function get_ids( $key = null ) {
2081
+ if ( ! $key ) {
2082
+ $key = self::get_key();
2083
+ }
2084
+
2085
+ return (array) get_option( 'woosw_list_' . $key, [] );
2086
+ }
2087
+
2088
+ public static function get_products() {
2089
+ return self::$products;
2090
+ }
2091
+
2092
  public static function get_url( $key = null, $full = false ) {
2093
  $url = home_url( '/' );
2094
 
2116
  $key = self::get_key();
2117
  }
2118
 
2119
+ $products = self::get_ids( $key );
2120
+ $count = count( $products );
 
 
 
2121
 
2122
  return esc_html( apply_filters( 'woosw_wishlist_count', $count, $key ) );
2123
  }
2203
  }
2204
 
2205
  function display_post_states( $states, $post ) {
2206
+ if ( 'page' == get_post_type( $post->ID ) && $post->ID === absint( self::get_setting( 'page_id' ) ) ) {
2207
  $states[] = esc_html__( 'Wishlist', 'woo-smart-wishlist' );
2208
  }
2209
 
2220
  if ( $column_name === 'woosw' ) {
2221
  $key = get_user_meta( $user_id, 'woosw_key', true );
2222
 
2223
+ if ( ! empty( $key ) ) {
2224
+ $products = self::get_ids( $key );
2225
+
2226
+ if ( $count = count( $products ) ) {
2227
  $val = '<a href="#" class="woosw_action" data-key="' . esc_attr( $key ) . '">' . esc_html( $count ) . '</a>';
2228
  }
2229
  }
2242
  ob_start();
2243
 
2244
  $key = sanitize_text_field( $_POST['key'] );
2245
+ $products = self::get_ids( $key );
2246
  $count = count( $products );
2247
 
2248
  if ( count( $products ) > 0 ) {