Flexible Shipping for WooCommerce - Version 3.10.0

Version Description

  • 2020-07-15 =
  • Added ability to test New Table Interface
Download this release

Release Info

Developer wpdesk
Plugin Icon 128x128 Flexible Shipping for WooCommerce
Version 3.10.0
Comparing to
See all releases

Code changes from version 3.9.21 to 3.10.0

Files changed (84) hide show
  1. assets/css/admin.css +525 -253
  2. assets/css/admin.min.css +1 -1
  3. classes/class-flexible-shipping-plugin.php +15 -1
  4. classes/table-rate/flexible-shipping-settings.php +24 -0
  5. classes/table-rate/shipping-method.php +35 -17
  6. classes/table-rate/views/html-shipping-method-rules.php +1 -2
  7. composer.lock +480 -135
  8. flexible-shipping.php +3 -3
  9. readme.txt +4 -1
  10. src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerMessage.php +143 -0
  11. src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerOption.php +77 -0
  12. src/WPDesk/FS/TableRate/NewRulesTablePointer/ShippingMethodNewRuleTableSetting.php +88 -0
  13. src/WPDesk/FS/TableRate/NewRulesTablePointer/views/html-flexible-shipping-settings-script.php +28 -0
  14. src/WPDesk/FS/TableRate/NewRulesTablePointer/views/html-rule-pointer-message.php +13 -0
  15. src/WPDesk/FS/TableRate/NewRulesTableTracker.php +87 -0
  16. src/WPDesk/FS/TableRate/RulesSettingsField.php +63 -0
  17. src/WPDesk/FS/TableRate/UserFeedback.php +53 -0
  18. src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php +280 -0
  19. vendor/autoload.php +1 -1
  20. vendor/composer/autoload_classmap.php +47 -0
  21. vendor/composer/autoload_psr4.php +3 -0
  22. vendor/composer/autoload_real.php +4 -4
  23. vendor/composer/autoload_static.php +69 -4
  24. vendor/composer/installed.json +98 -0
  25. vendor/wpdesk/wp-builder/.editorconfig +21 -0
  26. vendor/wpdesk/wp-builder/.gitignore +3 -0
  27. vendor/wpdesk/wp-builder/.gitlab/issue_templates/Bug.md +32 -0
  28. vendor/wpdesk/wp-builder/CHANGELOG.md +50 -0
  29. vendor/wpdesk/wp-builder/apigen.neon +27 -0
  30. vendor/wpdesk/wp-builder/composer.json +33 -0
  31. vendor/wpdesk/wp-builder/phpcs.xml.dist +18 -0
  32. vendor/wpdesk/wp-builder/phpunit-integration.xml +28 -0
  33. vendor/wpdesk/wp-builder/phpunit-unit.xml +21 -0
  34. vendor/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php +37 -0
  35. vendor/wpdesk/wp-builder/src/Builder/AbstractBuilder.php +64 -0
  36. vendor/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php +82 -0
  37. vendor/wpdesk/wp-builder/src/Builder/InfoBuilder.php +58 -0
  38. vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php +223 -0
  39. vendor/wpdesk/wp-builder/src/Plugin/Activateable.php +21 -0
  40. vendor/wpdesk/wp-builder/src/Plugin/ActivationAware.php +27 -0
  41. vendor/wpdesk/wp-builder/src/Plugin/ActivationTracker.php +75 -0
  42. vendor/wpdesk/wp-builder/src/Plugin/Conditional.php +20 -0
  43. vendor/wpdesk/wp-builder/src/Plugin/Deactivateable.php +21 -0
  44. vendor/wpdesk/wp-builder/src/Plugin/Hookable.php +15 -0
  45. vendor/wpdesk/wp-builder/src/Plugin/HookableCollection.php +24 -0
  46. vendor/wpdesk/wp-builder/src/Plugin/HookableParent.php +59 -0
  47. vendor/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php +24 -0
  48. vendor/wpdesk/wp-builder/src/Plugin/PluginAccess.php +34 -0
  49. vendor/wpdesk/wp-builder/src/Plugin/SlimPlugin.php +20 -0
  50. vendor/wpdesk/wp-builder/src/Plugin/TemplateLoad.php +74 -0
  51. vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php +11 -0
  52. vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php +29 -0
  53. vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php +171 -0
  54. vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php +9 -0
  55. vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php +15 -0
  56. vendor/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php +8 -0
  57. vendor/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php +8 -0
  58. vendor/wpdesk/wp-builder/src/Storage/PluginStorage.php +22 -0
  59. vendor/wpdesk/wp-builder/src/Storage/StaticStorage.php +38 -0
  60. vendor/wpdesk/wp-builder/src/Storage/StorageFactory.php +14 -0
  61. vendor/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php +44 -0
  62. vendor/wpdesk/wp-pointer/CHANGELOG.md +7 -0
  63. vendor/wpdesk/wp-pointer/LICENSE.md +21 -0
  64. vendor/wpdesk/wp-pointer/composer.json +38 -0
  65. vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php +111 -0
  66. vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php +353 -0
  67. vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php +77 -0
  68. vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php +57 -0
  69. vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php +36 -0
  70. vendor_prefixed/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php +19 -1
  71. vendor_prefixed/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php +18 -0
  72. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/composer.json +57 -0
  73. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/AjaxUserFeedbackDataHandler.php +77 -0
  74. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Scripts.php +26 -0
  75. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Thickbox.php +27 -0
  76. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Tracker.php +74 -0
  77. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/TrackerFactory.php +59 -0
  78. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackContent.php +38 -0
  79. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackData.php +100 -0
  80. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackOption.php +66 -0
  81. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/abstract.php +16 -0
  82. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/scripts.php +161 -0
  83. vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/thickbox.php +107 -0
  84. vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php +25 -0
assets/css/admin.css CHANGED
@@ -1,21 +1,21 @@
1
  /* Shipping Methods Table */
2
  table.flexible_shipping_methods th.select,
3
  table.flexible_shipping_methods td.select {
4
- text-align: center;
5
- width: 40px;
6
- margin-top: -7px;
7
- margin-left: -6px;
8
  padding: 2px;
9
  }
10
 
11
  table.flexible_shipping_methods .checkbox-select-all {
12
- margin: 0 12px 0 8px;
13
  }
14
 
15
  table.flexible_shipping_methods th.integration,
16
  table.flexible_shipping_methods td.integration {
17
- text-align: center;
18
- width: 130px;
19
  }
20
 
21
  table.flexible_shipping_methods tr.highlight td {
@@ -28,20 +28,82 @@ table.flexible_shipping_methods.wc_shipping th {
28
  }
29
 
30
  table.flexible_shipping_methods td.ui-sortable-handle:before, table.flexible_shipping_services td.ui-sortable-handle:before {
31
- content: '\f333';
32
- font-family: Dashicons;
33
- text-align: center;
34
- line-height: 1;
35
- color: #999;
36
- display: block;
37
- width: 17px;
38
- float: left;
39
- height: 100%;
40
- line-height: 24px;
41
  }
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  /* Rules Table */
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  table.flexible_shipping_method_rules th, table.flexible_shipping_method_rules th {
46
  padding: 5px 10px 5px 0px;
47
  }
@@ -49,8 +111,8 @@ table.flexible_shipping_method_rules th, table.flexible_shipping_method_rules th
49
  table.flexible_shipping_method_rules td p,
50
  table.flexible_shipping_method_rules td p input,
51
  table.flexible_shipping_method_rules td p select {
52
- margin: 0;
53
- width: 100%;
54
  box-shadow: none;
55
  padding: 0px!important;
56
  }
@@ -71,13 +133,13 @@ table.flexible_shipping_method_rules td p select {
71
  }
72
 
73
  table.flexible_shipping_method_rules td p input[type=checkbox] {
74
- margin: 0;
75
- width: auto;
76
  }
77
 
78
  table.flexible_shipping_method_rules th,
79
  table.flexible_shipping_method_rules td {
80
- text-align: center;
81
  }
82
 
83
  table.flexible_shipping_method_rules th.shipping_class,
@@ -103,7 +165,7 @@ table.flexible_shipping_method_rules td.cancel {
103
  }
104
 
105
  .woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip {
106
- float: none;
107
  margin: 0px;
108
  }
109
 
@@ -117,11 +179,11 @@ table.flexible_shipping_method_rules td.cancel {
117
  }
118
 
119
  .woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip {
120
- float: none;
121
  }
122
 
123
  div.flexilble_shipping_export_import {
124
- float:right;
125
  }
126
 
127
  table.flexible_shipping_method_rules tfoot th {
@@ -140,7 +202,7 @@ table.flexible_shipping_method_rules tfoot th {
140
  /* Flexible Shipping Column - Orders List */
141
 
142
  .column-flexible_shipping {
143
- width: 130px;
144
  }
145
 
146
  .column-flexible_shipping .shipping-status {
@@ -152,13 +214,13 @@ table.flexible_shipping_method_rules tfoot th {
152
  }
153
 
154
  .column-flexible_shipping .shipping-status .created:after {
155
- color: #d0c21f !important;
156
  }
157
 
158
  .column-flexible_shipping .shipping-actions a.button {
159
  float: left;
160
- margin: 0 4px 2px 0;
161
- display: block;
162
  height: 2em !important;
163
  padding: 0 !important;
164
  position: relative;
@@ -203,12 +265,12 @@ table.flexible_shipping_method_rules tfoot th {
203
  }
204
 
205
  .flexible_shipping_shipment_message_error {
206
- color: #a00 !important;
207
  }
208
 
209
  .flexible_shipping_shipment_message_error span {
210
- color: #444;
211
- font-weight: bold;
212
  }
213
 
214
  /** select */
@@ -225,34 +287,34 @@ table.flexible_shipping_method_rules tfoot th {
225
 
226
  /* Info Page */
227
  .inspire-settings {
228
- display: table;
229
- width: 100%;
230
  }
231
 
232
  .inspire-settings .inspire-main-content,
233
  .inspire-settings .inspire-sidebar {
234
- display: table-cell;
235
- height: 500px;
236
- margin: 0;
237
- padding: 0;
238
- vertical-align: top;
239
  }
240
 
241
  .inspire-settings .inspire-main-content {
242
- min-width: 800px;
243
  }
244
 
245
  .inspire-settings .inspire-sidebar {
246
- padding-left: 30px;
247
- width: 250px;
248
  }
249
 
250
  .flexible-shipping-info ol {
251
- margin-top: 0;
252
  }
253
 
254
  #wpbody-content .flexible-shipping-info .metabox-holder {
255
- padding-top: 0;
256
  }
257
 
258
  /* menu */
@@ -264,358 +326,358 @@ table.flexible_shipping_method_rules tfoot th {
264
 
265
  /* Flexible shipping settings */
266
  .fs-new-service {
267
- color: #006799;
268
  }
269
 
270
  /* Order shipping */
271
  .fs-order-item-fallback {
272
- margin-top: .5em;
273
- color: #888;
274
  }
275
 
276
  /* order metabox */
277
  .flexible_shipping_shipment_content p select {
278
- max-width: 95%;
279
  }
280
 
281
  .flexible_shipping_shipment_content span.description {
282
- display: block;
283
  }
284
 
285
  .fs-saas-button-cancel-created {
286
- float: right;
287
- color: #a00;
288
- margin-top: 5px;
289
  }
290
 
291
  .fs-saas-button-cancel-created:hover {
292
- color: #a00;
293
- cursor: pointer;
294
  }
295
 
296
  .flexible_shipping_shipment_content input[type=checkbox] {
297
- float: left;
298
- margin-right: 5px;
299
- margin-top: 2px !important;
300
- opacity: 1;
301
- border-color: #888;
302
  }
303
 
304
  .flexible_shipping_shipment_content input[type=checkbox]:disabled {
305
- opacity: 0.7;
306
- border-color: rgba( 51, 51, 51, 0.5 );
307
  }
308
 
309
  .flexible_shipping_shipment_content p.fs-saas-status {
310
  }
311
 
312
  .flexible_shipping_shipment_content p.fs-saas-status span {
313
- font-weight: bold;
314
- color: #444;
315
  }
316
 
317
  .flexible_shipping_shipment_content p.fs-saas-status-fs-new {
318
- color: #ffba00;
319
  }
320
 
321
  .flexible_shipping_shipment_content p.fs-saas-status-fs-created {
322
- color: #d0c21f;
323
  }
324
 
325
  .flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed {
326
- color: #444;
327
  }
328
 
329
  .flexible_shipping_shipment_content p.fs-saas-status-fs-failed {
330
- color: #a00;
331
  }
332
 
333
  .flexible_shipping_shipment_content p.fs-saas-status-fs-manifest {
334
- color: #2ea2cc;
335
  }
336
 
337
  .flexible_shipping_shipment_content p.connection-error {
338
- font-weight: bold;
339
- color: #a00;
340
  }
341
 
342
  .fs-saas-shipment span {
343
- font-weight: bold;
344
  }
345
 
346
  .fs-saas-charges span {
347
  }
348
 
349
  .fs-saas-labels-counts span {
350
- font-weight: bold;
351
  }
352
 
353
  .fs-saas-no-labels-left {
354
- color: #a00;
355
  }
356
 
357
 
358
  div.flexible-shipping-shipment-attachments p {
359
- display: inline;
360
  }
361
 
362
  .flexible_shipping_shipment_attachment_message {
363
- padding-top: 10px;
364
- color: green;
365
  }
366
 
367
 
368
  table.flexible_shipping_services {
369
- max-width: 550px;
370
  }
371
 
372
  table.flexible_shipping_services .sort {
373
- width: 1%;
374
  }
375
 
376
  table.flexible_shipping_services .service_code {
377
- width: 30px;
378
  }
379
 
380
  table.flexible_shipping_services .select {
381
- text-align: center;
382
- width: 1%;
383
  }
384
 
385
  table.flexible_shipping_services .select input {
386
- margin: 0 8px 0 8px;
387
  }
388
 
389
  .woocommerce table.form-table table.flexible_shipping_services td.service_name input {
390
- width: 100%;
391
  }
392
 
393
  input.woocommerce_flexible_shipping_service_name {
394
- width: 100%;
395
  }
396
 
397
 
398
 
399
  /* Connect Global Notice */
400
  .updated .fs-banner__button-container {
401
- padding: 0.75rem 0 0;
402
  }
403
 
404
  .notice-info.fs-connect__container {
405
- border-left: none;
406
- padding: 0;
407
- box-shadow: 0 0 0 1px #dfdfdf, 0 1px 2px #dfdfdf;
408
  }
409
 
410
  @media screen and (max-width: 782px) {
411
- .notice-info.fs-connect__container {
412
- padding: 0 !important;
413
- }
414
  }
415
 
416
  .fs-connect__container {
417
- display: block;
418
- position: relative;
419
- box-sizing: border-box;
420
  }
421
 
422
  .fs-connect__inner-container > a:first-child {
423
- z-index: 1;
424
  }
425
 
426
  .fs-connect__inner-container {
427
- display: -ms-flexbox;
428
- display: flex;
429
- -ms-flex-direction: row;
430
- flex-direction: row;
431
- -ms-flex-wrap: nowrap;
432
- flex-wrap: nowrap;
433
- -ms-flex-pack: left;
434
- justify-content: left;
435
  }
436
 
437
  .fs-connect__content-container {
438
- width: 1250px;
439
- position: relative;
440
- padding: 2rem;
441
- z-index: 0;
442
  }
443
 
444
  @media (min-width: 782px) {
445
- .fs-connect__content-container {
446
- padding: 2rem 2rem 4rem 2rem;
447
- }
448
  }
449
 
450
  .fs-connect__content-container p {
451
- color: #555;
452
- font-size: 0.875rem;
453
  }
454
 
455
  .fs-connect__content-container h2 {
456
- margin-top: 0;
457
- color: #555;
458
- line-height: 1.6;
459
  }
460
 
461
  .fs-connect__content-icon {
462
- float: right;
463
- margin: 0 1.5rem 0 2.25rem;
464
  }
465
 
466
  .fs-connect__content-icon svg {
467
- fill: #0085ba;
468
- height: 180px;
469
- width: auto;
470
  }
471
 
472
  @media (max-width: 782px) {
473
- .fs-connect__content-icon.fs-connect-illo {
474
- float: none;
475
- width: 100%;
476
- text-align: center;
477
- margin: 2.25rem 0 1.5rem;
478
- }
479
  }
480
 
481
  .fs-connect__slide {
482
- display: none;
483
  }
484
 
485
  .fs-connect__slide.fs__slide-is-active {
486
- display: block;
487
  }
488
 
489
  @media (min-width: 782px) {
490
- .fs-connect__content-container .fs-banner__button-container {
491
- position: absolute;
492
- bottom: 0.5rem;
493
- }
494
  }
495
 
496
  .fs-banner__button-container .button-primary {
497
- margin: 0 0.3125rem 0.3125rem 0;
498
  }
499
 
500
  .fs-connect__vertical-nav {
501
- background-color: #f1f1f1;
502
  }
503
 
504
  @media (min-width: 600px) {
505
- .fs-connect__vertical-nav {
506
- -ms-flex-direction: column;
507
  flex-direction: column;
508
- -ms-flex-pack: start;
509
  justify-content: flex-start;
510
- }
511
  }
512
 
513
  @media (max-width: 600px) {
514
- .fs-connect__vertical-nav {
515
- display: none;
516
- }
517
  }
518
 
519
  .fs-connect__vertical-nav-container {
520
- width: 15rem;
521
  }
522
 
523
  .vertical-menu__feature-item-label {
524
- display: none;
525
  }
526
 
527
  @media (min-width: 600px) {
528
- .vertical-menu__feature-item {
529
- display: -ms-flexbox;
530
- display: flex;
531
- -ms-flex-direction: row;
532
  flex-direction: row;
533
- -ms-flex-align: center;
534
  align-items: center;
535
- border: none;
536
- padding: 0.5rem;
537
- border-bottom: 1px solid #dfdfdf;
538
- border-right: 1px solid #dfdfdf;
539
- border-left: 3px solid #f9f9f9;
540
- background-color: #f9f9f9;
541
- color: #555;
542
- cursor: pointer;
543
- }
544
 
545
- .vertical-menu__feature-item:last-of-type {
546
- position: relative;
547
- top: 1px;
548
- }
549
-
550
- .vertical-menu__feature-item-is-selected {
551
- border-left: 3px solid #0085ba;
552
- border-right: 1px solid #fff;
553
- background-color: #fff;
554
- color: #2e4453;
555
- }
556
-
557
- .vertical-menu__feature-item-is-selected.fs-feature-intro {
558
- border-left: 3px solid #00BE28;
559
- }
560
-
561
- .vertical-menu__feature-item-icon {
562
- width: 1.25rem;
563
- height: 1.25rem;
564
- padding: 0.25rem;
565
- text-align: center;
566
- }
567
 
568
- .vertical-menu__feature-item svg {
569
- fill: #555;
570
- vertical-align: middle;
571
- }
 
 
572
 
573
- .vertical-menu__feature-item-is-selected svg {
574
- fill: #0085ba;
575
- }
576
 
577
- .vertical-menu__feature-item-label {
578
- display: block;
579
- padding: 0.5rem;
580
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
581
  }
582
 
583
  .fs-couriers {
584
- margin-top: 2.5em;
585
  }
586
 
587
  .fs-courier {
588
- position: relative;
589
- margin-bottom: 2.5em;
590
- text-align: center;
591
  }
592
 
593
  .fs-courier img {
594
- height: 50px;
595
- width: auto;
596
  }
597
 
598
  .fs-courier-label {
599
- background-color: #333;
600
- border-radius: 3px;
601
- color: #fff;
602
- padding: 0 4px 1px;
603
- position: absolute;
604
- right: 0;
605
- top: -10px;
606
  }
607
 
608
  @media (min-width: 1200px) {
609
- .fs-couriers {
610
- align-items: center;
611
- display: flex;
612
- flex-wrap: wrap;
613
- justify-content: flex-start;
614
- }
615
 
616
- .fs-courier {
617
- width: 20%;
618
- }
619
  }
620
 
621
  /* Connect Register */
@@ -623,100 +685,100 @@ input.woocommerce_flexible_shipping_service_name {
623
  .admin_page_flexible_shipping_connect_register .update-nag,
624
  .admin_page_flexible_shipping_connect_register .updated,
625
  .admin_page_flexible_shipping_connect_register .settings-error {
626
- display: none !important;
627
  }
628
 
629
  .fs-page-wrap {
630
- margin: 0 auto;
631
- max-width: 45rem;
632
  }
633
 
634
  .fs-page-wrap h1 {
635
- font-weight: normal;
636
- margin-bottom: .67em;
637
- text-align: center;
638
  }
639
 
640
  .fs-box {
641
- display: block;
642
- position: relative;
643
- margin: 0 auto 20px;
644
- padding: 16px;
645
- box-sizing: border-box;
646
- background: white;
647
- box-shadow: 0 0 0 1px #dfdfdf, 0 1px 2px #dfdfdf;
648
  }
649
 
650
  .fs-box:after {
651
- content: ".";
652
- display: block;
653
- height: 0;
654
- clear: both;
655
- visibility: hidden;
656
  }
657
 
658
  .admin_page_flexible_shipping_connect_register .fs-box,
659
  .fs-box.text-center {
660
- text-align: center;
661
  }
662
 
663
  .admin_page_flexible_shipping_connect_register .fs-box p {
664
- margin: 1.5em 0;
665
  }
666
 
667
  .fs-box input[type="email"] {
668
- padding: 8px 10px;
669
  }
670
 
671
  .fs-actions {
672
- padding-left: 40px;
673
  }
674
 
675
  .fs-actions button:active {
676
- vertical-align: inherit !important;
677
  }
678
 
679
  .fs-actions .spinner {
680
- float: none;
681
- margin-top: 0;
682
 
683
  }
684
 
685
  .fs-cols {
686
- display: flex;
687
- flex-wrap: wrap;
688
- justify-content: space-between;
689
  }
690
 
691
  .fs-inner-box {
692
- box-sizing: border-box;
693
- margin-top: 30px;
694
- padding: 0 20px;
695
  }
696
 
697
  .fs-inner-box h4 {
698
- font-size: 1.2em;
699
- margin-bottom: .37em;
700
  }
701
 
702
  .fs-inner-box svg {
703
- fill: #0085ba;
704
- height: 70px;
705
- width: auto;
706
  }
707
 
708
  @media (min-width: 600px) {
709
- .fs-inner-box {
710
- width: 33.33%;
711
- }
712
  }
713
 
714
  .fs-connect-box-header {
715
- margin-top: 3em;
716
  }
717
 
718
  .hide-fs-connect-integration-box {
719
- display: none;
720
  }
721
 
722
  .fs-settings-div table.form-table {
@@ -753,3 +815,213 @@ input.woocommerce_flexible_shipping_service_name {
753
  margin: 0 auto;
754
  width: 110px;
755
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* Shipping Methods Table */
2
  table.flexible_shipping_methods th.select,
3
  table.flexible_shipping_methods td.select {
4
+ text-align: center;
5
+ width: 40px;
6
+ margin-top: -7px;
7
+ margin-left: -6px;
8
  padding: 2px;
9
  }
10
 
11
  table.flexible_shipping_methods .checkbox-select-all {
12
+ margin: 0 12px 0 8px;
13
  }
14
 
15
  table.flexible_shipping_methods th.integration,
16
  table.flexible_shipping_methods td.integration {
17
+ text-align: center;
18
+ width: 130px;
19
  }
20
 
21
  table.flexible_shipping_methods tr.highlight td {
28
  }
29
 
30
  table.flexible_shipping_methods td.ui-sortable-handle:before, table.flexible_shipping_services td.ui-sortable-handle:before {
31
+ content: '\f333';
32
+ font-family: Dashicons;
33
+ text-align: center;
34
+ line-height: 1;
35
+ color: #999;
36
+ display: block;
37
+ width: 17px;
38
+ float: left;
39
+ height: 100%;
40
+ line-height: 24px;
41
  }
42
 
43
+ /* ZmianyMO: POCZĄTEK */
44
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface td {
45
+ padding: 25px 5px;
46
+ vertical-align: middle;
47
+ border: none;
48
+ }
49
+
50
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child( even ) td {
51
+ background: #f9f9f9;
52
+ }
53
+
54
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child( odd ) td.sort {
55
+ background: white;
56
+ }
57
+
58
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface td p.form-row {
59
+ margin-top: 0;
60
+ }
61
+
62
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface .description {
63
+ padding-top: 5px;
64
+ }
65
+
66
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface .form-row {
67
+ padding-right: 5px;
68
+ }
69
+
70
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface .single_rule_condition {
71
+ vertical-align: middle;
72
+ display: flex;
73
+ }
74
+
75
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface tbody .sort {
76
+ padding-top: 27px !important;
77
+ padding-bottom: 23px !important;
78
+ }
79
+ /* ZmianyMO: KONIEC */
80
+
81
  /* Rules Table */
82
 
83
+ .flexible_shipping_method_rules th {
84
+ width: auto;
85
+ }
86
+
87
+ .flexible_shipping_method_rules th.sort {
88
+ width: 10px;
89
+ }
90
+
91
+ td.fs_cost {
92
+ width: 75px!important;
93
+ }
94
+
95
+ div.rule_condition div {
96
+ display: inline-block;
97
+ }
98
+
99
+ div.rule_condition div.based_on {
100
+ width: 70px;
101
+ }
102
+
103
+ div.rule_condition div input {
104
+ width: 70px;
105
+ }
106
+
107
  table.flexible_shipping_method_rules th, table.flexible_shipping_method_rules th {
108
  padding: 5px 10px 5px 0px;
109
  }
111
  table.flexible_shipping_method_rules td p,
112
  table.flexible_shipping_method_rules td p input,
113
  table.flexible_shipping_method_rules td p select {
114
+ margin: 0;
115
+ width: 100%;
116
  box-shadow: none;
117
  padding: 0px!important;
118
  }
133
  }
134
 
135
  table.flexible_shipping_method_rules td p input[type=checkbox] {
136
+ margin: 0;
137
+ width: auto;
138
  }
139
 
140
  table.flexible_shipping_method_rules th,
141
  table.flexible_shipping_method_rules td {
142
+ text-align: center;
143
  }
144
 
145
  table.flexible_shipping_method_rules th.shipping_class,
165
  }
166
 
167
  .woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip {
168
+ float: none;
169
  margin: 0px;
170
  }
171
 
179
  }
180
 
181
  .woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip {
182
+ float: none;
183
  }
184
 
185
  div.flexilble_shipping_export_import {
186
+ float:right;
187
  }
188
 
189
  table.flexible_shipping_method_rules tfoot th {
202
  /* Flexible Shipping Column - Orders List */
203
 
204
  .column-flexible_shipping {
205
+ width: 130px;
206
  }
207
 
208
  .column-flexible_shipping .shipping-status {
214
  }
215
 
216
  .column-flexible_shipping .shipping-status .created:after {
217
+ color: #d0c21f !important;
218
  }
219
 
220
  .column-flexible_shipping .shipping-actions a.button {
221
  float: left;
222
+ margin: 0 4px 2px 0;
223
+ display: block;
224
  height: 2em !important;
225
  padding: 0 !important;
226
  position: relative;
265
  }
266
 
267
  .flexible_shipping_shipment_message_error {
268
+ color: #a00 !important;
269
  }
270
 
271
  .flexible_shipping_shipment_message_error span {
272
+ color: #444;
273
+ font-weight: bold;
274
  }
275
 
276
  /** select */
287
 
288
  /* Info Page */
289
  .inspire-settings {
290
+ display: table;
291
+ width: 100%;
292
  }
293
 
294
  .inspire-settings .inspire-main-content,
295
  .inspire-settings .inspire-sidebar {
296
+ display: table-cell;
297
+ height: 500px;
298
+ margin: 0;
299
+ padding: 0;
300
+ vertical-align: top;
301
  }
302
 
303
  .inspire-settings .inspire-main-content {
304
+ min-width: 800px;
305
  }
306
 
307
  .inspire-settings .inspire-sidebar {
308
+ padding-left: 30px;
309
+ width: 250px;
310
  }
311
 
312
  .flexible-shipping-info ol {
313
+ margin-top: 0;
314
  }
315
 
316
  #wpbody-content .flexible-shipping-info .metabox-holder {
317
+ padding-top: 0;
318
  }
319
 
320
  /* menu */
326
 
327
  /* Flexible shipping settings */
328
  .fs-new-service {
329
+ color: #006799;
330
  }
331
 
332
  /* Order shipping */
333
  .fs-order-item-fallback {
334
+ margin-top: .5em;
335
+ color: #888;
336
  }
337
 
338
  /* order metabox */
339
  .flexible_shipping_shipment_content p select {
340
+ max-width: 95%;
341
  }
342
 
343
  .flexible_shipping_shipment_content span.description {
344
+ display: block;
345
  }
346
 
347
  .fs-saas-button-cancel-created {
348
+ float: right;
349
+ color: #a00;
350
+ margin-top: 5px;
351
  }
352
 
353
  .fs-saas-button-cancel-created:hover {
354
+ color: #a00;
355
+ cursor: pointer;
356
  }
357
 
358
  .flexible_shipping_shipment_content input[type=checkbox] {
359
+ float: left;
360
+ margin-right: 5px;
361
+ margin-top: 2px !important;
362
+ opacity: 1;
363
+ border-color: #888;
364
  }
365
 
366
  .flexible_shipping_shipment_content input[type=checkbox]:disabled {
367
+ opacity: 0.7;
368
+ border-color: rgba( 51, 51, 51, 0.5 );
369
  }
370
 
371
  .flexible_shipping_shipment_content p.fs-saas-status {
372
  }
373
 
374
  .flexible_shipping_shipment_content p.fs-saas-status span {
375
+ font-weight: bold;
376
+ color: #444;
377
  }
378
 
379
  .flexible_shipping_shipment_content p.fs-saas-status-fs-new {
380
+ color: #ffba00;
381
  }
382
 
383
  .flexible_shipping_shipment_content p.fs-saas-status-fs-created {
384
+ color: #d0c21f;
385
  }
386
 
387
  .flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed {
388
+ color: #444;
389
  }
390
 
391
  .flexible_shipping_shipment_content p.fs-saas-status-fs-failed {
392
+ color: #a00;
393
  }
394
 
395
  .flexible_shipping_shipment_content p.fs-saas-status-fs-manifest {
396
+ color: #2ea2cc;
397
  }
398
 
399
  .flexible_shipping_shipment_content p.connection-error {
400
+ font-weight: bold;
401
+ color: #a00;
402
  }
403
 
404
  .fs-saas-shipment span {
405
+ font-weight: bold;
406
  }
407
 
408
  .fs-saas-charges span {
409
  }
410
 
411
  .fs-saas-labels-counts span {
412
+ font-weight: bold;
413
  }
414
 
415
  .fs-saas-no-labels-left {
416
+ color: #a00;
417
  }
418
 
419
 
420
  div.flexible-shipping-shipment-attachments p {
421
+ display: inline;
422
  }
423
 
424
  .flexible_shipping_shipment_attachment_message {
425
+ padding-top: 10px;
426
+ color: green;
427
  }
428
 
429
 
430
  table.flexible_shipping_services {
431
+ max-width: 550px;
432
  }
433
 
434
  table.flexible_shipping_services .sort {
435
+ width: 1%;
436
  }
437
 
438
  table.flexible_shipping_services .service_code {
439
+ width: 30px;
440
  }
441
 
442
  table.flexible_shipping_services .select {
443
+ text-align: center;
444
+ width: 1%;
445
  }
446
 
447
  table.flexible_shipping_services .select input {
448
+ margin: 0 8px 0 8px;
449
  }
450
 
451
  .woocommerce table.form-table table.flexible_shipping_services td.service_name input {
452
+ width: 100%;
453
  }
454
 
455
  input.woocommerce_flexible_shipping_service_name {
456
+ width: 100%;
457
  }
458
 
459
 
460
 
461
  /* Connect Global Notice */
462
  .updated .fs-banner__button-container {
463
+ padding: 0.75rem 0 0;
464
  }
465
 
466
  .notice-info.fs-connect__container {
467
+ border-left: none;
468
+ padding: 0;
469
+ box-shadow: 0 0 0 1px #dfdfdf, 0 1px 2px #dfdfdf;
470
  }
471
 
472
  @media screen and (max-width: 782px) {
473
+ .notice-info.fs-connect__container {
474
+ padding: 0 !important;
475
+ }
476
  }
477
 
478
  .fs-connect__container {
479
+ display: block;
480
+ position: relative;
481
+ box-sizing: border-box;
482
  }
483
 
484
  .fs-connect__inner-container > a:first-child {
485
+ z-index: 1;
486
  }
487
 
488
  .fs-connect__inner-container {
489
+ display: -ms-flexbox;
490
+ display: flex;
491
+ -ms-flex-direction: row;
492
+ flex-direction: row;
493
+ -ms-flex-wrap: nowrap;
494
+ flex-wrap: nowrap;
495
+ -ms-flex-pack: left;
496
+ justify-content: left;
497
  }
498
 
499
  .fs-connect__content-container {
500
+ width: 1250px;
501
+ position: relative;
502
+ padding: 2rem;
503
+ z-index: 0;
504
  }
505
 
506
  @media (min-width: 782px) {
507
+ .fs-connect__content-container {
508
+ padding: 2rem 2rem 4rem 2rem;
509
+ }
510
  }
511
 
512
  .fs-connect__content-container p {
513
+ color: #555;
514
+ font-size: 0.875rem;
515
  }
516
 
517
  .fs-connect__content-container h2 {
518
+ margin-top: 0;
519
+ color: #555;
520
+ line-height: 1.6;
521
  }
522
 
523
  .fs-connect__content-icon {
524
+ float: right;
525
+ margin: 0 1.5rem 0 2.25rem;
526
  }
527
 
528
  .fs-connect__content-icon svg {
529
+ fill: #0085ba;
530
+ height: 180px;
531
+ width: auto;
532
  }
533
 
534
  @media (max-width: 782px) {
535
+ .fs-connect__content-icon.fs-connect-illo {
536
+ float: none;
537
+ width: 100%;
538
+ text-align: center;
539
+ margin: 2.25rem 0 1.5rem;
540
+ }
541
  }
542
 
543
  .fs-connect__slide {
544
+ display: none;
545
  }
546
 
547
  .fs-connect__slide.fs__slide-is-active {
548
+ display: block;
549
  }
550
 
551
  @media (min-width: 782px) {
552
+ .fs-connect__content-container .fs-banner__button-container {
553
+ position: absolute;
554
+ bottom: 0.5rem;
555
+ }
556
  }
557
 
558
  .fs-banner__button-container .button-primary {
559
+ margin: 0 0.3125rem 0.3125rem 0;
560
  }
561
 
562
  .fs-connect__vertical-nav {
563
+ background-color: #f1f1f1;
564
  }
565
 
566
  @media (min-width: 600px) {
567
+ .fs-connect__vertical-nav {
568
+ -ms-flex-direction: column;
569
  flex-direction: column;
570
+ -ms-flex-pack: start;
571
  justify-content: flex-start;
572
+ }
573
  }
574
 
575
  @media (max-width: 600px) {
576
+ .fs-connect__vertical-nav {
577
+ display: none;
578
+ }
579
  }
580
 
581
  .fs-connect__vertical-nav-container {
582
+ width: 15rem;
583
  }
584
 
585
  .vertical-menu__feature-item-label {
586
+ display: none;
587
  }
588
 
589
  @media (min-width: 600px) {
590
+ .vertical-menu__feature-item {
591
+ display: -ms-flexbox;
592
+ display: flex;
593
+ -ms-flex-direction: row;
594
  flex-direction: row;
595
+ -ms-flex-align: center;
596
  align-items: center;
597
+ border: none;
598
+ padding: 0.5rem;
599
+ border-bottom: 1px solid #dfdfdf;
600
+ border-right: 1px solid #dfdfdf;
601
+ border-left: 3px solid #f9f9f9;
602
+ background-color: #f9f9f9;
603
+ color: #555;
604
+ cursor: pointer;
605
+ }
606
 
607
+ .vertical-menu__feature-item:last-of-type {
608
+ position: relative;
609
+ top: 1px;
610
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
 
612
+ .vertical-menu__feature-item-is-selected {
613
+ border-left: 3px solid #0085ba;
614
+ border-right: 1px solid #fff;
615
+ background-color: #fff;
616
+ color: #2e4453;
617
+ }
618
 
619
+ .vertical-menu__feature-item-is-selected.fs-feature-intro {
620
+ border-left: 3px solid #00BE28;
621
+ }
622
 
623
+ .vertical-menu__feature-item-icon {
624
+ width: 1.25rem;
625
+ height: 1.25rem;
626
+ padding: 0.25rem;
627
+ text-align: center;
628
+ }
629
+
630
+ .vertical-menu__feature-item svg {
631
+ fill: #555;
632
+ vertical-align: middle;
633
+ }
634
+
635
+ .vertical-menu__feature-item-is-selected svg {
636
+ fill: #0085ba;
637
+ }
638
+
639
+ .vertical-menu__feature-item-label {
640
+ display: block;
641
+ padding: 0.5rem;
642
+ }
643
  }
644
 
645
  .fs-couriers {
646
+ margin-top: 2.5em;
647
  }
648
 
649
  .fs-courier {
650
+ position: relative;
651
+ margin-bottom: 2.5em;
652
+ text-align: center;
653
  }
654
 
655
  .fs-courier img {
656
+ height: 50px;
657
+ width: auto;
658
  }
659
 
660
  .fs-courier-label {
661
+ background-color: #333;
662
+ border-radius: 3px;
663
+ color: #fff;
664
+ padding: 0 4px 1px;
665
+ position: absolute;
666
+ right: 0;
667
+ top: -10px;
668
  }
669
 
670
  @media (min-width: 1200px) {
671
+ .fs-couriers {
672
+ align-items: center;
673
+ display: flex;
674
+ flex-wrap: wrap;
675
+ justify-content: flex-start;
676
+ }
677
 
678
+ .fs-courier {
679
+ width: 20%;
680
+ }
681
  }
682
 
683
  /* Connect Register */
685
  .admin_page_flexible_shipping_connect_register .update-nag,
686
  .admin_page_flexible_shipping_connect_register .updated,
687
  .admin_page_flexible_shipping_connect_register .settings-error {
688
+ display: none !important;
689
  }
690
 
691
  .fs-page-wrap {
692
+ margin: 0 auto;
693
+ max-width: 45rem;
694
  }
695
 
696
  .fs-page-wrap h1 {
697
+ font-weight: normal;
698
+ margin-bottom: .67em;
699
+ text-align: center;
700
  }
701
 
702
  .fs-box {
703
+ display: block;
704
+ position: relative;
705
+ margin: 0 auto 20px;
706
+ padding: 16px;
707
+ box-sizing: border-box;
708
+ background: white;
709
+ box-shadow: 0 0 0 1px #dfdfdf, 0 1px 2px #dfdfdf;
710
  }
711
 
712
  .fs-box:after {
713
+ content: ".";
714
+ display: block;
715
+ height: 0;
716
+ clear: both;
717
+ visibility: hidden;
718
  }
719
 
720
  .admin_page_flexible_shipping_connect_register .fs-box,
721
  .fs-box.text-center {
722
+ text-align: center;
723
  }
724
 
725
  .admin_page_flexible_shipping_connect_register .fs-box p {
726
+ margin: 1.5em 0;
727
  }
728
 
729
  .fs-box input[type="email"] {
730
+ padding: 8px 10px;
731
  }
732
 
733
  .fs-actions {
734
+ padding-left: 40px;
735
  }
736
 
737
  .fs-actions button:active {
738
+ vertical-align: inherit !important;
739
  }
740
 
741
  .fs-actions .spinner {
742
+ float: none;
743
+ margin-top: 0;
744
 
745
  }
746
 
747
  .fs-cols {
748
+ display: flex;
749
+ flex-wrap: wrap;
750
+ justify-content: space-between;
751
  }
752
 
753
  .fs-inner-box {
754
+ box-sizing: border-box;
755
+ margin-top: 30px;
756
+ padding: 0 20px;
757
  }
758
 
759
  .fs-inner-box h4 {
760
+ font-size: 1.2em;
761
+ margin-bottom: .37em;
762
  }
763
 
764
  .fs-inner-box svg {
765
+ fill: #0085ba;
766
+ height: 70px;
767
+ width: auto;
768
  }
769
 
770
  @media (min-width: 600px) {
771
+ .fs-inner-box {
772
+ width: 33.33%;
773
+ }
774
  }
775
 
776
  .fs-connect-box-header {
777
+ margin-top: 3em;
778
  }
779
 
780
  .hide-fs-connect-integration-box {
781
+ display: none;
782
  }
783
 
784
  .fs-settings-div table.form-table {
815
  margin: 0 auto;
816
  width: 110px;
817
  }
818
+
819
+ /* flexible_shipping_rules */
820
+ table.wc_input_table.flexible_shipping_rules {
821
+ width: auto;
822
+ min-width: 764px;
823
+ }
824
+
825
+ table.wc_input_table.flexible_shipping_rules td {
826
+ padding: 3px 5px;
827
+ }
828
+
829
+ table.wc_input_table.flexible_shipping_rules span.input-wrapper {
830
+ line-height: 2em;
831
+ }
832
+
833
+ table.wc_input_table.flexible_shipping_rules span.input-wrapper input {
834
+ line-height: 2em;
835
+ }
836
+
837
+ table.wc_input_table.flexible_shipping_rules span.input-wrapper select, table.wc_input_table.flexible_shipping_rules p span.woocommerce-input-wrapper select {
838
+ line-height: 2em;
839
+ }
840
+
841
+ table.wc_input_table.flexible_shipping_rules span.input-wrapper label {
842
+ padding-right: 3px;
843
+ padding-left: 3px;
844
+ }
845
+
846
+ table.wc_input_table.flexible_shipping_rules td label {
847
+ padding-right: 3px;
848
+ padding-left: 3px;
849
+ padding-top: 5px;
850
+ }
851
+
852
+ /* ZmianyMO: większy oddech między polami */
853
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface td label {
854
+ padding-right: 10px;
855
+ padding-left: 10px;
856
+ padding-top: 5px;
857
+ }
858
+
859
+ table.wc_input_table.flexible_shipping_rules span.input-wrapper span.description, table.wc_input_table.flexible_shipping_rules p.form-row span.description {
860
+ padding-right: 3px;
861
+ padding-left: 3px;
862
+ vertical-align: middle;
863
+ font-style: normal;
864
+ font-size: 14px;
865
+ }
866
+
867
+ table.wc_input_table.flexible_shipping_rules p.form-row span.description {
868
+ padding-top:4px;
869
+ position: absolute;
870
+ }
871
+
872
+ table.wc_input_table.flexible_shipping_rules td {
873
+ vertical-align: top;
874
+ }
875
+
876
+ table.wc_input_table.flexible_shipping_rules td {
877
+ padding-top: 2px;
878
+ padding-bottom: 2px;
879
+ }
880
+
881
+ table.wc_input_table.flexible_shipping_rules th.sort, table.wc_input_table.flexible_shipping_rules th.sort {
882
+ width: 20px;
883
+ text-align: center;
884
+ }
885
+
886
+ table.wc_input_table.flexible_shipping_rules th.cb, table.wc_input_table.flexible_shipping_rules td.cb {
887
+ width: 20px;
888
+ text-align: center;
889
+ padding: 10px 5px;
890
+ padding-right: 5px!important;
891
+ margin: 0px;
892
+ }
893
+
894
+ table.wc_input_table.flexible_shipping_rules th.cb input, table.wc_input_table.flexible_shipping_rules td.cb input {
895
+ margin: 0px;
896
+ }
897
+
898
+ table.wc_input_table.flexible_shipping_rules th.rule_costs {
899
+ width: 220px;
900
+ }
901
+
902
+ table.wc_input_table.flexible_shipping_rules input[type=text] {
903
+ width:100px!important;
904
+ height:2em!important;
905
+ border: 1px solid;
906
+ }
907
+
908
+ table.wc_input_table.flexible_shipping_rules select {
909
+ width:120px !important;
910
+ height:2em!important;
911
+ border: 1px solid;
912
+ padding: 0 5px;
913
+ }
914
+
915
+ table.wc_input_table.flexible_shipping_rules.fs_new_interface select {
916
+ width:130px !important; /* ZmianyMO: tutaj musi być, jeżeli chcemy dać "is" do środka */
917
+ }
918
+
919
+ table.wc_input_table.flexible_shipping_rules input.cost_additional {
920
+ width: 60px!important;
921
+ min-width: 60px;
922
+ }
923
+
924
+ table.wc_input_table.flexible_shipping_rules input.per_value {
925
+ width: 60px!important;
926
+ min-width: 60px;
927
+ }
928
+
929
+ table.wc_input_table.flexible_shipping_rules td.rule_costs div.input-wrapper.cost_per_order {
930
+ display: block;
931
+ }
932
+
933
+ table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.plus.insert {
934
+ display: inline-block;
935
+ float: right;
936
+ clear: both;
937
+ }
938
+
939
+ table.wc_input_table.flexible_shipping_rules td.rule_costs div.additional_cost_wrapper {
940
+ border-top: 1px solid #dfdfdf;
941
+ margin-top: 2px;
942
+ padding-top: 2px;
943
+ display: block;
944
+ }
945
+
946
+ table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.minus {
947
+ display: inline-block;
948
+ float: right;
949
+ clear: both;
950
+ }
951
+
952
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) {
953
+ border-top: 1px solid #dfdfdf;
954
+ padding-top: 2px;
955
+ margin-top: 2px;
956
+ }
957
+
958
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_field_wrapper {
959
+ display: inline-block;
960
+ }
961
+
962
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper {
963
+ display: inline-block;
964
+ }
965
+
966
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_min {
967
+ width: 60px!important;
968
+ min-width: 60px;
969
+ }
970
+
971
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_max {
972
+ width: 60px!important;
973
+ min-width: 60px;
974
+ }
975
+
976
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition label.condition_field_label {
977
+ width: 55px;
978
+ text-align: right;
979
+ }
980
+
981
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_where {
982
+ display: inline-block;
983
+ }
984
+
985
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_where {
986
+ display: none;
987
+ }
988
+
989
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_and {
990
+ display: none;
991
+ }
992
+
993
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_and {
994
+ display: inline-block;
995
+ }
996
+
997
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.minus {
998
+ float: right;
999
+ }
1000
+
1001
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.plus {
1002
+ float: right;
1003
+ }
1004
+
1005
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child a.minus {
1006
+ display: none;
1007
+ }
1008
+
1009
+ table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) a.plus {
1010
+ display: none;
1011
+ }
1012
+
1013
+ table.wc_input_table.flexible_shipping_rules input.select2-search__field {
1014
+ border: 0px;
1015
+ }
1016
+
1017
+ table.wc_input_table.flexible_shipping_rules td p label span.optional {
1018
+ display: none;
1019
+ }
1020
+
1021
+ table.wc_input_table.flexible_shipping_rules td.rule_conditions {
1022
+ min-width: 465px;
1023
+ }
1024
+
1025
+ table.wc_input_table.flexible_shipping_rules td.rule_conditions div.single_rule_condition p.form-row {
1026
+ display: inline-block;
1027
+ }
assets/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- table.flexible_shipping_methods th.select,table.flexible_shipping_methods td.select{text-align:center;width:40px;margin-top:-7px;margin-left:-6px;padding:2px}table.flexible_shipping_methods .checkbox-select-all{margin:0 12px 0 8px}table.flexible_shipping_methods th.integration,table.flexible_shipping_methods td.integration{text-align:center;width:130px}table.flexible_shipping_methods tr.highlight td{background-color:#e4f2fd}table.flexible_shipping_methods.wc_shipping th{font-weight:400;width:auto}table.flexible_shipping_methods td.ui-sortable-handle:before,table.flexible_shipping_services td.ui-sortable-handle:before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules th{padding:5px 10px 5px 0}table.flexible_shipping_method_rules td p,table.flexible_shipping_method_rules td p input,table.flexible_shipping_method_rules td p select{margin:0;width:100%;box-shadow:none;padding:0 !important}table.flexible_shipping_method_rules td p input[type=text]{text-align:right;padding:0 5px 0 5px !important;width:100% !important}table.flexible_shipping_method_rules td p select{margin:0;width:100% !important;box-shadow:none;line-height:28px;height:37px;vertical-align:middle}table.flexible_shipping_method_rules td p input[type=checkbox]{margin:0;width:auto}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules td{text-align:center}table.flexible_shipping_method_rules th.shipping_class,table.flexible_shipping_method_rules td.shipping_class{text-align:center;width:200px}table.flexible_shipping_method_rules td.shipping_class span{border:0}table.flexible_shipping_method_rules th.stop,table.flexible_shipping_method_rules td.stop{text-align:center;width:30px}table.flexible_shipping_method_rules th.cancel,table.flexible_shipping_method_rules td.cancel{text-align:center;width:60px}.woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip{float:none;margin:0}.woocommerce table.form-table .flexible_shipping_method_rules .select2-container{margin:0}.woocommerce table.form-table .fs-locations-table .select2-container{max-width:none}.woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip{float:none}div.flexilble_shipping_export_import{float:right}table.flexible_shipping_method_rules tfoot th{padding:10px}.woocommerce_page_wc-settings #mainform{position:relative}.column-flexible_shipping{width:130px}.column-flexible_shipping .shipping-status{float:left;margin-right:8px;margin-top:4px;text-align:left;width:18px}.column-flexible_shipping .shipping-status .created:after{color:#d0c21f !important}.column-flexible_shipping .shipping-actions a.button{float:left;margin:0 4px 2px 0;display:block;height:2em !important;padding:0 !important;position:relative;text-indent:-9999px;width:2em}.column-flexible_shipping .shipping-actions a.button:after{font-family:WooCommerce;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.column-flexible_shipping .shipping-actions a.button.get-label:after{content:"\e01e"}.column-flexible_shipping .shipping-actions a.button.track:after{content:"\e01b"}.column-flexible_shipping mark.failed:after{color:#a00 !important}.column-flexible_shipping mark.manifest:after{color:#2ea2cc !important}.flexible_shipping_shipment_message{color:green}.flexible_shipping_shipment_message_error{color:#a00 !important}.flexible_shipping_shipment_message_error span{color:#444;font-weight:bold}.woocommerce .wp-admin select{height:100%}.button.flexible-printing-button-print{height:auto !important;white-space:normal !important;word-wrap:break-word !important}.inspire-settings{display:table;width:100%}.inspire-settings .inspire-main-content,.inspire-settings .inspire-sidebar{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.inspire-settings .inspire-main-content{min-width:800px}.inspire-settings .inspire-sidebar{padding-left:30px;width:250px}.flexible-shipping-info ol{margin-top:0}#wpbody-content .flexible-shipping-info .metabox-holder{padding-top:0}#adminmenu #toplevel_page_flexible-shipping .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce !important;content:'\e01d'}.fs-new-service{color:#006799}.fs-order-item-fallback{margin-top:.5em;color:#888}.flexible_shipping_shipment_content p select{max-width:95%}.flexible_shipping_shipment_content span.description{display:block}.fs-saas-button-cancel-created{float:right;color:#a00;margin-top:5px}.fs-saas-button-cancel-created:hover{color:#a00;cursor:pointer}.flexible_shipping_shipment_content input[type=checkbox]{float:left;margin-right:5px;margin-top:2px !important;opacity:1;border-color:#888}.flexible_shipping_shipment_content input[type=checkbox]:disabled{opacity:.7;border-color:rgba(51,51,51,0.5)}.flexible_shipping_shipment_content p.fs-saas-status span{font-weight:bold;color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-new{color:#ffba00}.flexible_shipping_shipment_content p.fs-saas-status-fs-created{color:#d0c21f}.flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed{color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-failed{color:#a00}.flexible_shipping_shipment_content p.fs-saas-status-fs-manifest{color:#2ea2cc}.flexible_shipping_shipment_content p.connection-error{font-weight:bold;color:#a00}.fs-saas-shipment span{font-weight:bold}.fs-saas-labels-counts span{font-weight:bold}.fs-saas-no-labels-left{color:#a00}div.flexible-shipping-shipment-attachments p{display:inline}.flexible_shipping_shipment_attachment_message{padding-top:10px;color:green}table.flexible_shipping_services{max-width:550px}table.flexible_shipping_services .sort{width:1%}table.flexible_shipping_services .service_code{width:30px}table.flexible_shipping_services .select{text-align:center;width:1%}table.flexible_shipping_services .select input{margin:0 8px 0 8px}.woocommerce table.form-table table.flexible_shipping_services td.service_name input{width:100%}input.woocommerce_flexible_shipping_service_name{width:100%}.updated .fs-banner__button-container{padding:.75rem 0 0}.notice-info.fs-connect__container{border-left:0;padding:0;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}@media screen and (max-width:782px){.notice-info.fs-connect__container{padding:0 !important}}.fs-connect__container{display:block;position:relative;box-sizing:border-box}.fs-connect__inner-container>a:first-child{z-index:1}.fs-connect__inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:left;justify-content:left}.fs-connect__content-container{width:1250px;position:relative;padding:2rem;z-index:0}@media(min-width:782px){.fs-connect__content-container{padding:2rem 2rem 4rem 2rem}}.fs-connect__content-container p{color:#555;font-size:.875rem}.fs-connect__content-container h2{margin-top:0;color:#555;line-height:1.6}.fs-connect__content-icon{float:right;margin:0 1.5rem 0 2.25rem}.fs-connect__content-icon svg{fill:#0085ba;height:180px;width:auto}@media(max-width:782px){.fs-connect__content-icon.fs-connect-illo{float:none;width:100%;text-align:center;margin:2.25rem 0 1.5rem}}.fs-connect__slide{display:none}.fs-connect__slide.fs__slide-is-active{display:block}@media(min-width:782px){.fs-connect__content-container .fs-banner__button-container{position:absolute;bottom:.5rem}}.fs-banner__button-container .button-primary{margin:0 .3125rem .3125rem 0}.fs-connect__vertical-nav{background-color:#f1f1f1}@media(min-width:600px){.fs-connect__vertical-nav{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}}@media(max-width:600px){.fs-connect__vertical-nav{display:none}}.fs-connect__vertical-nav-container{width:15rem}.vertical-menu__feature-item-label{display:none}@media(min-width:600px){.vertical-menu__feature-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:0;padding:.5rem;border-bottom:1px solid #dfdfdf;border-right:1px solid #dfdfdf;border-left:3px solid #f9f9f9;background-color:#f9f9f9;color:#555;cursor:pointer}.vertical-menu__feature-item:last-of-type{position:relative;top:1px}.vertical-menu__feature-item-is-selected{border-left:3px solid #0085ba;border-right:1px solid #fff;background-color:#fff;color:#2e4453}.vertical-menu__feature-item-is-selected.fs-feature-intro{border-left:3px solid #00be28}.vertical-menu__feature-item-icon{width:1.25rem;height:1.25rem;padding:.25rem;text-align:center}.vertical-menu__feature-item svg{fill:#555;vertical-align:middle}.vertical-menu__feature-item-is-selected svg{fill:#0085ba}.vertical-menu__feature-item-label{display:block;padding:.5rem}}.fs-couriers{margin-top:2.5em}.fs-courier{position:relative;margin-bottom:2.5em;text-align:center}.fs-courier img{height:50px;width:auto}.fs-courier-label{background-color:#333;border-radius:3px;color:#fff;padding:0 4px 1px;position:absolute;right:0;top:-10px}@media(min-width:1200px){.fs-couriers{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.fs-courier{width:20%}}.admin_page_flexible_shipping_connect_register .notice.is-dismissible,.admin_page_flexible_shipping_connect_register .update-nag,.admin_page_flexible_shipping_connect_register .updated,.admin_page_flexible_shipping_connect_register .settings-error{display:none !important}.fs-page-wrap{margin:0 auto;max-width:45rem}.fs-page-wrap h1{font-weight:normal;margin-bottom:.67em;text-align:center}.fs-box{display:block;position:relative;margin:0 auto 20px;padding:16px;box-sizing:border-box;background:white;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}.fs-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.admin_page_flexible_shipping_connect_register .fs-box,.fs-box.text-center{text-align:center}.admin_page_flexible_shipping_connect_register .fs-box p{margin:1.5em 0}.fs-box input[type="email"]{padding:8px 10px}.fs-actions{padding-left:40px}.fs-actions button:active{vertical-align:inherit !important}.fs-actions .spinner{float:none;margin-top:0}.fs-cols{display:flex;flex-wrap:wrap;justify-content:space-between}.fs-inner-box{box-sizing:border-box;margin-top:30px;padding:0 20px}.fs-inner-box h4{font-size:1.2em;margin-bottom:.37em}.fs-inner-box svg{fill:#0085ba;height:70px;width:auto}@media(min-width:600px){.fs-inner-box{width:33.33%}}.fs-connect-box-header{margin-top:3em}.hide-fs-connect-integration-box{display:none}.fs-settings-div table.form-table{width:700px;float:left}.fs-flexible-shipping-sidebar{float:right;padding-left:30px;width:300px;margin-top:-100px}@media(max-width:1200px){.fs-flexible-shipping-sidebar{display:none}}.wpdesk-metabox{background-color:#23282d;color:#fff;padding:20px}.wpdesk-metabox .title{color:#fff}.wpdesk-metabox .icon{display:block;margin:0 auto;width:110px}
1
+ table.flexible_shipping_methods th.select,table.flexible_shipping_methods td.select{text-align:center;width:40px;margin-top:-7px;margin-left:-6px;padding:2px}table.flexible_shipping_methods .checkbox-select-all{margin:0 12px 0 8px}table.flexible_shipping_methods th.integration,table.flexible_shipping_methods td.integration{text-align:center;width:130px}table.flexible_shipping_methods tr.highlight td{background-color:#e4f2fd}table.flexible_shipping_methods.wc_shipping th{font-weight:400;width:auto}table.flexible_shipping_methods td.ui-sortable-handle:before,table.flexible_shipping_services td.ui-sortable-handle:before{content:'\f333';font-family:Dashicons;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%;line-height:24px}table.wc_input_table.flexible_shipping_rules.fs_new_interface td{padding:25px 5px;vertical-align:middle;border:0}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(even) td{background:#f9f9f9}table.wc_input_table.flexible_shipping_rules.fs_new_interface tr:nth-child(odd) td.sort{background:white}table.wc_input_table.flexible_shipping_rules.fs_new_interface td p.form-row{margin-top:0}table.wc_input_table.flexible_shipping_rules.fs_new_interface .description{padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .form-row{padding-right:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface .single_rule_condition{vertical-align:middle;display:flex}table.wc_input_table.flexible_shipping_rules.fs_new_interface tbody .sort{padding-top:27px !important;padding-bottom:23px !important}.flexible_shipping_method_rules th{width:auto}.flexible_shipping_method_rules th.sort{width:10px}td.fs_cost{width:75px !important}div.rule_condition div{display:inline-block}div.rule_condition div.based_on{width:70px}div.rule_condition div input{width:70px}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules th{padding:5px 10px 5px 0}table.flexible_shipping_method_rules td p,table.flexible_shipping_method_rules td p input,table.flexible_shipping_method_rules td p select{margin:0;width:100%;box-shadow:none;padding:0 !important}table.flexible_shipping_method_rules td p input[type=text]{text-align:right;padding:0 5px 0 5px !important;width:100% !important}table.flexible_shipping_method_rules td p select{margin:0;width:100% !important;box-shadow:none;line-height:28px;height:37px;vertical-align:middle}table.flexible_shipping_method_rules td p input[type=checkbox]{margin:0;width:auto}table.flexible_shipping_method_rules th,table.flexible_shipping_method_rules td{text-align:center}table.flexible_shipping_method_rules th.shipping_class,table.flexible_shipping_method_rules td.shipping_class{text-align:center;width:200px}table.flexible_shipping_method_rules td.shipping_class span{border:0}table.flexible_shipping_method_rules th.stop,table.flexible_shipping_method_rules td.stop{text-align:center;width:30px}table.flexible_shipping_method_rules th.cancel,table.flexible_shipping_method_rules td.cancel{text-align:center;width:60px}.woocommerce table.form-table .flexible_shipping_method_rules th span.woocommerce-help-tip{float:none;margin:0}.woocommerce table.form-table .flexible_shipping_method_rules .select2-container{margin:0}.woocommerce table.form-table .fs-locations-table .select2-container{max-width:none}.woocommerce table.form-table .fs-locations-table th .woocommerce-help-tip{float:none}div.flexilble_shipping_export_import{float:right}table.flexible_shipping_method_rules tfoot th{padding:10px}.woocommerce_page_wc-settings #mainform{position:relative}.column-flexible_shipping{width:130px}.column-flexible_shipping .shipping-status{float:left;margin-right:8px;margin-top:4px;text-align:left;width:18px}.column-flexible_shipping .shipping-status .created:after{color:#d0c21f !important}.column-flexible_shipping .shipping-actions a.button{float:left;margin:0 4px 2px 0;display:block;height:2em !important;padding:0 !important;position:relative;text-indent:-9999px;width:2em}.column-flexible_shipping .shipping-actions a.button:after{font-family:WooCommerce;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.column-flexible_shipping .shipping-actions a.button.get-label:after{content:"\e01e"}.column-flexible_shipping .shipping-actions a.button.track:after{content:"\e01b"}.column-flexible_shipping mark.failed:after{color:#a00 !important}.column-flexible_shipping mark.manifest:after{color:#2ea2cc !important}.flexible_shipping_shipment_message{color:green}.flexible_shipping_shipment_message_error{color:#a00 !important}.flexible_shipping_shipment_message_error span{color:#444;font-weight:bold}.woocommerce .wp-admin select{height:100%}.button.flexible-printing-button-print{height:auto !important;white-space:normal !important;word-wrap:break-word !important}.inspire-settings{display:table;width:100%}.inspire-settings .inspire-main-content,.inspire-settings .inspire-sidebar{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}.inspire-settings .inspire-main-content{min-width:800px}.inspire-settings .inspire-sidebar{padding-left:30px;width:250px}.flexible-shipping-info ol{margin-top:0}#wpbody-content .flexible-shipping-info .metabox-holder{padding-top:0}#adminmenu #toplevel_page_flexible-shipping .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce !important;content:'\e01d'}.fs-new-service{color:#006799}.fs-order-item-fallback{margin-top:.5em;color:#888}.flexible_shipping_shipment_content p select{max-width:95%}.flexible_shipping_shipment_content span.description{display:block}.fs-saas-button-cancel-created{float:right;color:#a00;margin-top:5px}.fs-saas-button-cancel-created:hover{color:#a00;cursor:pointer}.flexible_shipping_shipment_content input[type=checkbox]{float:left;margin-right:5px;margin-top:2px !important;opacity:1;border-color:#888}.flexible_shipping_shipment_content input[type=checkbox]:disabled{opacity:.7;border-color:rgba(51,51,51,0.5)}.flexible_shipping_shipment_content p.fs-saas-status span{font-weight:bold;color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-new{color:#ffba00}.flexible_shipping_shipment_content p.fs-saas-status-fs-created{color:#d0c21f}.flexible_shipping_shipment_content p.fs-saas-status-fs-confirmed{color:#444}.flexible_shipping_shipment_content p.fs-saas-status-fs-failed{color:#a00}.flexible_shipping_shipment_content p.fs-saas-status-fs-manifest{color:#2ea2cc}.flexible_shipping_shipment_content p.connection-error{font-weight:bold;color:#a00}.fs-saas-shipment span{font-weight:bold}.fs-saas-labels-counts span{font-weight:bold}.fs-saas-no-labels-left{color:#a00}div.flexible-shipping-shipment-attachments p{display:inline}.flexible_shipping_shipment_attachment_message{padding-top:10px;color:green}table.flexible_shipping_services{max-width:550px}table.flexible_shipping_services .sort{width:1%}table.flexible_shipping_services .service_code{width:30px}table.flexible_shipping_services .select{text-align:center;width:1%}table.flexible_shipping_services .select input{margin:0 8px 0 8px}.woocommerce table.form-table table.flexible_shipping_services td.service_name input{width:100%}input.woocommerce_flexible_shipping_service_name{width:100%}.updated .fs-banner__button-container{padding:.75rem 0 0}.notice-info.fs-connect__container{border-left:0;padding:0;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}@media screen and (max-width:782px){.notice-info.fs-connect__container{padding:0 !important}}.fs-connect__container{display:block;position:relative;box-sizing:border-box}.fs-connect__inner-container>a:first-child{z-index:1}.fs-connect__inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:left;justify-content:left}.fs-connect__content-container{width:1250px;position:relative;padding:2rem;z-index:0}@media(min-width:782px){.fs-connect__content-container{padding:2rem 2rem 4rem 2rem}}.fs-connect__content-container p{color:#555;font-size:.875rem}.fs-connect__content-container h2{margin-top:0;color:#555;line-height:1.6}.fs-connect__content-icon{float:right;margin:0 1.5rem 0 2.25rem}.fs-connect__content-icon svg{fill:#0085ba;height:180px;width:auto}@media(max-width:782px){.fs-connect__content-icon.fs-connect-illo{float:none;width:100%;text-align:center;margin:2.25rem 0 1.5rem}}.fs-connect__slide{display:none}.fs-connect__slide.fs__slide-is-active{display:block}@media(min-width:782px){.fs-connect__content-container .fs-banner__button-container{position:absolute;bottom:.5rem}}.fs-banner__button-container .button-primary{margin:0 .3125rem .3125rem 0}.fs-connect__vertical-nav{background-color:#f1f1f1}@media(min-width:600px){.fs-connect__vertical-nav{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}}@media(max-width:600px){.fs-connect__vertical-nav{display:none}}.fs-connect__vertical-nav-container{width:15rem}.vertical-menu__feature-item-label{display:none}@media(min-width:600px){.vertical-menu__feature-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:0;padding:.5rem;border-bottom:1px solid #dfdfdf;border-right:1px solid #dfdfdf;border-left:3px solid #f9f9f9;background-color:#f9f9f9;color:#555;cursor:pointer}.vertical-menu__feature-item:last-of-type{position:relative;top:1px}.vertical-menu__feature-item-is-selected{border-left:3px solid #0085ba;border-right:1px solid #fff;background-color:#fff;color:#2e4453}.vertical-menu__feature-item-is-selected.fs-feature-intro{border-left:3px solid #00be28}.vertical-menu__feature-item-icon{width:1.25rem;height:1.25rem;padding:.25rem;text-align:center}.vertical-menu__feature-item svg{fill:#555;vertical-align:middle}.vertical-menu__feature-item-is-selected svg{fill:#0085ba}.vertical-menu__feature-item-label{display:block;padding:.5rem}}.fs-couriers{margin-top:2.5em}.fs-courier{position:relative;margin-bottom:2.5em;text-align:center}.fs-courier img{height:50px;width:auto}.fs-courier-label{background-color:#333;border-radius:3px;color:#fff;padding:0 4px 1px;position:absolute;right:0;top:-10px}@media(min-width:1200px){.fs-couriers{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.fs-courier{width:20%}}.admin_page_flexible_shipping_connect_register .notice.is-dismissible,.admin_page_flexible_shipping_connect_register .update-nag,.admin_page_flexible_shipping_connect_register .updated,.admin_page_flexible_shipping_connect_register .settings-error{display:none !important}.fs-page-wrap{margin:0 auto;max-width:45rem}.fs-page-wrap h1{font-weight:normal;margin-bottom:.67em;text-align:center}.fs-box{display:block;position:relative;margin:0 auto 20px;padding:16px;box-sizing:border-box;background:white;box-shadow:0 0 0 1px #dfdfdf,0 1px 2px #dfdfdf}.fs-box:after{content:".";display:block;height:0;clear:both;visibility:hidden}.admin_page_flexible_shipping_connect_register .fs-box,.fs-box.text-center{text-align:center}.admin_page_flexible_shipping_connect_register .fs-box p{margin:1.5em 0}.fs-box input[type="email"]{padding:8px 10px}.fs-actions{padding-left:40px}.fs-actions button:active{vertical-align:inherit !important}.fs-actions .spinner{float:none;margin-top:0}.fs-cols{display:flex;flex-wrap:wrap;justify-content:space-between}.fs-inner-box{box-sizing:border-box;margin-top:30px;padding:0 20px}.fs-inner-box h4{font-size:1.2em;margin-bottom:.37em}.fs-inner-box svg{fill:#0085ba;height:70px;width:auto}@media(min-width:600px){.fs-inner-box{width:33.33%}}.fs-connect-box-header{margin-top:3em}.hide-fs-connect-integration-box{display:none}.fs-settings-div table.form-table{width:700px;float:left}.fs-flexible-shipping-sidebar{float:right;padding-left:30px;width:300px;margin-top:-100px}@media(max-width:1200px){.fs-flexible-shipping-sidebar{display:none}}.wpdesk-metabox{background-color:#23282d;color:#fff;padding:20px}.wpdesk-metabox .title{color:#fff}.wpdesk-metabox .icon{display:block;margin:0 auto;width:110px}table.wc_input_table.flexible_shipping_rules{width:auto;min-width:764px}table.wc_input_table.flexible_shipping_rules td{padding:3px 5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper input{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper select,table.wc_input_table.flexible_shipping_rules p span.woocommerce-input-wrapper select{line-height:2em}table.wc_input_table.flexible_shipping_rules span.input-wrapper label{padding-right:3px;padding-left:3px}table.wc_input_table.flexible_shipping_rules td label{padding-right:3px;padding-left:3px;padding-top:5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface td label{padding-right:10px;padding-left:10px;padding-top:5px}table.wc_input_table.flexible_shipping_rules span.input-wrapper span.description,table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-right:3px;padding-left:3px;vertical-align:middle;font-style:normal;font-size:14px}table.wc_input_table.flexible_shipping_rules p.form-row span.description{padding-top:4px;position:absolute}table.wc_input_table.flexible_shipping_rules td{vertical-align:top}table.wc_input_table.flexible_shipping_rules td{padding-top:2px;padding-bottom:2px}table.wc_input_table.flexible_shipping_rules th.sort,table.wc_input_table.flexible_shipping_rules th.sort{width:20px;text-align:center}table.wc_input_table.flexible_shipping_rules th.cb,table.wc_input_table.flexible_shipping_rules td.cb{width:20px;text-align:center;padding:10px 5px;padding-right:5px !important;margin:0}table.wc_input_table.flexible_shipping_rules th.cb input,table.wc_input_table.flexible_shipping_rules td.cb input{margin:0}table.wc_input_table.flexible_shipping_rules th.rule_costs{width:220px}table.wc_input_table.flexible_shipping_rules input[type=text]{width:100px !important;height:2em !important;border:1px solid}table.wc_input_table.flexible_shipping_rules select{width:120px !important;height:2em !important;border:1px solid;padding:0 5px}table.wc_input_table.flexible_shipping_rules.fs_new_interface select{width:130px !important}table.wc_input_table.flexible_shipping_rules input.cost_additional{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules input.per_value{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules td.rule_costs div.input-wrapper.cost_per_order{display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.plus.insert{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules td.rule_costs div.additional_cost_wrapper{border-top:1px solid #dfdfdf;margin-top:2px;padding-top:2px;display:block}table.wc_input_table.flexible_shipping_rules td.rule_costs a.button.minus{display:inline-block;float:right;clear:both}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2){border-top:1px solid #dfdfdf;padding-top:2px;margin-top:2px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_field_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_min{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition div.condition_parameters_wrapper input.parameter_max{width:60px !important;min-width:60px}table.wc_input_table.flexible_shipping_rules div.single_rule_condition label.condition_field_label{width:55px;text-align:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_where{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_where{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child label.condition_field_label_and{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) label.condition_field_label_and{display:inline-block}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.minus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition a.plus{float:right}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:first-child a.minus{display:none}table.wc_input_table.flexible_shipping_rules div.single_rule_condition:nth-child(n+2) a.plus{display:none}table.wc_input_table.flexible_shipping_rules input.select2-search__field{border:0}table.wc_input_table.flexible_shipping_rules td p label span.optional{display:none}table.wc_input_table.flexible_shipping_rules td.rule_conditions{min-width:465px}table.wc_input_table.flexible_shipping_rules td.rule_conditions div.single_rule_condition p.form-row{display:inline-block}
classes/class-flexible-shipping-plugin.php CHANGED
@@ -13,6 +13,7 @@ use FSVendor\WPDesk\PluginBuilder\Plugin\AbstractPlugin;
13
  use FSVendor\WPDesk\PluginBuilder\Plugin\HookableCollection;
14
  use FSVendor\WPDesk\PluginBuilder\Plugin\HookableParent;
15
  use FSVendor\WPDesk\PluginBuilder\Plugin\TemplateLoad;
 
16
  use FSVendor\WPDesk\Tracker\Deactivation\PluginData;
17
  use FSVendor\WPDesk\Tracker\Deactivation\TrackerFactory;
18
  use FSVendor\WPDesk\View\Resolver\ChainResolver;
@@ -21,6 +22,10 @@ use FSVendor\WPDesk\View\Resolver\WPThemeResolver;
21
  use FSVendor\WPDesk\WooCommerce\CurrencySwitchers\ShippingIntegrations;
22
  use Psr\Log\LoggerInterface;
23
  use Psr\Log\NullLogger;
 
 
 
 
24
 
25
  /**
26
  * Class Flexible_Shipping_Plugin
@@ -42,7 +47,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
42
  *
43
  * @var string
44
  */
45
- private $scripts_version = FLEXIBLE_SHIPPING_VERSION . '.205';
46
 
47
  /**
48
  * Admin notices.
@@ -170,6 +175,15 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
170
 
171
  $this->add_hookable( new WPDesk_Flexible_Shipping_Order_Item_Meta() );
172
 
 
 
 
 
 
 
 
 
 
173
  $this->init_contextual_info();
174
 
175
  }
13
  use FSVendor\WPDesk\PluginBuilder\Plugin\HookableCollection;
14
  use FSVendor\WPDesk\PluginBuilder\Plugin\HookableParent;
15
  use FSVendor\WPDesk\PluginBuilder\Plugin\TemplateLoad;
16
+ use FSVendor\WPDesk\Pointer\PointersScripts;
17
  use FSVendor\WPDesk\Tracker\Deactivation\PluginData;
18
  use FSVendor\WPDesk\Tracker\Deactivation\TrackerFactory;
19
  use FSVendor\WPDesk\View\Resolver\ChainResolver;
22
  use FSVendor\WPDesk\WooCommerce\CurrencySwitchers\ShippingIntegrations;
23
  use Psr\Log\LoggerInterface;
24
  use Psr\Log\NullLogger;
25
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerMessage;
26
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerOption;
27
+ use WPDesk\FS\TableRate\NewRulesTableTracker;
28
+ use WPDesk\FS\TableRate\UserFeedback;
29
 
30
  /**
31
  * Class Flexible_Shipping_Plugin
47
  *
48
  * @var string
49
  */
50
+ private $scripts_version = FLEXIBLE_SHIPPING_VERSION . '.208';
51
 
52
  /**
53
  * Admin notices.
175
 
176
  $this->add_hookable( new WPDesk_Flexible_Shipping_Order_Item_Meta() );
177
 
178
+ $rules_pointer_option = new RulesPointerOption();
179
+ $this->add_hookable( $rules_pointer_option );
180
+
181
+ $this->add_hookable( new RulesPointerMessage( $rules_pointer_option ) );
182
+
183
+ $this->add_hookable( new NewRulesTableTracker() );
184
+
185
+ $this->add_hookable( new UserFeedback() );
186
+
187
  $this->init_contextual_info();
188
 
189
  }
classes/table-rate/flexible-shipping-settings.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  /**
4
  * Mainly read only info about FS + debug mode.
5
  */
@@ -18,6 +20,11 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
18
  */
19
  private $logger_settings;
20
 
 
 
 
 
 
21
  /**
22
  * WPDesk_Flexible_Shipping_Connect constructor.
23
  *
@@ -38,6 +45,8 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
38
 
39
  $this->logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings( $this );
40
 
 
 
41
  $this->init_form_fields();
42
 
43
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
@@ -54,6 +63,7 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
54
  * Process admin options.
55
  */
56
  public function process_admin_options() {
 
57
  parent::process_admin_options();
58
  $this->update_debug_mode();
59
 
@@ -96,6 +106,8 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
96
  );
97
  $this->form_fields = $this->logger_settings->add_fields_to_settings( $this->form_fields );
98
 
 
 
99
  }
100
 
101
  /**
@@ -115,4 +127,16 @@ class WPDesk_Flexible_Shipping_Settings extends WC_Shipping_Method {
115
  return $notice_content;
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
1
  <?php
2
 
3
+ use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
4
+
5
  /**
6
  * Mainly read only info about FS + debug mode.
7
  */
20
  */
21
  private $logger_settings;
22
 
23
+ /**
24
+ * @var ShippingMethodNewRuleTableSetting
25
+ */
26
+ private $new_rules_table_settings;
27
+
28
  /**
29
  * WPDesk_Flexible_Shipping_Connect constructor.
30
  *
45
 
46
  $this->logger_settings = new WPDesk_Flexible_Shipping_Logger_Settings( $this );
47
 
48
+ $this->new_rules_table_settings = new ShippingMethodNewRuleTableSetting();
49
+
50
  $this->init_form_fields();
51
 
52
  add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
63
  * Process admin options.
64
  */
65
  public function process_admin_options() {
66
+ $this->new_rules_table_settings->watch_settings_change();
67
  parent::process_admin_options();
68
  $this->update_debug_mode();
69
 
106
  );
107
  $this->form_fields = $this->logger_settings->add_fields_to_settings( $this->form_fields );
108
 
109
+ $this->form_fields = $this->new_rules_table_settings->add_fields_to_settings( $this->form_fields );
110
+
111
  }
112
 
113
  /**
127
  return $notice_content;
128
  }
129
 
130
+ public function generate_settings_html( $form_fields = array(), $echo = \true ) {
131
+ $html = parent::generate_settings_html( $form_fields, $echo );
132
+ ob_start();
133
+ $this->new_rules_table_settings->settings_script();
134
+ $html .= ob_get_clean();
135
+ if ( $echo ) {
136
+ echo $html;
137
+ } else {
138
+ return $html;
139
+ }
140
+ }
141
+
142
  }
classes/table-rate/shipping-method.php CHANGED
@@ -1,6 +1,9 @@
1
  <?php
2
 
3
  use FSVendor\WPDesk\Beacon\Beacon\WooCommerceSettingsFieldsModifier;
 
 
 
4
 
5
  class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
6
 
@@ -10,6 +13,8 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
10
 
11
  const WEIGHT_ROUNDING_PRECISION = 6;
12
 
 
 
13
  /**
14
  * Message added.
15
  *
@@ -183,16 +188,29 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
183
  return $ret;
184
  }
185
 
 
 
 
 
 
186
  public function generate_shipping_rules_html( $key, $data ) {
187
  if ( ! function_exists( 'woocommerce_form_field' ) ) {
188
- $wc_template_functions = trailingslashit( dirname( __FILE__) ) . '../../woocommerce/includes/wc-template-functions.php';
189
  if ( file_exists( $wc_template_functions ) ) {
190
- include_once( $wc_template_functions );
191
  }
192
  }
193
- ob_start();
194
- include ( 'views/html-shipping-method-rules.php' );
195
- return ob_get_clean();
 
 
 
 
 
 
 
 
196
  }
197
 
198
  public function shipping_method_title_used( $title, $shipping_methods ) {
@@ -275,18 +293,18 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
275
  //
276
  $shipping_method = apply_filters( 'flexible_shipping_process_admin_options', $shipping_method );
277
  //
278
- $count = 0;
279
- $shipping_method['method_rules'] = array();
280
- if ( isset( $_POST['method_rules'] ) ) {
281
- foreach ( $_POST['method_rules'] as $rule ) {
282
  $count++;
283
- $method_rule = array();
284
- $method_rule['based_on'] = sanitize_text_field( wp_unslash( $rule['based_on'] ) );
285
- $method_rule['min'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['min'] ) ) );
286
- $method_rule['max'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['max'] ) ) );
287
- $method_rule['cost_per_order'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['cost_per_order'] ) ) );
288
- $method_rule = apply_filters( 'flexible_shipping_method_rule_save', $method_rule, $rule );
289
- $shipping_method['method_rules'][$count] = $method_rule;
290
  }
291
  }
292
  //
@@ -568,7 +586,7 @@ class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
568
  continue;
569
  }
570
 
571
- foreach ( $shipping_method['method_rules'] as $rule_key => $method_rule ) {
572
  $rule_triggered = false;
573
 
574
  if ( $method_rule['based_on'] == 'none' ) {
1
  <?php
2
 
3
  use FSVendor\WPDesk\Beacon\Beacon\WooCommerceSettingsFieldsModifier;
4
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerOption;
5
+ use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
6
+ use WPDesk\FS\TableRate\RulesSettingsField;
7
 
8
  class WPDesk_Flexible_Shipping extends WC_Shipping_Method {
9
 
13
 
14
  const WEIGHT_ROUNDING_PRECISION = 6;
15
 
16
+ const SETTING_METHOD_RULES = 'method_rules';
17
+
18
  /**
19
  * Message added.
20
  *
188
  return $ret;
189
  }
190
 
191
+ private function should_show_new_rules_table() {
192
+ $new_rule_table_setting = new ShippingMethodNewRuleTableSetting();
193
+ return ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) && $new_rule_table_setting->is_enabled();
194
+ }
195
+
196
  public function generate_shipping_rules_html( $key, $data ) {
197
  if ( ! function_exists( 'woocommerce_form_field' ) ) {
198
+ $wc_template_functions = trailingslashit( dirname( __FILE__ ) ) . '../../woocommerce/includes/wc-template-functions.php';
199
  if ( file_exists( $wc_template_functions ) ) {
200
+ include_once $wc_template_functions;
201
  }
202
  }
203
+ if ( $this->should_show_new_rules_table() ) {
204
+ $field_key = $this->get_field_key( $key );
205
+ $rules_settings = new RulesSettingsField( $key, $this->get_field_key( $key ), self::SETTING_METHOD_RULES, $data );
206
+ return $rules_settings->render();
207
+ } else {
208
+ ob_start();
209
+ $show_new_rules_table_switch_link = get_option( RulesPointerOption::OPTION_NAME, '0' ) === '1' && get_option( ShippingMethodNewRuleTableSetting::OPTION_NEW_RULES_DISABLED, '0' ) === '0';
210
+ include( 'views/html-shipping-method-rules.php' );
211
+
212
+ return ob_get_clean();
213
+ }
214
  }
215
 
216
  public function shipping_method_title_used( $title, $shipping_methods ) {
293
  //
294
  $shipping_method = apply_filters( 'flexible_shipping_process_admin_options', $shipping_method );
295
  //
296
+ $count = 0;
297
+ $shipping_method[ self::SETTING_METHOD_RULES ] = array();
298
+ if ( isset( $_POST[ self::SETTING_METHOD_RULES ] ) ) {
299
+ foreach ( $_POST[ self::SETTING_METHOD_RULES ] as $rule ) {
300
  $count++;
301
+ $method_rule = array();
302
+ $method_rule['based_on'] = sanitize_text_field( wp_unslash( $rule['based_on'] ) );
303
+ $method_rule['min'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['min'] ) ) );
304
+ $method_rule['max'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['max'] ) ) );
305
+ $method_rule['cost_per_order'] = wc_format_decimal( sanitize_text_field( wp_unslash( $rule['cost_per_order'] ) ) );
306
+ $method_rule = apply_filters( 'flexible_shipping_method_rule_save', $method_rule, $rule );
307
+ $shipping_method[ self::SETTING_METHOD_RULES ][$count] = $method_rule;
308
  }
309
  }
310
  //
586
  continue;
587
  }
588
 
589
+ foreach ( $shipping_method[ self::SETTING_METHOD_RULES ] as $rule_key => $method_rule ) {
590
  $rule_triggered = false;
591
 
592
  if ( $method_rule['based_on'] == 'none' ) {
classes/table-rate/views/html-shipping-method-rules.php CHANGED
@@ -64,8 +64,7 @@
64
 
65
  <tr valign="top" class="flexible_shipping_method_rules">
66
  <th class="forminp" colspan="2">
67
- <label for="<?php echo esc_attr( $field ); ?>"><?php echo $data['title']; ?></label>
68
-
69
  <?php
70
  $fs_pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://flexibleshipping.com/table-rate/';
71
 
64
 
65
  <tr valign="top" class="flexible_shipping_method_rules">
66
  <th class="forminp" colspan="2">
67
+ <label for="<?php echo esc_attr( $field ); ?>"><span id="<?php echo esc_attr( $field . '_label' ); ?>"><?php echo $data['title']; ?></span></label>
 
68
  <?php
69
  $fs_pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://flexibleshipping.com/table-rate/';
70
 
composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "d32f5379484810b7dc4df96ecd48177c",
8
  "packages": [
9
  {
10
  "name": "psr/log",
@@ -53,6 +53,100 @@
53
  ],
54
  "time": "2020-03-23T09:12:05+00:00"
55
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  {
57
  "name": "wpdesk/wp-wpdesk-helper-override",
58
  "version": "1.1.0",
@@ -315,6 +409,12 @@
315
  "functional testing",
316
  "unit testing"
317
  ],
 
 
 
 
 
 
318
  "time": "2020-06-07T16:31:51+00:00"
319
  },
320
  {
@@ -938,20 +1038,30 @@
938
  "ssl",
939
  "tls"
940
  ],
 
 
 
 
 
 
 
 
 
 
941
  "time": "2020-04-08T08:27:21+00:00"
942
  },
943
  {
944
  "name": "composer/composer",
945
- "version": "1.10.7",
946
  "source": {
947
  "type": "git",
948
  "url": "https://github.com/composer/composer.git",
949
- "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
950
  },
951
  "dist": {
952
  "type": "zip",
953
- "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
954
- "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
955
  "shasum": ""
956
  },
957
  "require": {
@@ -970,12 +1080,11 @@
970
  "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
971
  },
972
  "conflict": {
973
- "symfony/console": "2.8.38",
974
- "symfony/phpunit-bridge": "3.4.40"
975
  },
976
  "require-dev": {
977
  "phpspec/prophecy": "^1.10",
978
- "symfony/phpunit-bridge": "^3.4"
979
  },
980
  "suggest": {
981
  "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -1019,7 +1128,21 @@
1019
  "dependency",
1020
  "package"
1021
  ],
1022
- "time": "2020-06-03T08:03:56+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1023
  },
1024
  {
1025
  "name": "composer/semver",
@@ -1184,6 +1307,20 @@
1184
  "Xdebug",
1185
  "performance"
1186
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
  "time": "2020-06-04T11:16:35+00:00"
1188
  },
1189
  {
@@ -2068,16 +2205,16 @@
2068
  },
2069
  {
2070
  "name": "lucatume/wp-browser",
2071
- "version": "2.6.2",
2072
  "source": {
2073
  "type": "git",
2074
  "url": "https://github.com/lucatume/wp-browser.git",
2075
- "reference": "83fc32b65ba4720ba07c41109cc5d9348085d210"
2076
  },
2077
  "dist": {
2078
  "type": "zip",
2079
- "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/83fc32b65ba4720ba07c41109cc5d9348085d210",
2080
- "reference": "83fc32b65ba4720ba07c41109cc5d9348085d210",
2081
  "shasum": ""
2082
  },
2083
  "require": {
@@ -2147,7 +2284,7 @@
2147
  "codeception",
2148
  "wordpress"
2149
  ],
2150
- "time": "2020-06-19T08:46:27+00:00"
2151
  },
2152
  {
2153
  "name": "matthiasmullie/minify",
@@ -2260,16 +2397,16 @@
2260
  },
2261
  {
2262
  "name": "mck89/peast",
2263
- "version": "v1.10.3",
2264
  "source": {
2265
  "type": "git",
2266
  "url": "https://github.com/mck89/peast.git",
2267
- "reference": "6d1100f39f684c9e004f808b27f6c824b083d8d8"
2268
  },
2269
  "dist": {
2270
  "type": "zip",
2271
- "url": "https://api.github.com/repos/mck89/peast/zipball/6d1100f39f684c9e004f808b27f6c824b083d8d8",
2272
- "reference": "6d1100f39f684c9e004f808b27f6c824b083d8d8",
2273
  "shasum": ""
2274
  },
2275
  "require": {
@@ -2281,7 +2418,7 @@
2281
  "type": "library",
2282
  "extra": {
2283
  "branch-alias": {
2284
- "dev-master": "1.10.3-dev"
2285
  }
2286
  },
2287
  "autoload": {
@@ -2301,7 +2438,7 @@
2301
  }
2302
  ],
2303
  "description": "Peast is PHP library that generates AST for JavaScript code",
2304
- "time": "2020-04-03T09:06:20+00:00"
2305
  },
2306
  {
2307
  "name": "mikemclin/laravel-wp-password",
@@ -2589,6 +2726,16 @@
2589
  "logging",
2590
  "psr-3"
2591
  ],
 
 
 
 
 
 
 
 
 
 
2592
  "time": "2020-05-22T07:31:27+00:00"
2593
  },
2594
  {
@@ -3093,6 +3240,16 @@
3093
  "php",
3094
  "type"
3095
  ],
 
 
 
 
 
 
 
 
 
 
3096
  "time": "2020-06-07T10:40:07+00:00"
3097
  },
3098
  {
@@ -4297,6 +4454,16 @@
4297
  "parser",
4298
  "validator"
4299
  ],
 
 
 
 
 
 
 
 
 
 
4300
  "time": "2020-04-30T19:05:18+00:00"
4301
  },
4302
  {
@@ -4449,6 +4616,20 @@
4449
  ],
4450
  "description": "Symfony BrowserKit Component",
4451
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4452
  "time": "2020-04-27T06:55:12+00:00"
4453
  },
4454
  {
@@ -4521,6 +4702,20 @@
4521
  ],
4522
  "description": "Symfony Console Component",
4523
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4524
  "time": "2020-05-30T18:58:05+00:00"
4525
  },
4526
  {
@@ -4574,6 +4769,20 @@
4574
  ],
4575
  "description": "Symfony CssSelector Component",
4576
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4577
  "time": "2020-03-16T08:31:04+00:00"
4578
  },
4579
  {
@@ -4630,6 +4839,20 @@
4630
  ],
4631
  "description": "Symfony Debug Component",
4632
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4633
  "time": "2020-05-22T18:25:20+00:00"
4634
  },
4635
  {
@@ -4687,6 +4910,20 @@
4687
  ],
4688
  "description": "Symfony DomCrawler Component",
4689
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4690
  "time": "2020-05-22T19:35:43+00:00"
4691
  },
4692
  {
@@ -4750,6 +4987,20 @@
4750
  ],
4751
  "description": "Symfony EventDispatcher Component",
4752
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4753
  "time": "2020-05-05T15:06:23+00:00"
4754
  },
4755
  {
@@ -4800,6 +5051,20 @@
4800
  ],
4801
  "description": "Symfony Filesystem Component",
4802
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4803
  "time": "2020-05-30T17:48:24+00:00"
4804
  },
4805
  {
@@ -4849,20 +5114,34 @@
4849
  ],
4850
  "description": "Symfony Finder Component",
4851
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4852
  "time": "2020-02-14T07:34:21+00:00"
4853
  },
4854
  {
4855
  "name": "symfony/polyfill-ctype",
4856
- "version": "v1.17.0",
4857
  "source": {
4858
  "type": "git",
4859
  "url": "https://github.com/symfony/polyfill-ctype.git",
4860
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
4861
  },
4862
  "dist": {
4863
  "type": "zip",
4864
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
4865
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
4866
  "shasum": ""
4867
  },
4868
  "require": {
@@ -4875,6 +5154,10 @@
4875
  "extra": {
4876
  "branch-alias": {
4877
  "dev-master": "1.17-dev"
 
 
 
 
4878
  }
4879
  },
4880
  "autoload": {
@@ -4907,20 +5190,34 @@
4907
  "polyfill",
4908
  "portable"
4909
  ],
4910
- "time": "2020-05-12T16:14:59+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4911
  },
4912
  {
4913
  "name": "symfony/polyfill-intl-idn",
4914
- "version": "v1.17.0",
4915
  "source": {
4916
  "type": "git",
4917
  "url": "https://github.com/symfony/polyfill-intl-idn.git",
4918
- "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
4919
  },
4920
  "dist": {
4921
  "type": "zip",
4922
- "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
4923
- "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
4924
  "shasum": ""
4925
  },
4926
  "require": {
@@ -4935,6 +5232,10 @@
4935
  "extra": {
4936
  "branch-alias": {
4937
  "dev-master": "1.17-dev"
 
 
 
 
4938
  }
4939
  },
4940
  "autoload": {
@@ -4969,20 +5270,34 @@
4969
  "portable",
4970
  "shim"
4971
  ],
4972
- "time": "2020-05-12T16:47:27+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4973
  },
4974
  {
4975
  "name": "symfony/polyfill-mbstring",
4976
- "version": "v1.17.0",
4977
  "source": {
4978
  "type": "git",
4979
  "url": "https://github.com/symfony/polyfill-mbstring.git",
4980
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
4981
  },
4982
  "dist": {
4983
  "type": "zip",
4984
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
4985
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
4986
  "shasum": ""
4987
  },
4988
  "require": {
@@ -4995,6 +5310,10 @@
4995
  "extra": {
4996
  "branch-alias": {
4997
  "dev-master": "1.17-dev"
 
 
 
 
4998
  }
4999
  },
5000
  "autoload": {
@@ -5028,7 +5347,21 @@
5028
  "portable",
5029
  "shim"
5030
  ],
5031
- "time": "2020-05-12T16:47:27+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5032
  },
5033
  {
5034
  "name": "symfony/polyfill-php72",
@@ -5083,6 +5416,20 @@
5083
  "portable",
5084
  "shim"
5085
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5086
  "time": "2020-05-12T16:47:27+00:00"
5087
  },
5088
  {
@@ -5132,6 +5479,20 @@
5132
  ],
5133
  "description": "Symfony Process Component",
5134
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5135
  "time": "2020-05-23T17:05:51+00:00"
5136
  },
5137
  {
@@ -5191,6 +5552,20 @@
5191
  ],
5192
  "description": "Symfony Yaml Component",
5193
  "homepage": "https://symfony.com",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5194
  "time": "2020-05-11T07:51:54+00:00"
5195
  },
5196
  {
@@ -5255,6 +5630,16 @@
5255
  "env",
5256
  "environment"
5257
  ],
 
 
 
 
 
 
 
 
 
 
5258
  "time": "2020-06-07T18:25:35+00:00"
5259
  },
5260
  {
@@ -7497,49 +7882,6 @@
7497
  ],
7498
  "time": "2019-12-17T13:58:01+00:00"
7499
  },
7500
- {
7501
- "name": "wpdesk/wp-builder",
7502
- "version": "1.4.4",
7503
- "source": {
7504
- "type": "git",
7505
- "url": "https://gitlab.com/wpdesk/wp-builder.git",
7506
- "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9"
7507
- },
7508
- "dist": {
7509
- "type": "zip",
7510
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-builder/repository/archive.zip?sha=e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
7511
- "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
7512
- "shasum": ""
7513
- },
7514
- "require": {
7515
- "php": ">=5.5"
7516
- },
7517
- "require-dev": {
7518
- "10up/wp_mock": "*",
7519
- "mockery/mockery": "*",
7520
- "phpunit/phpunit": "<7",
7521
- "squizlabs/php_codesniffer": "^3.0.2",
7522
- "wimg/php-compatibility": "^8",
7523
- "wp-coding-standards/wpcs": "^0.14.1"
7524
- },
7525
- "type": "library",
7526
- "autoload": {
7527
- "psr-4": {
7528
- "WPDesk\\PluginBuilder\\": "src/"
7529
- },
7530
- "classmap": [
7531
- "src/Plugin/WithoutNamespace"
7532
- ]
7533
- },
7534
- "notification-url": "https://packagist.org/downloads/",
7535
- "authors": [
7536
- {
7537
- "name": "Krzysiek",
7538
- "email": "krzysiek@wpdesk.pl"
7539
- }
7540
- ],
7541
- "time": "2020-06-17T08:00:07+00:00"
7542
- },
7543
  {
7544
  "name": "wpdesk/wp-code-sniffer",
7545
  "version": "1.0.1",
@@ -7945,57 +8287,6 @@
7945
  ],
7946
  "time": "2020-05-06T10:17:53+00:00"
7947
  },
7948
- {
7949
- "name": "wpdesk/wp-pointer",
7950
- "version": "1.0.2",
7951
- "source": {
7952
- "type": "git",
7953
- "url": "https://gitlab.com/wpdesk/wp-pointer.git",
7954
- "reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5"
7955
- },
7956
- "dist": {
7957
- "type": "zip",
7958
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-pointer/repository/archive.zip?sha=5fcf88cab27c4a5903caae884044d9285f8d8cd5",
7959
- "reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5",
7960
- "shasum": ""
7961
- },
7962
- "require": {
7963
- "php": ">=5.5",
7964
- "wpdesk/wp-builder": "^1.1"
7965
- },
7966
- "require-dev": {
7967
- "10up/wp_mock": "*",
7968
- "mockery/mockery": "*",
7969
- "phpunit/phpunit": "<7",
7970
- "squizlabs/php_codesniffer": "^3.0.2",
7971
- "wimg/php-compatibility": "^8",
7972
- "wp-coding-standards/wpcs": "^0.14.1"
7973
- },
7974
- "type": "library",
7975
- "autoload": {
7976
- "psr-4": {
7977
- "WPDesk\\Pointer\\": "src/WPDesk/Pointer/"
7978
- }
7979
- },
7980
- "notification-url": "https://packagist.org/downloads/",
7981
- "license": [
7982
- "MIT"
7983
- ],
7984
- "authors": [
7985
- {
7986
- "name": "grola",
7987
- "email": "grola@wpdesk.net"
7988
- }
7989
- ],
7990
- "description": "Library for displaying Wordpress pointer messages.",
7991
- "homepage": "https://gitlab.com/wpdesk/wp-pointer",
7992
- "keywords": [
7993
- "admin",
7994
- "pointer",
7995
- "wordpress"
7996
- ],
7997
- "time": "2019-04-08T11:33:03+00:00"
7998
- },
7999
  {
8000
  "name": "wpdesk/wp-view",
8001
  "version": "1.1.0",
@@ -8187,16 +8478,16 @@
8187
  },
8188
  {
8189
  "name": "wpdesk/wp-wpdesk-tracker",
8190
- "version": "2.2.1",
8191
  "source": {
8192
  "type": "git",
8193
  "url": "https://gitlab.com/wpdesk/wp-wpdesk-tracker.git",
8194
- "reference": "622158524e8bcaae436783c1741904fc314d08b7"
8195
  },
8196
  "dist": {
8197
  "type": "zip",
8198
- "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-tracker/repository/archive.zip?sha=622158524e8bcaae436783c1741904fc314d08b7",
8199
- "reference": "622158524e8bcaae436783c1741904fc314d08b7",
8200
  "shasum": ""
8201
  },
8202
  "require": {
@@ -8230,7 +8521,7 @@
8230
  "email": "krzysiek@wpdesk.pl"
8231
  }
8232
  ],
8233
- "time": "2020-04-15T08:00:06+00:00"
8234
  },
8235
  {
8236
  "name": "wpdesk/wp-wpdesk-tracker-deactivation",
@@ -8285,6 +8576,59 @@
8285
  ],
8286
  "time": "2019-11-07T10:48:30+00:00"
8287
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8288
  {
8289
  "name": "zordius/lightncandy",
8290
  "version": "v1.2.4",
@@ -8349,5 +8693,6 @@
8349
  "platform-dev": [],
8350
  "platform-overrides": {
8351
  "php": "5.6"
8352
- }
 
8353
  }
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "d615af29e0ef851f8b88342167776dd0",
8
  "packages": [
9
  {
10
  "name": "psr/log",
53
  ],
54
  "time": "2020-03-23T09:12:05+00:00"
55
  },
56
+ {
57
+ "name": "wpdesk/wp-builder",
58
+ "version": "1.4.4",
59
+ "source": {
60
+ "type": "git",
61
+ "url": "https://gitlab.com/wpdesk/wp-builder.git",
62
+ "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9"
63
+ },
64
+ "dist": {
65
+ "type": "zip",
66
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-builder/repository/archive.zip?sha=e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
67
+ "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
68
+ "shasum": ""
69
+ },
70
+ "require": {
71
+ "php": ">=5.5"
72
+ },
73
+ "require-dev": {
74
+ "10up/wp_mock": "*",
75
+ "mockery/mockery": "*",
76
+ "phpunit/phpunit": "<7",
77
+ "squizlabs/php_codesniffer": "^3.0.2",
78
+ "wimg/php-compatibility": "^8",
79
+ "wp-coding-standards/wpcs": "^0.14.1"
80
+ },
81
+ "type": "library",
82
+ "autoload": {
83
+ "psr-4": {
84
+ "WPDesk\\PluginBuilder\\": "src/"
85
+ },
86
+ "classmap": [
87
+ "src/Plugin/WithoutNamespace"
88
+ ]
89
+ },
90
+ "notification-url": "https://packagist.org/downloads/",
91
+ "authors": [
92
+ {
93
+ "name": "Krzysiek",
94
+ "email": "krzysiek@wpdesk.pl"
95
+ }
96
+ ],
97
+ "time": "2020-06-17T08:00:07+00:00"
98
+ },
99
+ {
100
+ "name": "wpdesk/wp-pointer",
101
+ "version": "2.0.0",
102
+ "source": {
103
+ "type": "git",
104
+ "url": "https://gitlab.com/wpdesk/wp-pointer.git",
105
+ "reference": "2468b7f3412ba3dafbf3b8964b23ead89138102f"
106
+ },
107
+ "dist": {
108
+ "type": "zip",
109
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-pointer/repository/archive.zip?sha=2468b7f3412ba3dafbf3b8964b23ead89138102f",
110
+ "reference": "2468b7f3412ba3dafbf3b8964b23ead89138102f",
111
+ "shasum": ""
112
+ },
113
+ "require": {
114
+ "php": ">=5.5",
115
+ "wpdesk/wp-builder": "^1.1"
116
+ },
117
+ "require-dev": {
118
+ "10up/wp_mock": "*",
119
+ "mockery/mockery": "*",
120
+ "phpunit/phpunit": "<7",
121
+ "squizlabs/php_codesniffer": "^3.0.2",
122
+ "wimg/php-compatibility": "^8",
123
+ "wp-coding-standards/wpcs": "^0.14.1"
124
+ },
125
+ "type": "library",
126
+ "autoload": {
127
+ "psr-4": {
128
+ "WPDesk\\Pointer\\": "src/WPDesk/Pointer/"
129
+ }
130
+ },
131
+ "notification-url": "https://packagist.org/downloads/",
132
+ "license": [
133
+ "MIT"
134
+ ],
135
+ "authors": [
136
+ {
137
+ "name": "grola",
138
+ "email": "grola@wpdesk.net"
139
+ }
140
+ ],
141
+ "description": "Library for displaying Wordpress pointer messages.",
142
+ "homepage": "https://gitlab.com/wpdesk/wp-pointer",
143
+ "keywords": [
144
+ "admin",
145
+ "pointer",
146
+ "wordpress"
147
+ ],
148
+ "time": "2020-07-14T15:33:40+00:00"
149
+ },
150
  {
151
  "name": "wpdesk/wp-wpdesk-helper-override",
152
  "version": "1.1.0",
409
  "functional testing",
410
  "unit testing"
411
  ],
412
+ "funding": [
413
+ {
414
+ "url": "https://opencollective.com/codeception",
415
+ "type": "open_collective"
416
+ }
417
+ ],
418
  "time": "2020-06-07T16:31:51+00:00"
419
  },
420
  {
1038
  "ssl",
1039
  "tls"
1040
  ],
1041
+ "funding": [
1042
+ {
1043
+ "url": "https://packagist.com",
1044
+ "type": "custom"
1045
+ },
1046
+ {
1047
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
1048
+ "type": "tidelift"
1049
+ }
1050
+ ],
1051
  "time": "2020-04-08T08:27:21+00:00"
1052
  },
1053
  {
1054
  "name": "composer/composer",
1055
+ "version": "1.10.8",
1056
  "source": {
1057
  "type": "git",
1058
  "url": "https://github.com/composer/composer.git",
1059
+ "reference": "56e0e094478f30935e9128552188355fa9712291"
1060
  },
1061
  "dist": {
1062
  "type": "zip",
1063
+ "url": "https://api.github.com/repos/composer/composer/zipball/56e0e094478f30935e9128552188355fa9712291",
1064
+ "reference": "56e0e094478f30935e9128552188355fa9712291",
1065
  "shasum": ""
1066
  },
1067
  "require": {
1080
  "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
1081
  },
1082
  "conflict": {
1083
+ "symfony/console": "2.8.38"
 
1084
  },
1085
  "require-dev": {
1086
  "phpspec/prophecy": "^1.10",
1087
+ "symfony/phpunit-bridge": "^4.2"
1088
  },
1089
  "suggest": {
1090
  "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
1128
  "dependency",
1129
  "package"
1130
  ],
1131
+ "funding": [
1132
+ {
1133
+ "url": "https://packagist.com",
1134
+ "type": "custom"
1135
+ },
1136
+ {
1137
+ "url": "https://github.com/composer",
1138
+ "type": "github"
1139
+ },
1140
+ {
1141
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
1142
+ "type": "tidelift"
1143
+ }
1144
+ ],
1145
+ "time": "2020-06-24T19:23:30+00:00"
1146
  },
1147
  {
1148
  "name": "composer/semver",
1307
  "Xdebug",
1308
  "performance"
1309
  ],
1310
+ "funding": [
1311
+ {
1312
+ "url": "https://packagist.com",
1313
+ "type": "custom"
1314
+ },
1315
+ {
1316
+ "url": "https://github.com/composer",
1317
+ "type": "github"
1318
+ },
1319
+ {
1320
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
1321
+ "type": "tidelift"
1322
+ }
1323
+ ],
1324
  "time": "2020-06-04T11:16:35+00:00"
1325
  },
1326
  {
2205
  },
2206
  {
2207
  "name": "lucatume/wp-browser",
2208
+ "version": "2.6.3",
2209
  "source": {
2210
  "type": "git",
2211
  "url": "https://github.com/lucatume/wp-browser.git",
2212
+ "reference": "e9797f2fc919ffe246b66ecfef517b895ed158e6"
2213
  },
2214
  "dist": {
2215
  "type": "zip",
2216
+ "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/e9797f2fc919ffe246b66ecfef517b895ed158e6",
2217
+ "reference": "e9797f2fc919ffe246b66ecfef517b895ed158e6",
2218
  "shasum": ""
2219
  },
2220
  "require": {
2284
  "codeception",
2285
  "wordpress"
2286
  ],
2287
+ "time": "2020-06-30T10:46:22+00:00"
2288
  },
2289
  {
2290
  "name": "matthiasmullie/minify",
2397
  },
2398
  {
2399
  "name": "mck89/peast",
2400
+ "version": "v1.10.4",
2401
  "source": {
2402
  "type": "git",
2403
  "url": "https://github.com/mck89/peast.git",
2404
+ "reference": "e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d"
2405
  },
2406
  "dist": {
2407
  "type": "zip",
2408
+ "url": "https://api.github.com/repos/mck89/peast/zipball/e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d",
2409
+ "reference": "e11664ef53ba2a4ca1d16d8bc73fcc317cd65d3d",
2410
  "shasum": ""
2411
  },
2412
  "require": {
2418
  "type": "library",
2419
  "extra": {
2420
  "branch-alias": {
2421
+ "dev-master": "1.10.4-dev"
2422
  }
2423
  },
2424
  "autoload": {
2438
  }
2439
  ],
2440
  "description": "Peast is PHP library that generates AST for JavaScript code",
2441
+ "time": "2020-06-21T17:16:08+00:00"
2442
  },
2443
  {
2444
  "name": "mikemclin/laravel-wp-password",
2726
  "logging",
2727
  "psr-3"
2728
  ],
2729
+ "funding": [
2730
+ {
2731
+ "url": "https://github.com/Seldaek",
2732
+ "type": "github"
2733
+ },
2734
+ {
2735
+ "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
2736
+ "type": "tidelift"
2737
+ }
2738
+ ],
2739
  "time": "2020-05-22T07:31:27+00:00"
2740
  },
2741
  {
3240
  "php",
3241
  "type"
3242
  ],
3243
+ "funding": [
3244
+ {
3245
+ "url": "https://github.com/GrahamCampbell",
3246
+ "type": "github"
3247
+ },
3248
+ {
3249
+ "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
3250
+ "type": "tidelift"
3251
+ }
3252
+ ],
3253
  "time": "2020-06-07T10:40:07+00:00"
3254
  },
3255
  {
4454
  "parser",
4455
  "validator"
4456
  ],
4457
+ "funding": [
4458
+ {
4459
+ "url": "https://github.com/Seldaek",
4460
+ "type": "github"
4461
+ },
4462
+ {
4463
+ "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint",
4464
+ "type": "tidelift"
4465
+ }
4466
+ ],
4467
  "time": "2020-04-30T19:05:18+00:00"
4468
  },
4469
  {
4616
  ],
4617
  "description": "Symfony BrowserKit Component",
4618
  "homepage": "https://symfony.com",
4619
+ "funding": [
4620
+ {
4621
+ "url": "https://symfony.com/sponsor",
4622
+ "type": "custom"
4623
+ },
4624
+ {
4625
+ "url": "https://github.com/fabpot",
4626
+ "type": "github"
4627
+ },
4628
+ {
4629
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
4630
+ "type": "tidelift"
4631
+ }
4632
+ ],
4633
  "time": "2020-04-27T06:55:12+00:00"
4634
  },
4635
  {
4702
  ],
4703
  "description": "Symfony Console Component",
4704
  "homepage": "https://symfony.com",
4705
+ "funding": [
4706
+ {
4707
+ "url": "https://symfony.com/sponsor",
4708
+ "type": "custom"
4709
+ },
4710
+ {
4711
+ "url": "https://github.com/fabpot",
4712
+ "type": "github"
4713
+ },
4714
+ {
4715
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
4716
+ "type": "tidelift"
4717
+ }
4718
+ ],
4719
  "time": "2020-05-30T18:58:05+00:00"
4720
  },
4721
  {
4769
  ],
4770
  "description": "Symfony CssSelector Component",
4771
  "homepage": "https://symfony.com",
4772
+ "funding": [
4773
+ {
4774
+ "url": "https://symfony.com/sponsor",
4775
+ "type": "custom"
4776
+ },
4777
+ {
4778
+ "url": "https://github.com/fabpot",
4779
+ "type": "github"
4780
+ },
4781
+ {
4782
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
4783
+ "type": "tidelift"
4784
+ }
4785
+ ],
4786
  "time": "2020-03-16T08:31:04+00:00"
4787
  },
4788
  {
4839
  ],
4840
  "description": "Symfony Debug Component",
4841
  "homepage": "https://symfony.com",
4842
+ "funding": [
4843
+ {
4844
+ "url": "https://symfony.com/sponsor",
4845
+ "type": "custom"
4846
+ },
4847
+ {
4848
+ "url": "https://github.com/fabpot",
4849
+ "type": "github"
4850
+ },
4851
+ {
4852
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
4853
+ "type": "tidelift"
4854
+ }
4855
+ ],
4856
  "time": "2020-05-22T18:25:20+00:00"
4857
  },
4858
  {
4910
  ],
4911
  "description": "Symfony DomCrawler Component",
4912
  "homepage": "https://symfony.com",
4913
+ "funding": [
4914
+ {
4915
+ "url": "https://symfony.com/sponsor",
4916
+ "type": "custom"
4917
+ },
4918
+ {
4919
+ "url": "https://github.com/fabpot",
4920
+ "type": "github"
4921
+ },
4922
+ {
4923
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
4924
+ "type": "tidelift"
4925
+ }
4926
+ ],
4927
  "time": "2020-05-22T19:35:43+00:00"
4928
  },
4929
  {
4987
  ],
4988
  "description": "Symfony EventDispatcher Component",
4989
  "homepage": "https://symfony.com",
4990
+ "funding": [
4991
+ {
4992
+ "url": "https://symfony.com/sponsor",
4993
+ "type": "custom"
4994
+ },
4995
+ {
4996
+ "url": "https://github.com/fabpot",
4997
+ "type": "github"
4998
+ },
4999
+ {
5000
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5001
+ "type": "tidelift"
5002
+ }
5003
+ ],
5004
  "time": "2020-05-05T15:06:23+00:00"
5005
  },
5006
  {
5051
  ],
5052
  "description": "Symfony Filesystem Component",
5053
  "homepage": "https://symfony.com",
5054
+ "funding": [
5055
+ {
5056
+ "url": "https://symfony.com/sponsor",
5057
+ "type": "custom"
5058
+ },
5059
+ {
5060
+ "url": "https://github.com/fabpot",
5061
+ "type": "github"
5062
+ },
5063
+ {
5064
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5065
+ "type": "tidelift"
5066
+ }
5067
+ ],
5068
  "time": "2020-05-30T17:48:24+00:00"
5069
  },
5070
  {
5114
  ],
5115
  "description": "Symfony Finder Component",
5116
  "homepage": "https://symfony.com",
5117
+ "funding": [
5118
+ {
5119
+ "url": "https://symfony.com/sponsor",
5120
+ "type": "custom"
5121
+ },
5122
+ {
5123
+ "url": "https://github.com/fabpot",
5124
+ "type": "github"
5125
+ },
5126
+ {
5127
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5128
+ "type": "tidelift"
5129
+ }
5130
+ ],
5131
  "time": "2020-02-14T07:34:21+00:00"
5132
  },
5133
  {
5134
  "name": "symfony/polyfill-ctype",
5135
+ "version": "v1.17.1",
5136
  "source": {
5137
  "type": "git",
5138
  "url": "https://github.com/symfony/polyfill-ctype.git",
5139
+ "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d"
5140
  },
5141
  "dist": {
5142
  "type": "zip",
5143
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
5144
+ "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
5145
  "shasum": ""
5146
  },
5147
  "require": {
5154
  "extra": {
5155
  "branch-alias": {
5156
  "dev-master": "1.17-dev"
5157
+ },
5158
+ "thanks": {
5159
+ "name": "symfony/polyfill",
5160
+ "url": "https://github.com/symfony/polyfill"
5161
  }
5162
  },
5163
  "autoload": {
5190
  "polyfill",
5191
  "portable"
5192
  ],
5193
+ "funding": [
5194
+ {
5195
+ "url": "https://symfony.com/sponsor",
5196
+ "type": "custom"
5197
+ },
5198
+ {
5199
+ "url": "https://github.com/fabpot",
5200
+ "type": "github"
5201
+ },
5202
+ {
5203
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5204
+ "type": "tidelift"
5205
+ }
5206
+ ],
5207
+ "time": "2020-06-06T08:46:27+00:00"
5208
  },
5209
  {
5210
  "name": "symfony/polyfill-intl-idn",
5211
+ "version": "v1.17.1",
5212
  "source": {
5213
  "type": "git",
5214
  "url": "https://github.com/symfony/polyfill-intl-idn.git",
5215
+ "reference": "a57f8161502549a742a63c09f0a604997bf47027"
5216
  },
5217
  "dist": {
5218
  "type": "zip",
5219
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027",
5220
+ "reference": "a57f8161502549a742a63c09f0a604997bf47027",
5221
  "shasum": ""
5222
  },
5223
  "require": {
5232
  "extra": {
5233
  "branch-alias": {
5234
  "dev-master": "1.17-dev"
5235
+ },
5236
+ "thanks": {
5237
+ "name": "symfony/polyfill",
5238
+ "url": "https://github.com/symfony/polyfill"
5239
  }
5240
  },
5241
  "autoload": {
5270
  "portable",
5271
  "shim"
5272
  ],
5273
+ "funding": [
5274
+ {
5275
+ "url": "https://symfony.com/sponsor",
5276
+ "type": "custom"
5277
+ },
5278
+ {
5279
+ "url": "https://github.com/fabpot",
5280
+ "type": "github"
5281
+ },
5282
+ {
5283
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5284
+ "type": "tidelift"
5285
+ }
5286
+ ],
5287
+ "time": "2020-06-06T08:46:27+00:00"
5288
  },
5289
  {
5290
  "name": "symfony/polyfill-mbstring",
5291
+ "version": "v1.17.1",
5292
  "source": {
5293
  "type": "git",
5294
  "url": "https://github.com/symfony/polyfill-mbstring.git",
5295
+ "reference": "7110338d81ce1cbc3e273136e4574663627037a7"
5296
  },
5297
  "dist": {
5298
  "type": "zip",
5299
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7",
5300
+ "reference": "7110338d81ce1cbc3e273136e4574663627037a7",
5301
  "shasum": ""
5302
  },
5303
  "require": {
5310
  "extra": {
5311
  "branch-alias": {
5312
  "dev-master": "1.17-dev"
5313
+ },
5314
+ "thanks": {
5315
+ "name": "symfony/polyfill",
5316
+ "url": "https://github.com/symfony/polyfill"
5317
  }
5318
  },
5319
  "autoload": {
5347
  "portable",
5348
  "shim"
5349
  ],
5350
+ "funding": [
5351
+ {
5352
+ "url": "https://symfony.com/sponsor",
5353
+ "type": "custom"
5354
+ },
5355
+ {
5356
+ "url": "https://github.com/fabpot",
5357
+ "type": "github"
5358
+ },
5359
+ {
5360
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5361
+ "type": "tidelift"
5362
+ }
5363
+ ],
5364
+ "time": "2020-06-06T08:46:27+00:00"
5365
  },
5366
  {
5367
  "name": "symfony/polyfill-php72",
5416
  "portable",
5417
  "shim"
5418
  ],
5419
+ "funding": [
5420
+ {
5421
+ "url": "https://symfony.com/sponsor",
5422
+ "type": "custom"
5423
+ },
5424
+ {
5425
+ "url": "https://github.com/fabpot",
5426
+ "type": "github"
5427
+ },
5428
+ {
5429
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5430
+ "type": "tidelift"
5431
+ }
5432
+ ],
5433
  "time": "2020-05-12T16:47:27+00:00"
5434
  },
5435
  {
5479
  ],
5480
  "description": "Symfony Process Component",
5481
  "homepage": "https://symfony.com",
5482
+ "funding": [
5483
+ {
5484
+ "url": "https://symfony.com/sponsor",
5485
+ "type": "custom"
5486
+ },
5487
+ {
5488
+ "url": "https://github.com/fabpot",
5489
+ "type": "github"
5490
+ },
5491
+ {
5492
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5493
+ "type": "tidelift"
5494
+ }
5495
+ ],
5496
  "time": "2020-05-23T17:05:51+00:00"
5497
  },
5498
  {
5552
  ],
5553
  "description": "Symfony Yaml Component",
5554
  "homepage": "https://symfony.com",
5555
+ "funding": [
5556
+ {
5557
+ "url": "https://symfony.com/sponsor",
5558
+ "type": "custom"
5559
+ },
5560
+ {
5561
+ "url": "https://github.com/fabpot",
5562
+ "type": "github"
5563
+ },
5564
+ {
5565
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
5566
+ "type": "tidelift"
5567
+ }
5568
+ ],
5569
  "time": "2020-05-11T07:51:54+00:00"
5570
  },
5571
  {
5630
  "env",
5631
  "environment"
5632
  ],
5633
+ "funding": [
5634
+ {
5635
+ "url": "https://github.com/GrahamCampbell",
5636
+ "type": "github"
5637
+ },
5638
+ {
5639
+ "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
5640
+ "type": "tidelift"
5641
+ }
5642
+ ],
5643
  "time": "2020-06-07T18:25:35+00:00"
5644
  },
5645
  {
7882
  ],
7883
  "time": "2019-12-17T13:58:01+00:00"
7884
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7885
  {
7886
  "name": "wpdesk/wp-code-sniffer",
7887
  "version": "1.0.1",
8287
  ],
8288
  "time": "2020-05-06T10:17:53+00:00"
8289
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8290
  {
8291
  "name": "wpdesk/wp-view",
8292
  "version": "1.1.0",
8478
  },
8479
  {
8480
  "name": "wpdesk/wp-wpdesk-tracker",
8481
+ "version": "2.3.0",
8482
  "source": {
8483
  "type": "git",
8484
  "url": "https://gitlab.com/wpdesk/wp-wpdesk-tracker.git",
8485
+ "reference": "7d05d45ebb57a35f29297b423dff38949da25052"
8486
  },
8487
  "dist": {
8488
  "type": "zip",
8489
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-tracker/repository/archive.zip?sha=7d05d45ebb57a35f29297b423dff38949da25052",
8490
+ "reference": "7d05d45ebb57a35f29297b423dff38949da25052",
8491
  "shasum": ""
8492
  },
8493
  "require": {
8521
  "email": "krzysiek@wpdesk.pl"
8522
  }
8523
  ],
8524
+ "time": "2020-07-10T14:36:31+00:00"
8525
  },
8526
  {
8527
  "name": "wpdesk/wp-wpdesk-tracker-deactivation",
8576
  ],
8577
  "time": "2019-11-07T10:48:30+00:00"
8578
  },
8579
+ {
8580
+ "name": "wpdesk/wp-wpdesk-tracker-user-feedback",
8581
+ "version": "1.0.0-beta7",
8582
+ "source": {
8583
+ "type": "git",
8584
+ "url": "https://gitlab.com/wpdesk/wp-wpdesk-tracker-user-feedback.git",
8585
+ "reference": "9f58774eb3091bfee07f8b31a00f9d8b842663b4"
8586
+ },
8587
+ "dist": {
8588
+ "type": "zip",
8589
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-tracker-user-feedback/repository/archive.zip?sha=9f58774eb3091bfee07f8b31a00f9d8b842663b4",
8590
+ "reference": "9f58774eb3091bfee07f8b31a00f9d8b842663b4",
8591
+ "shasum": ""
8592
+ },
8593
+ "require": {
8594
+ "php": ">=5.6"
8595
+ },
8596
+ "require-dev": {
8597
+ "10up/wp_mock": "*",
8598
+ "mockery/mockery": "*",
8599
+ "phpunit/phpunit": "<7",
8600
+ "squizlabs/php_codesniffer": "^3.0.2",
8601
+ "wimg/php-compatibility": "^8",
8602
+ "wp-coding-standards/wpcs": "^0.14.1",
8603
+ "wpdesk/wp-builder": "^1.4",
8604
+ "wpdesk/wp-wpdesk-tracker": "^2.0"
8605
+ },
8606
+ "type": "library",
8607
+ "extra": {
8608
+ "text-domain": "wp-wpdesk-tracker-user-feedback",
8609
+ "translations-folder": "lang",
8610
+ "po-files": {
8611
+ "pl_PL": "pl_PL.po"
8612
+ }
8613
+ },
8614
+ "autoload": {
8615
+ "psr-4": {
8616
+ "WPDesk\\Tracker\\UserFeedback\\": "src/WPDesk/Tracker/UserFeedback/"
8617
+ }
8618
+ },
8619
+ "notification-url": "https://packagist.org/downloads/",
8620
+ "authors": [
8621
+ {
8622
+ "name": "Krzysiek",
8623
+ "email": "krzysiek@wpdesk.pl"
8624
+ },
8625
+ {
8626
+ "name": "Grzegorz",
8627
+ "email": "grzegorz@wpdesk.pl"
8628
+ }
8629
+ ],
8630
+ "time": "2020-07-13T13:51:54+00:00"
8631
+ },
8632
  {
8633
  "name": "zordius/lightncandy",
8634
  "version": "v1.2.4",
8693
  "platform-dev": [],
8694
  "platform-overrides": {
8695
  "php": "5.6"
8696
+ },
8697
+ "plugin-api-version": "1.1.0"
8698
  }
flexible-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
- * Version: 3.9.21
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
@@ -11,7 +11,7 @@
11
  * Requires at least: 4.5
12
  * Tested up to: 5.4.2
13
  * WC requires at least: 3.8
14
- * WC tested up to: 4.3
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
- $plugin_version = '3.9.21';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
3
  * Plugin Name: Flexible Shipping
4
  * Plugin URI: https://wordpress.org/plugins/flexible-shipping/
5
  * Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
6
+ * Version: 3.10.0
7
  * Author: WP Desk
8
  * Author URI: https://www.wpdesk.net/
9
  * Text Domain: flexible-shipping
11
  * Requires at least: 4.5
12
  * Tested up to: 5.4.2
13
  * WC requires at least: 3.8
14
+ * WC tested up to: 4.4
15
  * Requires PHP: 5.6
16
  *
17
  * Copyright 2017 WP Desk Ltd.
38
  } // Exit if accessed directly
39
 
40
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
41
+ $plugin_version = '3.10.0';
42
 
43
  $plugin_name = 'Flexible Shipping';
44
  $product_id = 'Flexible Shipping';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.4.2
7
- Stable tag: 3.9.21
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -163,6 +163,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
163
 
164
  == Changelog ==
165
 
 
 
 
166
  = 3.9.21 - 2020-06-23 =
167
  * Fixed Aelia Currency Switcher integration
168
 
4
  Tags: table rate, table rate shipping, conditional shipping, shipping method, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
5
  Requires at least: 4.5
6
  Tested up to: 5.4.2
7
+ Stable tag: 3.10.0
8
  Requires PHP: 5.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
163
 
164
  == Changelog ==
165
 
166
+ = 3.10.0 - 2020-07-15 =
167
+ * Added ability to test New Table Interface
168
+
169
  = 3.9.21 - 2020-06-23 =
170
  * Fixed Aelia Currency Switcher integration
171
 
src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerMessage.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Rules pointer message.
4
+ *
5
+ * @package WPDesk\FS\TableRate\NewRulesTablePointer
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\NewRulesTablePointer;
9
+
10
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
11
+ use FSVendor\WPDesk\Pointer\PointerConditions;
12
+ use FSVendor\WPDesk\Pointer\PointerMessage;
13
+ use FSVendor\WPDesk\Pointer\PointerPosition;
14
+ use FSVendor\WPDesk\Pointer\PointersScripts;
15
+
16
+ /**
17
+ * Can display new rules pointer message.
18
+ */
19
+ class RulesPointerMessage implements Hookable {
20
+
21
+ const POINTER_ID = 'fs_new_rules_table';
22
+
23
+ const NEW_RULES_TABLE_PARAMETER = 'new_rules_table';
24
+
25
+ /**
26
+ * Pattern of option with Flexible Shipping methods.
27
+ * @var string
28
+ */
29
+ const FS_METHODS_OPTION_PREFIX = 'flexible_shipping_methods_%d';
30
+
31
+ /**
32
+ * @var RulesPointerOption
33
+ */
34
+ private $rules_pointer_option;
35
+
36
+ /**
37
+ * RulesPointerMessage constructor.
38
+ *
39
+ * @param RulesPointerOption $rules_pointer_option .
40
+ */
41
+ public function __construct( RulesPointerOption $rules_pointer_option ) {
42
+ $this->rules_pointer_option = $rules_pointer_option;
43
+ }
44
+
45
+ /**
46
+ * Hooks.
47
+ */
48
+ public function hooks() {
49
+ add_action( 'admin_init', array( $this, 'add_pointer_messages' ) );
50
+ }
51
+
52
+ /**
53
+ * Should show pointer.
54
+ */
55
+ private function should_show_pointer() {
56
+ if ( ! ( new \FSVendor\WPDesk_Tracker_Persistence_Consent() )->is_active()
57
+ || ( intval( get_option( RulesPointerOption::OPTION_NAME, '0' ) ) === 1 )
58
+ || wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' )
59
+ || ! $this->check_is_fs_methods_exists_in_zones() ) {
60
+ return false;
61
+ }
62
+
63
+ return true;
64
+ }
65
+
66
+ /**
67
+ * Checks if there are Flexible Shipping methods in the Shipping Zones.
68
+ *
69
+ * @return bool Status.
70
+ */
71
+ private function check_is_fs_methods_exists_in_zones() {
72
+ $zones = \WC_Shipping_Zones::get_zones();
73
+ foreach ( $zones as $zone ) {
74
+ $zone_instance = \WC_Shipping_Zones::get_zone( $zone['zone_id'] );
75
+
76
+ if ( $this->check_is_fs_methods_exists_in_zone( $zone_instance ) === true ) {
77
+ return true;
78
+ }
79
+ }
80
+
81
+ return false;
82
+ }
83
+
84
+ /**
85
+ * Checks if there are Flexible Shipping methods in the Shipping Zone.
86
+ *
87
+ * @param \WC_Shipping_Zone $zone_instance Instance of Shipping Zone.
88
+ *
89
+ * @return bool Status.
90
+ */
91
+ private function check_is_fs_methods_exists_in_zone( $zone_instance ) {
92
+ $zone_methods = $zone_instance->get_shipping_methods();
93
+ foreach ( $zone_methods as $zone_method ) {
94
+ if ( $zone_method->id !== 'flexible_shipping' ) {
95
+ continue;
96
+ }
97
+
98
+ $option_key = sprintf( self::FS_METHODS_OPTION_PREFIX, $zone_method->instance_id );
99
+ $shipping_methods = get_option( $option_key, array() );
100
+ if ( $shipping_methods ) {
101
+ return true;
102
+ }
103
+ }
104
+
105
+ return false;
106
+ }
107
+
108
+ /**
109
+ * Add pointer messages.
110
+ */
111
+ public function add_pointer_messages() {
112
+ if ( $this->should_show_pointer() ) {
113
+ $this->create_pointer_message();
114
+ }
115
+ }
116
+
117
+ private function create_pointer_message() {
118
+ $enable_new_rules_table_link = admin_url( 'admin.php' );
119
+ foreach ( $_GET as $parameter => $value ) {
120
+ $enable_new_rules_table_link = add_query_arg( $parameter, $value, $enable_new_rules_table_link );
121
+ }
122
+ $enable_new_rules_table_link = add_query_arg( self::NEW_RULES_TABLE_PARAMETER, '1', $enable_new_rules_table_link );
123
+
124
+ ob_start();
125
+ include __DIR__ . '/views/html-rule-pointer-message.php';
126
+ $content = trim( ob_get_contents() );
127
+ ob_end_clean();
128
+
129
+ $pointer_conditions = new PointerConditions( 'woocommerce_page_wc-settings', 'manage_woocommerce' );
130
+ $pointer_message = new PointerMessage(
131
+ self::POINTER_ID,
132
+ '#woocommerce_flexible_shipping_method_rules_label',
133
+ __( 'Any problems with configuration?', 'flexible-shipping' ),
134
+ $content,
135
+ new PointerPosition( PointerPosition::LEFT, PointerPosition::BOTTOM ),
136
+ 'wp-pointer',
137
+ 330,
138
+ $pointer_conditions,
139
+ array( 'margin-left' => '10px', 'font-weight' => 'initial' )
140
+ );
141
+ }
142
+
143
+ }
src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerOption.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Rules pointer option.
4
+ *
5
+ * @package WPDesk\FS\TableRate\NewRulesTablePointer
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\NewRulesTablePointer;
9
+
10
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
11
+
12
+ /**
13
+ * Can update option when pointer is clicked.
14
+ */
15
+ class RulesPointerOption implements Hookable {
16
+
17
+ const OPTION_NAME = 'flexible_shipping_new_rules_pointer_clicked';
18
+
19
+ const SHIPPING_METHOD_SETTINGS_OPTION = 'woocommerce_flexible_shipping_info_settings';
20
+ const PRIORITY_FIRST = 1;
21
+
22
+ /**
23
+ * Hooks.
24
+ */
25
+ public function hooks() {
26
+ add_action( 'admin_init', array( $this, 'update_option_on_enabling_new_rules_table' ), self::PRIORITY_FIRST );
27
+ add_action( 'update_user_meta', array( $this, 'update_option_on_pointer_dismiss' ), 10, 4 );
28
+ add_action( 'added_user_meta', array( $this, 'update_option_on_pointer_dismiss' ), 10, 4 );
29
+ }
30
+
31
+ /**
32
+ * Update option when enabling new rules table.
33
+ */
34
+ public function update_option_on_enabling_new_rules_table() {
35
+ if ( current_user_can( 'manage_woocommerce' )
36
+ && isset( $_GET[ RulesPointerMessage::NEW_RULES_TABLE_PARAMETER ] )
37
+ && intval( get_option( self::OPTION_NAME, '0' ) ) === 0
38
+ ) {
39
+ update_option( self::OPTION_NAME, '1' );
40
+ $this->update_shipping_method_settings();
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Update shipping method settings.
46
+ */
47
+ private function update_shipping_method_settings() {
48
+ $shipping_method_settings = get_option( self::SHIPPING_METHOD_SETTINGS_OPTION, array() );
49
+ $shipping_method_settings[ShippingMethodNewRuleTableSetting::SETTINGS_OPTION] = 'yes';
50
+ update_option( self::SHIPPING_METHOD_SETTINGS_OPTION, $shipping_method_settings );
51
+ }
52
+
53
+ /**
54
+ * Update option when pointer is dismissed.
55
+ *
56
+ * @param int $meta_id ID of updated metadata entry.
57
+ * @param int $object_id ID of the object metadata is for.
58
+ * @param string $meta_key Metadata key.
59
+ * @param mixed $_meta_value Metadata value. Serialized if non-scalar.
60
+ */
61
+ public function update_option_on_pointer_dismiss( $meta_id, $object_id, $meta_key, $_meta_value ) {
62
+ if ( 'dismissed_wp_pointers' === $meta_key && ! $this->is_option_set() ) {
63
+ $dismissed = explode( ',', (string) $_meta_value );
64
+ if ( in_array( RulesPointerMessage::POINTER_ID, $dismissed ) ) {
65
+ update_option( self::OPTION_NAME, '1' );
66
+ }
67
+ }
68
+ }
69
+
70
+ /**
71
+ * @return bool
72
+ */
73
+ public function is_option_set() {
74
+ return 1 === intval( get_option( self::OPTION_NAME, '0' ) );
75
+ }
76
+
77
+ }
src/WPDesk/FS/TableRate/NewRulesTablePointer/ShippingMethodNewRuleTableSetting.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Shipping method settings option.
4
+ *
5
+ * @package WPDesk\FS\TableRate\NewRulesTablePointer
6
+ */
7
+
8
+ namespace WPDesk\FS\TableRate\NewRulesTablePointer;
9
+
10
+ /**
11
+ * Can add option to shipping method settings.
12
+ */
13
+ class ShippingMethodNewRuleTableSetting {
14
+
15
+ const TRIGGER = 'new-rules-table';
16
+
17
+ const SETTINGS_OPTION = 'enable_new_rules_table';
18
+
19
+ const SHIPPING_METHOD_SETTINGS_OPTION = 'woocommerce_flexible_shipping_info_settings';
20
+
21
+ const OPTION_NEW_RULES_DISABLED = 'flexible_shipping_new_rules_was_disabled';
22
+
23
+ const VALUE_NO = 'no';
24
+ const VALUE_YES = 'yes';
25
+
26
+ private function should_add_field_to_settings() {
27
+ return 1 === intval( get_option( RulesPointerOption::OPTION_NAME, '0' ) ) && ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' );
28
+ }
29
+
30
+ /**
31
+ * Add fields to settings.
32
+ *
33
+ * @param array $settings Settings.
34
+ *
35
+ * @return array
36
+ */
37
+ public function add_fields_to_settings( array $settings ) {
38
+ if ( $this->should_add_field_to_settings() ) {
39
+ $settings[ self::SETTINGS_OPTION ] = array(
40
+ 'type' => 'checkbox',
41
+ 'label' => __( 'Enable New Table Interface', 'flexible-shipping' ),
42
+ 'title' => __( 'Rules table', 'flexible-shipping' ),
43
+ );
44
+ }
45
+ return $settings;
46
+ }
47
+
48
+ public function is_enabled() {
49
+ $settings = get_option( self::SHIPPING_METHOD_SETTINGS_OPTION, array() );
50
+ return isset( $settings[ self::SETTINGS_OPTION ] ) && $settings[ self::SETTINGS_OPTION ] === self::VALUE_YES;
51
+ }
52
+
53
+ public function watch_settings_change() {
54
+ add_action( 'update_option_' . self::SHIPPING_METHOD_SETTINGS_OPTION, array( $this, 'update_option_if_settings_changed' ), 10, 3 );
55
+ }
56
+
57
+ /**
58
+ * @param array $old_value .
59
+ * @param array $new_value .
60
+ * @param string $option .
61
+ */
62
+ public function update_option_if_settings_changed( $old_value, $new_value, $option ) {
63
+ $old_option_value = self::VALUE_NO;
64
+ $new_option_value = self::VALUE_NO;
65
+ if ( is_array( $old_value ) && is_array( $new_value ) ) {
66
+ if ( isset( $old_value[ self::SETTINGS_OPTION ] ) ) {
67
+ $old_option_value = $old_value[ self::SETTINGS_OPTION ];
68
+ }
69
+ if ( isset( $new_value[ self::SETTINGS_OPTION ] ) ) {
70
+ $new_option_value = $new_value[ self::SETTINGS_OPTION ];
71
+ }
72
+ }
73
+ if ( $old_option_value === self::VALUE_YES && $new_option_value === self::VALUE_NO ) {
74
+ update_option( self::OPTION_NEW_RULES_DISABLED, '1' );
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Display settings JavaScript.
80
+ */
81
+ public function settings_script() {
82
+ if ( get_option( RulesPointerOption::OPTION_NAME, '0' ) === '1' ) {
83
+ $trigger = self::TRIGGER;
84
+ include __DIR__ . '/views/html-flexible-shipping-settings-script.php';
85
+ }
86
+ }
87
+
88
+ }
src/WPDesk/FS/TableRate/NewRulesTablePointer/views/html-flexible-shipping-settings-script.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $trigger string
4
+ */
5
+ if ( ! defined( 'ABSPATH' ) ) {
6
+ exit;
7
+ }
8
+ ?><script type="text/javascript">
9
+ jQuery(document).ready(function(){
10
+
11
+ var proceed = false;
12
+
13
+ jQuery(".woocommerce-save-button").on('click', function(e){
14
+ if (!proceed && !jQuery('#woocommerce_flexible_shipping_info_enable_new_rules_table').is(':checked') ) {
15
+ e.preventDefault();
16
+ jQuery(document).trigger('<?php echo esc_attr( $trigger ); ?>');
17
+ }
18
+ });
19
+ jQuery(document).on('<?php echo esc_attr( $trigger ); ?>_proceed', function(){
20
+ proceed = true;
21
+ jQuery(".woocommerce-save-button").trigger('click');
22
+ });
23
+ if ( window.location.hash === '#woocommerce_flexible_shipping_info_enable_new_rules_table' ) {
24
+ jQuery('#woocommerce_flexible_shipping_info_enable_new_rules_table').closest('tr').css('background-color', '#ccc');
25
+ }
26
+
27
+ });
28
+ </script>
src/WPDesk/FS/TableRate/NewRulesTablePointer/views/html-rule-pointer-message.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $enable_new_rules_table_link
4
+ */
5
+ ?>
6
+ <p><?php echo sprintf(
7
+ __('We\'ve designed a completely %snew table interface%s to make the whole configuration easier and more user friendly.', 'flexible-shipping'),
8
+ '<strong>',
9
+ '</strong>'
10
+ ); ?></p>
11
+ <div style="float: right; margin-right: 20px;">
12
+ <a class="button-primary" href="<?php echo esc_attr( $enable_new_rules_table_link );?>"><?php echo esc_html( __( 'Try new interface!', 'flexible-shipping' ) ); ?></a>
13
+ </div>
src/WPDesk/FS/TableRate/NewRulesTableTracker.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ namespace WPDesk\FS\TableRate;
7
+
8
+
9
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
10
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerOption;
11
+ use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
12
+
13
+ class NewRulesTableTracker implements Hookable {
14
+
15
+ const NEW_USERS_AFTER_THIS_DATE = '2020-07-07 01:00:00';
16
+
17
+ const PRIORITY_AFTER_FS_TRACKER = 12;
18
+ const TRACKER_DATA_FLEXIBLE_SHIPPING = 'flexible_shipping';
19
+
20
+ public function hooks() {
21
+ add_filter( 'wpdesk_tracker_data', array( $this, 'append_new_rules_table_data_to_tracker' ), self::PRIORITY_AFTER_FS_TRACKER );
22
+ }
23
+
24
+ /**
25
+ * If this a old user? If so then FS should work like always.
26
+ *
27
+ * @return bool
28
+ */
29
+ private function is_new_installation() {
30
+ return strtotime( self::NEW_USERS_AFTER_THIS_DATE ) < $this->activation_date_according_to_wpdesk_helper();
31
+ }
32
+
33
+ /**
34
+ * Activation date according to wpdesk helper.
35
+ *
36
+ * @return int timestamp
37
+ */
38
+ private function activation_date_according_to_wpdesk_helper() {
39
+ $option_name = 'plugin_activation_flexible-shipping/flexible-shipping.php';
40
+ $activation_date = get_option( $option_name, current_time( 'mysql' ) );
41
+
42
+ if ( ! $activation_date ) {
43
+ return time();
44
+ }
45
+
46
+ return strtotime( $activation_date );
47
+ }
48
+
49
+ private function get_new_rules_table_enabled() {
50
+ $shipping_method_settings = get_option( ShippingMethodNewRuleTableSetting::SHIPPING_METHOD_SETTINGS_OPTION, array() );
51
+ if ( isset( $shipping_method_settings[ ShippingMethodNewRuleTableSetting::SETTINGS_OPTION ] ) ) {
52
+ return $shipping_method_settings[ ShippingMethodNewRuleTableSetting::SETTINGS_OPTION ];
53
+ }
54
+ return 'no';
55
+ }
56
+
57
+ private function append_user_feedback_data( $data, $user_feedback ) {
58
+ if ( isset( $user_feedback['selected_option'] ) ) {
59
+ $data['feedback_option'] = $user_feedback['selected_option'];
60
+ }
61
+ if ( isset( $user_feedback['additional_info'] ) ) {
62
+ $data['feedback_additional_info'] = $user_feedback['additional_info'];
63
+ }
64
+
65
+ return $data;
66
+ }
67
+
68
+ public function append_new_rules_table_data_to_tracker( $data ) {
69
+ $new_rules_table_data = array();
70
+
71
+ $new_rules_table_data['new_installation'] = $this->is_new_installation() ? 'yes' : 'no';
72
+ $new_rules_table_data['pointer_clicked'] = get_option( RulesPointerOption::OPTION_NAME, '0' ) === '1' ? 'yes' : 'no';
73
+ $new_rules_table_data['table_enabled'] = $this->get_new_rules_table_enabled();
74
+ $new_rules_table_data['was_disabled'] = get_option( ShippingMethodNewRuleTableSetting::OPTION_NEW_RULES_DISABLED, '0' ) === '1' ? 'yes' : 'no';
75
+
76
+ $user_feedback = get_option( UserFeedback::USER_FEEDBACK_OPTION );
77
+
78
+ if ( is_array( $user_feedback ) ) {
79
+ $new_rules_table_data = $this->append_user_feedback_data( $new_rules_table_data, $user_feedback );
80
+ }
81
+
82
+ $data['flexible_shipping']['new_rules_table'] = $new_rules_table_data;
83
+
84
+ return $data;
85
+ }
86
+
87
+ }
src/WPDesk/FS/TableRate/RulesSettingsField.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package WPDesk\FS\TableRate
4
+ */
5
+
6
+ namespace WPDesk\FS\TableRate;
7
+
8
+ use FSVendor\WPDesk\Forms\Field;
9
+
10
+ /**
11
+ * Class RulesSettings
12
+ */
13
+ class RulesSettingsField {
14
+
15
+ /**
16
+ * @var string
17
+ */
18
+ private $settings_field_id;
19
+
20
+ /**
21
+ * @var string
22
+ */
23
+ private $field_key;
24
+
25
+ /**
26
+ * @var string
27
+ */
28
+ private $settings_field_name;
29
+
30
+ /**
31
+ * @var array
32
+ */
33
+ private $data;
34
+
35
+ /**
36
+ * RulesSettings constructor.
37
+ *
38
+ * @param string $settings_field_name .
39
+ * @param string $field_key .
40
+ * @param string $settings_field_title .
41
+ * @param array $settings .
42
+ */
43
+ public function __construct( $settings_field_id, $field_key, $settings_field_name, $data ) {
44
+ $this->settings_field_id = $settings_field_id;
45
+ $this->field_key = $field_key;
46
+ $this->settings_field_name = $settings_field_name;
47
+ $this->data = $data;
48
+ }
49
+
50
+ /**
51
+ * Render settings.
52
+ *
53
+ * @return string
54
+ */
55
+ public function render() {
56
+ ob_start();
57
+ $field_key = $this->field_key;
58
+ $data = $this->data;
59
+ include __DIR__ . '/views/shipping-method-settings-rules.php';
60
+ return ob_get_clean();
61
+ }
62
+
63
+ }
src/WPDesk/FS/TableRate/UserFeedback.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\FS\TableRate;
4
+
5
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
6
+ use FSVendor\WPDesk\Tracker\UserFeedback\AjaxUserFeedbackDataHandler;
7
+ use FSVendor\WPDesk\Tracker\UserFeedback\TrackerFactory;
8
+ use FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData;
9
+ use FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackOption;
10
+ use WPDesk\FS\TableRate\NewRulesTablePointer\RulesPointerOption;
11
+ use WPDesk\FS\TableRate\NewRulesTablePointer\ShippingMethodNewRuleTableSetting;
12
+
13
+ class UserFeedback implements Hookable {
14
+
15
+ const THICKBOX_ID = 'new-rules-table';
16
+ const USER_FEEDBACK_OPTION = 'flexible_shipping_new_rules_feedback';
17
+
18
+ public function hooks() {
19
+ if ( get_option( RulesPointerOption::OPTION_NAME, '0' ) === '1' ) {
20
+ $user_feedback = $this->prepare_user_feedback();
21
+ $user_feedback->hooks();
22
+ }
23
+ add_action( 'wpdesk_tracker_user_feedback_data_handled', array( $this, 'save_user_feedback' ) );
24
+ }
25
+
26
+ /**
27
+ * @param array $payload .
28
+ */
29
+ public function save_user_feedback( $payload ) {
30
+ if ( is_array( $payload ) && isset( $payload[ AjaxUserFeedbackDataHandler::FEEDBACK_ID ] ) && $payload[ AjaxUserFeedbackDataHandler::FEEDBACK_ID ] === self::THICKBOX_ID ) {
31
+ update_option( self::USER_FEEDBACK_OPTION, $payload );
32
+ }
33
+ }
34
+
35
+ private function prepare_user_feedback() {
36
+ $user_feedback_data = new UserFeedbackData(
37
+ self::THICKBOX_ID,
38
+ __( 'You are disabling new rules table', 'flexible-shipping' ),
39
+ '',
40
+ __( 'What should we do to improve your experience?', 'flexible-shipping' ),
41
+ 'woocommerce_page_wc-settings'
42
+ );
43
+ $user_feedback_data->add_feedback_option( new UserFeedbackOption(
44
+ 'have_comment',
45
+ '',
46
+ true,
47
+ __( 'Comment', 'flexible-shipping' )
48
+ ));
49
+
50
+ return TrackerFactory::createCustomTrackerWithoutSender( $user_feedback_data );
51
+ }
52
+
53
+ }
src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+
4
+ $options_based_on = array(
5
+ 'none' => __( 'Always', 'flexible-shipping' ),
6
+ 'value' => sprintf( __( 'Price [%1$s]', 'flexible-shipping' ), __( get_woocommerce_currency_symbol( get_option( 'woocommerce_currency' ) ) ) ),
7
+ 'weight' => sprintf( __( 'Weight [%1$s]', 'flexible-shipping' ), __( get_option( 'woocommerce_weight_unit' ) ) ),
8
+ );
9
+
10
+
11
+ $key = 'method_rules[xxx][based_on]';
12
+ $args_based_on = array(
13
+ 'label' => __( 'When:', 'flexible-shipping' ),
14
+ 'type' => 'select',
15
+ 'options' => $options_based_on,
16
+ 'input_class' => array( 'hs-beacon-search', 'condition_field' ),
17
+ 'custom_attributes' => array(
18
+ 'data-beacon_search' => __( 'Based on', 'flexible-shipping' ),
19
+ ),
20
+ 'return' => true,
21
+ );
22
+ $value = 'none';
23
+ $field_based_on = woocommerce_form_field( $key, $args_based_on, $value );
24
+
25
+ $key = 'method_rules[xxx][min]';
26
+ $args_min = array(
27
+ 'label' => __( 'is from:', 'flexible-shipping' ),
28
+ 'type' => 'text',
29
+ 'return' => true,
30
+ 'input_class' => array( 'wc_input_price', 'hs-beacon-search', 'parameter_min' ),
31
+ 'custom_attributes' => array(
32
+ 'data-beacon_search' => __( 'Min', 'flexible-shipping' ),
33
+ ),
34
+ );
35
+ $value = '';
36
+ $field_min = woocommerce_form_field( $key, $args_min, wc_format_localized_price( $value ) );
37
+
38
+ $key = 'method_rules[xxx][max]';
39
+ $args_max = array(
40
+ 'label' => __( 'to:', 'flexible-shipping' ),
41
+ 'type' => 'text',
42
+ 'return' => true,
43
+ 'input_class' => array( 'wc_input_price', 'hs-beacon-search', 'parameter_max' ),
44
+ 'custom_attributes' => array(
45
+ 'data-beacon_search' => __( 'Max', 'flexible-shipping' ),
46
+ ),
47
+ );
48
+ $value = '';
49
+ $field_max = woocommerce_form_field( $key, $args_max, wc_format_localized_price( $value ) );
50
+
51
+ $key = 'method_rules[xxx][cost_per_order]';
52
+ $args_cost_per_order = array(
53
+ 'label' => __( 'Rule cost:', 'flexible-shipping' ),
54
+ 'description' => __( get_woocommerce_currency_symbol( get_option( 'woocommerce_currency' ) ) ),
55
+ 'type' => 'text',
56
+ 'return' => true,
57
+ 'input_class' => array( 'wc_input_price', 'hs-beacon-search' ),
58
+ 'custom_attributes' => array(
59
+ 'data-beacon_search' => __( 'Cost per order', 'flexible-shipping' ),
60
+ ),
61
+ );
62
+ $value = '';
63
+ $field_cost_per_order = woocommerce_form_field( $key, $args_cost_per_order, wc_format_localized_price( $value ) );
64
+
65
+ $count_rules = 0;
66
+ ?>
67
+
68
+ <tr valign="top" class="flexible_shipping_method_rules">
69
+ <th class="forminp" colspan="2">
70
+ <label for="<?php echo esc_attr( $field_key ); ?>"><span id="<?php echo esc_attr( $field_key . '_label' ); ?>"><?php echo $data['title']; ?></span></label>
71
+ <?php
72
+ $fs_pro_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/' : 'https://flexibleshipping.com/table-rate/';
73
+
74
+ if ( ! in_array( 'flexible-shipping-pro/flexible-shipping-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ):
75
+ ?>
76
+ <p><?php printf( __( 'Check %sFlexible Shipping PRO &rarr;%s to add advanced rules based on shipment classes, product/item count or additional handling fees/insurance.', 'flexible-shipping' ), '<a href="' . $fs_pro_link . '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=flexible-shipping-pro&utm_content=fs-shippingzone-addnew-rules" target="_blank">', '</a>' ); ?></p>
77
+ <?php endif; ?>
78
+ <p><?php echo sprintf(
79
+ __( 'You are currently using the new rules table interface. You can always change it back on the %1$ssettings page%2$s.', 'flexible-shipping' ),
80
+ '<a href="' . esc_attr( admin_url( 'admin.php?page=wc-settings&tab=shipping&section=flexible_shipping_info#woocommerce_flexible_shipping_info_enable_new_rules_table' ) ) . '">',
81
+ '</a>'
82
+ ); ?></p>
83
+ </th>
84
+ </tr>
85
+ <tr valign="top" class="flexible_shipping_method_rules">
86
+ <td colspan="2" style="padding:0;">
87
+ <table id="<?php echo esc_attr( $field_key ); ?>" class="flexible_shipping_rules wc_input_table sortable widefat fs_new_interface">
88
+ <thead>
89
+ <tr>
90
+ <th class="sort">&nbsp;</th>
91
+ <th class="cb"><input type="checkbox" class="cb"></th>
92
+ <th class="rule_costs">
93
+ <?php _e( 'Costs', 'flexible-shipping' ); ?>
94
+ <span class="woocommerce-help-tip" data-tip="<?php _e( 'Enter shipment cost for this rule.', 'flexible-shipping' ); ?>"></span>
95
+ </th>
96
+ <th class="rule_conditions">
97
+ <?php _e( 'Conditions', 'flexible-shipping' ); ?>
98
+ <span class="woocommerce-help-tip" data-tip="<?php _e( 'Shipping cost will be calculated when condition is met.', 'flexible-shipping' ); ?>"></span>
99
+ </th>
100
+ </tr>
101
+ </thead>
102
+ <tbody>
103
+ <?php if ( isset( $data['default'] ) ) : ?>
104
+ <?php foreach ( $data['default'] as $key => $rule ) : $count_rules++; ?>
105
+ <tr>
106
+ <td class="sort"></td>
107
+ <td class="cb"><input type="checkbox" class="cb rule_cb"></td>
108
+ <td class="cost_per_order">
109
+ <?php
110
+ $key = 'method_rules[' . $count_rules . '][cost_per_order]';
111
+ $value = '';
112
+ if ( isset( $rule['cost_per_order'] ) ) {
113
+ $value = $rule['cost_per_order'];
114
+ }
115
+ echo woocommerce_form_field( $key, $args_cost_per_order, wc_format_localized_price( $value ) );
116
+ ?>
117
+ </td>
118
+ <td class="rule_conditions">
119
+ <div class="rule_conditions">
120
+ <div class="single_rule_condition">
121
+ <?php
122
+ $key = 'method_rules[' . $count_rules . '][based_on]';
123
+ $value = '';
124
+ if ( isset( $rule['based_on'] ) ) {
125
+ $value = $rule['based_on'];
126
+ }
127
+ echo woocommerce_form_field( $key, $args_based_on, $value );
128
+ ?>
129
+ <?php
130
+ $key = 'method_rules[' . $count_rules . '][min]';
131
+ $value = '';
132
+ if ( isset( $rule['min'] ) ) {
133
+ $value = $rule['min'];
134
+ }
135
+ echo woocommerce_form_field( $key, $args_min, wc_format_localized_price( $value ) );
136
+ ?>
137
+ <?php
138
+ $key = 'method_rules[' . $count_rules . '][max]';
139
+ $value = '';
140
+ if ( isset( $rule['max'] ) ) {
141
+ $value = $rule['max'];
142
+ }
143
+ echo woocommerce_form_field( $key, $args_max, wc_format_localized_price( $value ) );
144
+ ?>
145
+ </div>
146
+ </div>
147
+ </td>
148
+ </tr>
149
+ <?php endforeach; ?>
150
+ <?php endif; ?>
151
+ </tbody>
152
+
153
+ <tfoot>
154
+ <tr>
155
+ <th colspan="99">
156
+ <button id="insert_rule" href="#" class="button plus insert"><?php _e( 'Insert rule', 'flexible-shipping' ); ?></button>
157
+ <button id="remove_rules" href="#" class="button minus" disabled="disabled"><?php _e( 'Delete selected rules', 'flexible-shipping' ); ?></button>
158
+ </th>
159
+ </tr>
160
+ </tfoot>
161
+ </table>
162
+
163
+ <script type="text/javascript">
164
+ function append_row( id ) {
165
+ var code = '<tr class="new">\
166
+ <td class="sort"></td>\
167
+ <td class="cb"><input type="checkbox" class="cb"></td> \
168
+ <td class="rule_costs">\
169
+ <?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_cost_per_order ) ) ); ?> \
170
+ </td>\
171
+ <td class="rule_conditions">\
172
+ <div class="rule_conditions">\
173
+ <div class="single_rule_condition">\
174
+ <?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_based_on ) ) ); ?> \
175
+ <?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_min ) ) ); ?> \
176
+ <?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_max ) ) ); ?> \
177
+ </div>\
178
+ </div>\
179
+ </td>\
180
+ </tr>';
181
+ var code2 = code.replace(/xxx/g, id );
182
+ var $tbody = jQuery('#<?php echo esc_attr( $field_key ); ?>').find('tbody');
183
+ $tbody.append( code2 );
184
+ jQuery('.condition_field').trigger('change');
185
+ }
186
+ jQuery(document).ready(function() {
187
+ var tbody = jQuery('#<?php echo esc_attr( $field_key ); ?>').find('tbody');
188
+ var append_id = <?php echo $count_rules ?>;
189
+ var size = tbody.find('tr').size();
190
+
191
+ if ( size === 0 ) {
192
+ append_id = append_id+1;
193
+ append_row(append_id);
194
+ jQuery('#insert_rule').trigger( 'insert_rule' , [append_id] );
195
+ }
196
+
197
+ jQuery('#insert_rule').click(function() {
198
+ append_id = append_id+1;
199
+ append_row(append_id);
200
+ jQuery('#rules_'+append_id+'_min').focus();
201
+ jQuery('#insert_rule').trigger( 'insert_rule' , [append_id] );
202
+ return false;
203
+ });
204
+
205
+ jQuery('#remove_rules').click(function() {
206
+ jQuery('td input.cb').each(function(){
207
+ if (jQuery(this).is(':checked')) {
208
+ jQuery(this).closest('tr').remove();
209
+ }
210
+ });
211
+ jQuery('td input.cb').trigger('change');
212
+ return false;
213
+ });
214
+
215
+ jQuery(document).on('click', '.delete_rule', function() {
216
+ if (confirm('<?php _e( 'Are you sure?' , 'flexible-shipping' ); ?>')) {
217
+ jQuery(this).closest('tr').remove();
218
+ }
219
+ return false;
220
+ });
221
+
222
+ jQuery(document).on('click', 'th input.cb', function(){
223
+ if (jQuery(this).is(':checked')) {
224
+ jQuery('td input.cb').attr('checked', 'checked');
225
+ } else {
226
+ jQuery('td input.cb').removeAttr('checked');
227
+ }
228
+ });
229
+
230
+ jQuery(document).on('change', 'input.cb', function(){
231
+ jQuery('#remove_rules').attr('disabled', 'disabled');
232
+ jQuery('td input.cb').each(function(){
233
+ if (jQuery(this).is(':checked')) {
234
+ jQuery('#remove_rules').removeAttr('disabled');
235
+ }
236
+ });
237
+ });
238
+
239
+ jQuery(document).on('click', 'td input.cb.rule_cb', function(){
240
+ jQuery('th input.cb').removeAttr('checked');
241
+ });
242
+
243
+ jQuery(document).on('change', 'select.condition_field', function(){
244
+ let toggle = jQuery(this).val() !== 'none';
245
+ jQuery(this).closest('.single_rule_condition').find('.parameter_min').closest('p.form-row').toggle(toggle);
246
+ jQuery(this).closest('.single_rule_condition').find('.parameter_max').closest('p.form-row').toggle(toggle);
247
+ });
248
+
249
+ jQuery('select.condition_field').each(function(){
250
+ jQuery(this).trigger('change');
251
+ });
252
+
253
+ jQuery('#mainform').attr('action', '<?php echo remove_query_arg( 'added', add_query_arg( 'added', '1' ) ); ?>' );
254
+
255
+ jQuery( '.wc_input_table' ).on( 'focus click', 'input', function( e ) {
256
+ var $this_table = jQuery( this ).closest( 'table, tbody' );
257
+ jQuery( 'tr', $this_table ).removeClass( 'current' ).removeClass( 'last_selected' );
258
+ })
259
+ });
260
+ </script>
261
+ <script type="text/javascript">
262
+ <?php
263
+ $zone = WC_Shipping_Zones::get_zone_by( 'instance_id', sanitize_key( $_GET['instance_id'] ) );
264
+ $shipping_method_woo = WC_Shipping_Zones::get_shipping_method( sanitize_key( $_GET['instance_id'] ) );
265
+ $content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'woocommerce' ) . '</a> &gt ';
266
+ $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> &gt ';
267
+ $content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] ) ) . '">' . esc_html( $shipping_method_woo->get_title() ) . '</a>';
268
+ if ( isset( $data['method_title'] ) && $data['method_title'] != '' ) {
269
+ $content .= ' &gt ';
270
+ $content .= esc_html( $data['method_title'] );
271
+ }
272
+ else {
273
+ $content .= ' &gt ';
274
+ $content .= __( 'Add New', 'flexible-shipping' );
275
+ }
276
+ ?>
277
+ jQuery('#mainform h2').first().replaceWith( '<h2>' + '<?php echo $content; ?>' + '</h2>' );
278
+ </script>
279
+ </td>
280
+ </tr>
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8609bef71e8139e3d165dce75681d32c::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitafb063eabe97243cd9e95aa0d780ed05::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -211,6 +211,14 @@ return array(
211
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Thickbox' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
212
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Tracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
213
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
 
 
 
 
 
 
 
 
214
  'FSVendor\\WPDesk\\View\\PluginViewBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
215
  'FSVendor\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
216
  'FSVendor\\WPDesk\\View\\Renderer\\Renderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
@@ -267,6 +275,7 @@ return array(
267
  'FSVendor\\WPDesk_Tracker_Data_Provider_Wordpress' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
268
  'FSVendor\\WPDesk_Tracker_Factory_Prefixed' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
269
  'FSVendor\\WPDesk_Tracker_Interface' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
 
270
  'FSVendor\\WPDesk_Tracker_Sender' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
271
  'FSVendor\\WPDesk_Tracker_Sender_Exception_WpError' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
272
  'FSVendor\\WPDesk_Tracker_Sender_Logged' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
@@ -295,7 +304,41 @@ return array(
295
  'WPDesk\\FS\\Rate\\SecondRateNotice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/second-rate-notice.php',
296
  'WPDesk\\FS\\Rate\\ThirdRateNotice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/third-rate-notice.php',
297
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
 
 
 
 
 
 
298
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  'WPDesk_Flexible_Shipping' => $baseDir . '/classes/table-rate/shipping-method.php',
300
  'WPDesk_Flexible_Shipping_AB_Deactivation_Contact_Information' => $baseDir . '/classes/table-rate/abtests/class-ab-deactivation-contact-information.php',
301
  'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => $baseDir . '/classes/table-rate/abtests/class-ab-tracker-deactivation-data.php',
@@ -347,8 +390,12 @@ return array(
347
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
348
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
349
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
 
 
350
  'WPDesk_Tracker_Data_Provider' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
351
  'WPDesk_Tracker_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
352
  'WPDesk_Tracker_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
353
  'WPDesk_Tracker_Sender' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
 
 
354
  );
211
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Thickbox' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
212
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Tracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
213
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
214
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\AjaxUserFeedbackDataHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/AjaxUserFeedbackDataHandler.php',
215
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Scripts' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Scripts.php',
216
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Thickbox' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Thickbox.php',
217
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Tracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Tracker.php',
218
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\TrackerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/TrackerFactory.php',
219
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackContent' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackContent.php',
220
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackData' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackData.php',
221
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackOption' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackOption.php',
222
  'FSVendor\\WPDesk\\View\\PluginViewBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
223
  'FSVendor\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
224
  'FSVendor\\WPDesk\\View\\Renderer\\Renderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
275
  'FSVendor\\WPDesk_Tracker_Data_Provider_Wordpress' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
276
  'FSVendor\\WPDesk_Tracker_Factory_Prefixed' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
277
  'FSVendor\\WPDesk_Tracker_Interface' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
278
+ 'FSVendor\\WPDesk_Tracker_Persistence_Consent' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php',
279
  'FSVendor\\WPDesk_Tracker_Sender' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
280
  'FSVendor\\WPDesk_Tracker_Sender_Exception_WpError' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
281
  'FSVendor\\WPDesk_Tracker_Sender_Logged' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
304
  'WPDesk\\FS\\Rate\\SecondRateNotice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/second-rate-notice.php',
305
  'WPDesk\\FS\\Rate\\ThirdRateNotice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notices/third-rate-notice.php',
306
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => $baseDir . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
307
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\RulesPointerMessage' => $baseDir . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerMessage.php',
308
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\RulesPointerOption' => $baseDir . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerOption.php',
309
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\ShippingMethodNewRuleTableSetting' => $baseDir . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/ShippingMethodNewRuleTableSetting.php',
310
+ 'WPDesk\\FS\\TableRate\\NewRulesTableTracker' => $baseDir . '/src/WPDesk/FS/TableRate/NewRulesTableTracker.php',
311
+ 'WPDesk\\FS\\TableRate\\RulesSettingsField' => $baseDir . '/src/WPDesk/FS/TableRate/RulesSettingsField.php',
312
+ 'WPDesk\\FS\\TableRate\\UserFeedback' => $baseDir . '/src/WPDesk/FS/TableRate/UserFeedback.php',
313
  'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
314
+ 'WPDesk\\PluginBuilder\\BuildDirector\\LegacyBuildDirector' => $vendorDir . '/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php',
315
+ 'WPDesk\\PluginBuilder\\Builder\\AbstractBuilder' => $vendorDir . '/wpdesk/wp-builder/src/Builder/AbstractBuilder.php',
316
+ 'WPDesk\\PluginBuilder\\Builder\\InfoActivationBuilder' => $vendorDir . '/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php',
317
+ 'WPDesk\\PluginBuilder\\Builder\\InfoBuilder' => $vendorDir . '/wpdesk/wp-builder/src/Builder/InfoBuilder.php',
318
+ 'WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php',
319
+ 'WPDesk\\PluginBuilder\\Plugin\\Activateable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/Activateable.php',
320
+ 'WPDesk\\PluginBuilder\\Plugin\\ActivationAware' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/ActivationAware.php',
321
+ 'WPDesk\\PluginBuilder\\Plugin\\ActivationTracker' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/ActivationTracker.php',
322
+ 'WPDesk\\PluginBuilder\\Plugin\\Conditional' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/Conditional.php',
323
+ 'WPDesk\\PluginBuilder\\Plugin\\Deactivateable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/Deactivateable.php',
324
+ 'WPDesk\\PluginBuilder\\Plugin\\Hookable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/Hookable.php',
325
+ 'WPDesk\\PluginBuilder\\Plugin\\HookableCollection' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/HookableCollection.php',
326
+ 'WPDesk\\PluginBuilder\\Plugin\\HookableParent' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/HookableParent.php',
327
+ 'WPDesk\\PluginBuilder\\Plugin\\HookablePluginDependant' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php',
328
+ 'WPDesk\\PluginBuilder\\Plugin\\PluginAccess' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/PluginAccess.php',
329
+ 'WPDesk\\PluginBuilder\\Plugin\\SlimPlugin' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/SlimPlugin.php',
330
+ 'WPDesk\\PluginBuilder\\Plugin\\TemplateLoad' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/TemplateLoad.php',
331
+ 'WPDesk\\PluginBuilder\\Storage\\Exception\\ClassAlreadyExists' => $vendorDir . '/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php',
332
+ 'WPDesk\\PluginBuilder\\Storage\\Exception\\ClassNotExists' => $vendorDir . '/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php',
333
+ 'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
334
+ 'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
335
+ 'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
336
+ 'WPDesk\\PluginBuilder\\Storage\\WordpressFilterStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php',
337
+ 'WPDesk\\Pointer\\PointerConditions' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php',
338
+ 'WPDesk\\Pointer\\PointerMessage' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
339
+ 'WPDesk\\Pointer\\PointerPosition' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
340
+ 'WPDesk\\Pointer\\PointersScripts' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
341
+ 'WPDesk_Buildable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php',
342
  'WPDesk_Flexible_Shipping' => $baseDir . '/classes/table-rate/shipping-method.php',
343
  'WPDesk_Flexible_Shipping_AB_Deactivation_Contact_Information' => $baseDir . '/classes/table-rate/abtests/class-ab-deactivation-contact-information.php',
344
  'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => $baseDir . '/classes/table-rate/abtests/class-ab-tracker-deactivation-data.php',
390
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
391
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => $baseDir . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
392
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => $baseDir . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
393
+ 'WPDesk_Has_Plugin_Info' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php',
394
+ 'WPDesk_Plugin_Info' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php',
395
  'WPDesk_Tracker_Data_Provider' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
396
  'WPDesk_Tracker_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
397
  'WPDesk_Tracker_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
398
  'WPDesk_Tracker_Sender' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
399
+ 'WPDesk_Translable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php',
400
+ 'WPDesk_Translatable' => $vendorDir . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php',
401
  );
vendor/composer/autoload_psr4.php CHANGED
@@ -6,5 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
9
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
 
10
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'WPDesk\\Pointer\\' => array($vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer'),
10
+ 'WPDesk\\PluginBuilder\\' => array($vendorDir . '/wpdesk/wp-builder/src'),
11
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
12
+ '' => array($baseDir . '/src'),
13
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8609bef71e8139e3d165dce75681d32c
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit8609bef71e8139e3d165dce75681d32c
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit8609bef71e8139e3d165dce75681d32c', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit8609bef71e8139e3d165dce75681d32c', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit8609bef71e8139e3d165dce75681d32c::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitafb063eabe97243cd9e95aa0d780ed05
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitafb063eabe97243cd9e95aa0d780ed05', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitafb063eabe97243cd9e95aa0d780ed05', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,9 +4,14 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
8
  {
9
  public static $prefixLengthsPsr4 = array (
 
 
 
 
 
10
  'P' =>
11
  array (
12
  'Psr\\Log\\' => 8,
@@ -14,12 +19,24 @@ class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
14
  );
15
 
16
  public static $prefixDirsPsr4 = array (
 
 
 
 
 
 
 
 
17
  'Psr\\Log\\' =>
18
  array (
19
  0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
20
  ),
21
  );
22
 
 
 
 
 
23
  public static $classMap = array (
24
  'FSVendor\\Monolog\\ErrorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
25
  'FSVendor\\Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
@@ -226,6 +243,14 @@ class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
226
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Thickbox' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
227
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Tracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
228
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
 
 
 
 
 
 
 
 
229
  'FSVendor\\WPDesk\\View\\PluginViewBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
230
  'FSVendor\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
231
  'FSVendor\\WPDesk\\View\\Renderer\\Renderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
@@ -282,6 +307,7 @@ class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
282
  'FSVendor\\WPDesk_Tracker_Data_Provider_Wordpress' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
283
  'FSVendor\\WPDesk_Tracker_Factory_Prefixed' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
284
  'FSVendor\\WPDesk_Tracker_Interface' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
 
285
  'FSVendor\\WPDesk_Tracker_Sender' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
286
  'FSVendor\\WPDesk_Tracker_Sender_Exception_WpError' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
287
  'FSVendor\\WPDesk_Tracker_Sender_Logged' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
@@ -310,7 +336,41 @@ class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
310
  'WPDesk\\FS\\Rate\\SecondRateNotice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/second-rate-notice.php',
311
  'WPDesk\\FS\\Rate\\ThirdRateNotice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/third-rate-notice.php',
312
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
 
 
 
 
 
 
313
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
  'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/table-rate/shipping-method.php',
315
  'WPDesk_Flexible_Shipping_AB_Deactivation_Contact_Information' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-ab-deactivation-contact-information.php',
316
  'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-ab-tracker-deactivation-data.php',
@@ -362,18 +422,23 @@ class ComposerStaticInit8609bef71e8139e3d165dce75681d32c
362
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
363
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
364
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
 
 
365
  'WPDesk_Tracker_Data_Provider' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
366
  'WPDesk_Tracker_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
367
  'WPDesk_Tracker_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
368
  'WPDesk_Tracker_Sender' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
 
 
369
  );
370
 
371
  public static function getInitializer(ClassLoader $loader)
372
  {
373
  return \Closure::bind(function () use ($loader) {
374
- $loader->prefixLengthsPsr4 = ComposerStaticInit8609bef71e8139e3d165dce75681d32c::$prefixLengthsPsr4;
375
- $loader->prefixDirsPsr4 = ComposerStaticInit8609bef71e8139e3d165dce75681d32c::$prefixDirsPsr4;
376
- $loader->classMap = ComposerStaticInit8609bef71e8139e3d165dce75681d32c::$classMap;
 
377
 
378
  }, null, ClassLoader::class);
379
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
+ 'W' =>
11
+ array (
12
+ 'WPDesk\\Pointer\\' => 15,
13
+ 'WPDesk\\PluginBuilder\\' => 21,
14
+ ),
15
  'P' =>
16
  array (
17
  'Psr\\Log\\' => 8,
19
  );
20
 
21
  public static $prefixDirsPsr4 = array (
22
+ 'WPDesk\\Pointer\\' =>
23
+ array (
24
+ 0 => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer',
25
+ ),
26
+ 'WPDesk\\PluginBuilder\\' =>
27
+ array (
28
+ 0 => __DIR__ . '/..' . '/wpdesk/wp-builder/src',
29
+ ),
30
  'Psr\\Log\\' =>
31
  array (
32
  0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
33
  ),
34
  );
35
 
36
+ public static $fallbackDirsPsr4 = array (
37
+ 0 => __DIR__ . '/../..' . '/src',
38
+ );
39
+
40
  public static $classMap = array (
41
  'FSVendor\\Monolog\\ErrorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
42
  'FSVendor\\Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
243
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Thickbox' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
244
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\Tracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
245
  'FSVendor\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
246
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\AjaxUserFeedbackDataHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/AjaxUserFeedbackDataHandler.php',
247
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Scripts' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Scripts.php',
248
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Thickbox' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Thickbox.php',
249
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\Tracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Tracker.php',
250
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\TrackerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/TrackerFactory.php',
251
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackContent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackContent.php',
252
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackData' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackData.php',
253
+ 'FSVendor\\WPDesk\\Tracker\\UserFeedback\\UserFeedbackOption' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackOption.php',
254
  'FSVendor\\WPDesk\\View\\PluginViewBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
255
  'FSVendor\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
256
  'FSVendor\\WPDesk\\View\\Renderer\\Renderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
307
  'FSVendor\\WPDesk_Tracker_Data_Provider_Wordpress' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
308
  'FSVendor\\WPDesk_Tracker_Factory_Prefixed' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
309
  'FSVendor\\WPDesk_Tracker_Interface' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
310
+ 'FSVendor\\WPDesk_Tracker_Persistence_Consent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php',
311
  'FSVendor\\WPDesk_Tracker_Sender' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
312
  'FSVendor\\WPDesk_Tracker_Sender_Exception_WpError' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
313
  'FSVendor\\WPDesk_Tracker_Sender_Logged' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
336
  'WPDesk\\FS\\Rate\\SecondRateNotice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/second-rate-notice.php',
337
  'WPDesk\\FS\\Rate\\ThirdRateNotice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notices/third-rate-notice.php',
338
  'WPDesk\\FS\\Rate\\WPDesk_Flexible_Shipping_Rate_Notice' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/rate-notice.php',
339
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\RulesPointerMessage' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerMessage.php',
340
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\RulesPointerOption' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/RulesPointerOption.php',
341
+ 'WPDesk\\FS\\TableRate\\NewRulesTablePointer\\ShippingMethodNewRuleTableSetting' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/NewRulesTablePointer/ShippingMethodNewRuleTableSetting.php',
342
+ 'WPDesk\\FS\\TableRate\\NewRulesTableTracker' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/NewRulesTableTracker.php',
343
+ 'WPDesk\\FS\\TableRate\\RulesSettingsField' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/RulesSettingsField.php',
344
+ 'WPDesk\\FS\\TableRate\\UserFeedback' => __DIR__ . '/../..' . '/src/WPDesk/FS/TableRate/UserFeedback.php',
345
  'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
346
+ 'WPDesk\\PluginBuilder\\BuildDirector\\LegacyBuildDirector' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php',
347
+ 'WPDesk\\PluginBuilder\\Builder\\AbstractBuilder' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Builder/AbstractBuilder.php',
348
+ 'WPDesk\\PluginBuilder\\Builder\\InfoActivationBuilder' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php',
349
+ 'WPDesk\\PluginBuilder\\Builder\\InfoBuilder' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Builder/InfoBuilder.php',
350
+ 'WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php',
351
+ 'WPDesk\\PluginBuilder\\Plugin\\Activateable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/Activateable.php',
352
+ 'WPDesk\\PluginBuilder\\Plugin\\ActivationAware' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/ActivationAware.php',
353
+ 'WPDesk\\PluginBuilder\\Plugin\\ActivationTracker' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/ActivationTracker.php',
354
+ 'WPDesk\\PluginBuilder\\Plugin\\Conditional' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/Conditional.php',
355
+ 'WPDesk\\PluginBuilder\\Plugin\\Deactivateable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/Deactivateable.php',
356
+ 'WPDesk\\PluginBuilder\\Plugin\\Hookable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/Hookable.php',
357
+ 'WPDesk\\PluginBuilder\\Plugin\\HookableCollection' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/HookableCollection.php',
358
+ 'WPDesk\\PluginBuilder\\Plugin\\HookableParent' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/HookableParent.php',
359
+ 'WPDesk\\PluginBuilder\\Plugin\\HookablePluginDependant' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php',
360
+ 'WPDesk\\PluginBuilder\\Plugin\\PluginAccess' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/PluginAccess.php',
361
+ 'WPDesk\\PluginBuilder\\Plugin\\SlimPlugin' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/SlimPlugin.php',
362
+ 'WPDesk\\PluginBuilder\\Plugin\\TemplateLoad' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/TemplateLoad.php',
363
+ 'WPDesk\\PluginBuilder\\Storage\\Exception\\ClassAlreadyExists' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php',
364
+ 'WPDesk\\PluginBuilder\\Storage\\Exception\\ClassNotExists' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php',
365
+ 'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
366
+ 'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
367
+ 'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
368
+ 'WPDesk\\PluginBuilder\\Storage\\WordpressFilterStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php',
369
+ 'WPDesk\\Pointer\\PointerConditions' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php',
370
+ 'WPDesk\\Pointer\\PointerMessage' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
371
+ 'WPDesk\\Pointer\\PointerPosition' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
372
+ 'WPDesk\\Pointer\\PointersScripts' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
373
+ 'WPDesk_Buildable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php',
374
  'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/table-rate/shipping-method.php',
375
  'WPDesk_Flexible_Shipping_AB_Deactivation_Contact_Information' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-ab-deactivation-contact-information.php',
376
  'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/table-rate/abtests/class-ab-tracker-deactivation-data.php',
422
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-file-exception.php',
423
  'WPDesk_Flexible_Shipping_Unable_To_Create_Tmp_Zip_File_Exception' => __DIR__ . '/../..' . '/classes/wp-wpdesk-fs-shipment/exception/class-shipment-unable-to-create-tmp-zip-file-exception.php',
424
  'WPDesk_Flexible_Shipping_WooCommerce_Context_Logger' => __DIR__ . '/../..' . '/classes/table-rate/logger/class-woocommerce-context-logger.php',
425
+ 'WPDesk_Has_Plugin_Info' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php',
426
+ 'WPDesk_Plugin_Info' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php',
427
  'WPDesk_Tracker_Data_Provider' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
428
  'WPDesk_Tracker_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
429
  'WPDesk_Tracker_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
430
  'WPDesk_Tracker_Sender' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
431
+ 'WPDesk_Translable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php',
432
+ 'WPDesk_Translatable' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php',
433
  );
434
 
435
  public static function getInitializer(ClassLoader $loader)
436
  {
437
  return \Closure::bind(function () use ($loader) {
438
+ $loader->prefixLengthsPsr4 = ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05::$prefixLengthsPsr4;
439
+ $loader->prefixDirsPsr4 = ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05::$prefixDirsPsr4;
440
+ $loader->fallbackDirsPsr4 = ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05::$fallbackDirsPsr4;
441
+ $loader->classMap = ComposerStaticInitafb063eabe97243cd9e95aa0d780ed05::$classMap;
442
 
443
  }, null, ClassLoader::class);
444
  }
vendor/composer/installed.json CHANGED
@@ -48,6 +48,104 @@
48
  "psr-3"
49
  ]
50
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  {
52
  "name": "wpdesk/wp-wpdesk-helper-override",
53
  "version": "1.1.0",
48
  "psr-3"
49
  ]
50
  },
51
+ {
52
+ "name": "wpdesk/wp-builder",
53
+ "version": "1.4.4",
54
+ "version_normalized": "1.4.4.0",
55
+ "source": {
56
+ "type": "git",
57
+ "url": "https://gitlab.com/wpdesk/wp-builder.git",
58
+ "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9"
59
+ },
60
+ "dist": {
61
+ "type": "zip",
62
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-builder/repository/archive.zip?sha=e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
63
+ "reference": "e18df43bc3bc047c7bc0ed3e52eabb16118f4bc9",
64
+ "shasum": ""
65
+ },
66
+ "require": {
67
+ "php": ">=5.5"
68
+ },
69
+ "require-dev": {
70
+ "10up/wp_mock": "*",
71
+ "mockery/mockery": "*",
72
+ "phpunit/phpunit": "<7",
73
+ "squizlabs/php_codesniffer": "^3.0.2",
74
+ "wimg/php-compatibility": "^8",
75
+ "wp-coding-standards/wpcs": "^0.14.1"
76
+ },
77
+ "time": "2020-06-17T08:00:07+00:00",
78
+ "type": "library",
79
+ "installation-source": "dist",
80
+ "autoload": {
81
+ "psr-4": {
82
+ "WPDesk\\PluginBuilder\\": "src/"
83
+ },
84
+ "classmap": [
85
+ "src/Plugin/WithoutNamespace"
86
+ ]
87
+ },
88
+ "notification-url": "https://packagist.org/downloads/",
89
+ "authors": [
90
+ {
91
+ "name": "Krzysiek",
92
+ "email": "krzysiek@wpdesk.pl"
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "name": "wpdesk/wp-pointer",
98
+ "version": "2.0.0",
99
+ "version_normalized": "2.0.0.0",
100
+ "source": {
101
+ "type": "git",
102
+ "url": "https://gitlab.com/wpdesk/wp-pointer.git",
103
+ "reference": "2468b7f3412ba3dafbf3b8964b23ead89138102f"
104
+ },
105
+ "dist": {
106
+ "type": "zip",
107
+ "url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-pointer/repository/archive.zip?sha=2468b7f3412ba3dafbf3b8964b23ead89138102f",
108
+ "reference": "2468b7f3412ba3dafbf3b8964b23ead89138102f",
109
+ "shasum": ""
110
+ },
111
+ "require": {
112
+ "php": ">=5.5",
113
+ "wpdesk/wp-builder": "^1.1"
114
+ },
115
+ "require-dev": {
116
+ "10up/wp_mock": "*",
117
+ "mockery/mockery": "*",
118
+ "phpunit/phpunit": "<7",
119
+ "squizlabs/php_codesniffer": "^3.0.2",
120
+ "wimg/php-compatibility": "^8",
121
+ "wp-coding-standards/wpcs": "^0.14.1"
122
+ },
123
+ "time": "2020-07-14T15:33:40+00:00",
124
+ "type": "library",
125
+ "installation-source": "dist",
126
+ "autoload": {
127
+ "psr-4": {
128
+ "WPDesk\\Pointer\\": "src/WPDesk/Pointer/"
129
+ }
130
+ },
131
+ "notification-url": "https://packagist.org/downloads/",
132
+ "license": [
133
+ "MIT"
134
+ ],
135
+ "authors": [
136
+ {
137
+ "name": "grola",
138
+ "email": "grola@wpdesk.net"
139
+ }
140
+ ],
141
+ "description": "Library for displaying Wordpress pointer messages.",
142
+ "homepage": "https://gitlab.com/wpdesk/wp-pointer",
143
+ "keywords": [
144
+ "admin",
145
+ "pointer",
146
+ "wordpress"
147
+ ]
148
+ },
149
  {
150
  "name": "wpdesk/wp-wpdesk-helper-override",
151
  "version": "1.1.0",
vendor/wpdesk/wp-builder/.editorconfig ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is for unifying the coding style for different editors and IDEs
2
+ # editorconfig.org
3
+
4
+ # WordPress Coding Standards
5
+ # https://make.wordpress.org/core/handbook/coding-standards/
6
+
7
+ root = true
8
+
9
+ [*]
10
+ charset = utf-8
11
+ end_of_line = lf
12
+ insert_final_newline = true
13
+ trim_trailing_whitespace = true
14
+ indent_style = tab
15
+
16
+ [*.yml]
17
+ indent_style = space
18
+ indent_size = 2
19
+
20
+ [*.md]
21
+ trim_trailing_whitespace = false
vendor/wpdesk/wp-builder/.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /vendor/
2
+ .idea
3
+ composer.lock
vendor/wpdesk/wp-builder/.gitlab/issue_templates/Bug.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Select WooCommerce version e.g: [x] 2.6
2
+ <!--- Select the WooCommerce version on which the error occurred -->
3
+
4
+ - [ ] [2.6](http://woo26.tests.wpdesk.org)
5
+ - [ ] [2.7](http://woo27.tests.wpdesk.org)
6
+ - [ ] [3.0](http://woo30.tests.wpdesk.org)
7
+ - [ ] [3.1](http://woo31.tests.wpdesk.org)
8
+ - [ ] [3.2](http://woo32.tests.wpdesk.org)
9
+ - [ ] [3.3](http://woo33.tests.wpdesk.org)
10
+ - [ ] [3.4](http://woo34.tests.wpdesk.org)
11
+ - [ ] [Stable](https://stable.wpdesk.org/)
12
+
13
+ ### Select PHP version e.g: [x] 5.6
14
+ <!--- Select the PHP version on which the error occurred -->
15
+
16
+ - [ ] 5.3
17
+ - [ ] 5.5
18
+ - [ ] 5.6
19
+ - [ ] 7.1
20
+ - [ ] 7.2
21
+
22
+ ## Steps to Reproduce
23
+ <!--- Provide a link to a live example, or an unambiguous set of steps to -->
24
+
25
+ 1.
26
+ 2.
27
+
28
+
29
+ ## Expected Behavior
30
+ <!--- Tell what should happen -->
31
+
32
+ 1.
vendor/wpdesk/wp-builder/CHANGELOG.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## [1.4.4] - 2020-06-17
2
+ ### Fixed
3
+ - Replaced class_exists to interface_exists for interfaces
4
+
5
+
6
+ ## [1.4.3] - 2020-06-03
7
+ ### Fixed
8
+ - Path for require_once
9
+
10
+ ## [1.4.2] - 2020-05-15
11
+ ### Changed
12
+ - Settings should open in default target
13
+
14
+ ## [1.4.1] - 2019-11-19
15
+ ### Fixed
16
+ - Invalid return type in Hookable interface
17
+
18
+ ## [1.4.0] - 2019-09-26
19
+ ### Added
20
+ - SlimPlugin - abstract class with only most important plugin elements
21
+ - AbstractPlugin - docs and cleaning
22
+ - Activateable - interface to tag plugin to hook into activation hook
23
+ - Deactivateable - interface to tag plugin to hook into deactivation hook
24
+ - Conditional - interface to tag classes that should be instantiated/hooked only in given state
25
+ ### Changed
26
+ - WordpressFilterStorage - store plugin using WordPress filter system
27
+ - target blank in default plugin links
28
+ ### Fixed
29
+ - Fixed assets and plugin url issues
30
+
31
+ ## [1.3.4] - 2019-09-26
32
+ ### Fixed
33
+ - Gitlab.ci
34
+
35
+ ## [1.3.3] - 2019-09-24
36
+ ### Added
37
+ - Support URL
38
+
39
+ ## [1.3.2] - 2019-09-18
40
+ ### Fixed
41
+ - Forgotten classes
42
+ - Fixed require_once
43
+
44
+ ## [1.3.0] - 2019-09-18
45
+ ### Added
46
+ - Plugin classes from wp-requirements
47
+
48
+ ## [1.2.0] - 2019-06-26
49
+ ### Added
50
+ - InfoActivationBuilder with capability to set info if plugin subscription is active
vendor/wpdesk/wp-builder/apigen.neon ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ destination: docs
2
+ templateConfig: /app/theme-woocommerce/config.neon
3
+ extensions: [php]
4
+ source:
5
+ - src
6
+ exclude:
7
+ - vendor
8
+ - tests
9
+ - languages
10
+
11
+ charset: [UTF-8]
12
+ main: Library wp-builder
13
+ title: Library that provides basic info how build a plugin and what a plugin is
14
+ baseUrl: "/"
15
+
16
+ templateTheme: default
17
+ php: false
18
+ sourceCode: false
19
+ tree: true
20
+ deprecated: false
21
+ todo: false
22
+ download: false
23
+
24
+ accessLevels:
25
+ - public
26
+ - private
27
+ - protected
vendor/wpdesk/wp-builder/composer.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "wpdesk/wp-builder",
3
+ "authors": [
4
+ {
5
+ "name": "Krzysiek",
6
+ "email": "krzysiek@wpdesk.pl"
7
+ }
8
+ ],
9
+ "require": {
10
+ "php": ">=5.5"
11
+ },
12
+ "require-dev": {
13
+ "phpunit/phpunit": "<7",
14
+ "wp-coding-standards/wpcs": "^0.14.1",
15
+ "squizlabs/php_codesniffer": "^3.0.2",
16
+ "mockery/mockery": "*",
17
+ "10up/wp_mock": "*",
18
+ "wimg/php-compatibility": "^8"
19
+ },
20
+ "autoload": {
21
+ "psr-4": {"WPDesk\\PluginBuilder\\": "src/"},
22
+ "classmap": ["src/Plugin/WithoutNamespace"]
23
+ },
24
+ "autoload-dev": {
25
+ },
26
+ "scripts": {
27
+ "phpcs": "phpcs",
28
+ "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
29
+ "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
30
+ "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
31
+ "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage"
32
+ }
33
+ }
vendor/wpdesk/wp-builder/phpcs.xml.dist ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <ruleset name="WordPress Coding Standards for WP Desk Plugin">
3
+ <description>Sniffs for WordPress WPDesk plugins</description>
4
+
5
+ <config name="installed_paths" value="vendor/wp-coding-standards/wpcs,vendor/wimg/php-compatibility" />
6
+
7
+ <rule ref="PHPCompatibility"/>
8
+ <config name="testVersion" value="5.5-"/>
9
+
10
+ <rule ref="WordPress"/>
11
+
12
+ <config name="text_domain" value="wpdesk-plugin,default,s214-settings-demo"/>
13
+
14
+ <arg name="extensions" value="php"/>
15
+
16
+ <file>./classes</file>
17
+ <exclude-pattern>*/settings-api/*</exclude-pattern>
18
+ </ruleset>
vendor/wpdesk/wp-builder/phpunit-integration.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit bootstrap="tests/integration/bootstrap.php"
2
+ backupGlobals="false"
3
+ >
4
+ <testsuites>
5
+ <testsuite>
6
+ <directory prefix="Test_" suffix=".php">./tests/integration</directory>
7
+ </testsuite>
8
+ </testsuites>
9
+
10
+ <filter>
11
+ <whitelist>
12
+ <directory suffix=".php">classes</directory>
13
+ </whitelist>
14
+ </filter>
15
+
16
+ <logging>
17
+ <log type="junit" target="build-coverage/report.junit.xml"/>
18
+ <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
19
+ <log type="coverage-text" target="build-coverage/coverage.txt"/>
20
+ <log type="coverage-clover" target="build-coverage/clover.xml"/>
21
+ </logging>
22
+
23
+ <php>
24
+ <env name="WP_DEVELOP_DIR" value="/tmp/wordpress-develop"/>
25
+ <env name="WC_DEVELOP_DIR" value="/tmp/woocommerce"/>
26
+ </php>
27
+
28
+ </phpunit>
vendor/wpdesk/wp-builder/phpunit-unit.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit bootstrap="tests/unit/bootstrap.php">
2
+ <testsuites>
3
+ <testsuite>
4
+ <directory prefix="test-" suffix=".php">./tests/unit/</directory>
5
+ </testsuite>
6
+ </testsuites>
7
+
8
+ <filter>
9
+ <whitelist>
10
+ <directory suffix=".php">classes</directory>
11
+ </whitelist>
12
+ </filter>
13
+
14
+ <logging>
15
+ <log type="junit" target="build-coverage/report.junit.xml"/>
16
+ <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
17
+ <log type="coverage-text" target="build-coverage/coverage.txt"/>
18
+ <log type="coverage-clover" target="build-coverage/clover.xml"/>
19
+ </logging>
20
+
21
+ </phpunit>
vendor/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\BuildDirector;
4
+
5
+ use WPDesk\PluginBuilder\Builder\AbstractBuilder;
6
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
7
+ use WPDesk\PluginBuilder\Storage\StorageFactory;
8
+
9
+ class LegacyBuildDirector {
10
+
11
+ /** @var AbstractBuilder */
12
+ private $builder;
13
+
14
+ public function __construct( AbstractBuilder $builder ) {
15
+ $this->builder = $builder;
16
+ }
17
+
18
+ /**
19
+ * Builds plugin
20
+ */
21
+ public function build_plugin() {
22
+ $this->builder->build_plugin();
23
+ $this->builder->init_plugin();
24
+
25
+ $storage = new StorageFactory();
26
+ $this->builder->store_plugin( $storage->create_storage() );
27
+ }
28
+
29
+ /**
30
+ * Returns built plugin
31
+ *
32
+ * @return AbstractPlugin
33
+ */
34
+ public function get_plugin() {
35
+ return $this->builder->get_plugin();
36
+ }
37
+ }
vendor/wpdesk/wp-builder/src/Builder/AbstractBuilder.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Builder;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+ use WPDesk\PluginBuilder\Storage\PluginStorage;
7
+
8
+ abstract class AbstractBuilder {
9
+ /**
10
+ * Create plugin class
11
+ */
12
+ public function build_plugin() {
13
+ }
14
+
15
+ /**
16
+ * Store plugin class in some kind of storage
17
+ */
18
+ public function store_plugin( PluginStorage $storage ) {
19
+ }
20
+
21
+ /**
22
+ * Init plugin internal structure
23
+ */
24
+ public function init_plugin() {
25
+ }
26
+
27
+ /**
28
+ * Return built plugin
29
+ * @return AbstractPlugin
30
+ */
31
+ abstract function get_plugin();
32
+
33
+ /**
34
+ * Set settings class in plugin
35
+ *
36
+ * @param $settings
37
+ */
38
+ public function set_settings( $settings ) {
39
+ }
40
+
41
+ /**
42
+ * Set view class in plugin
43
+ *
44
+ * @param $view
45
+ */
46
+ public function set_view( $view ) {
47
+ }
48
+
49
+ /**
50
+ * Set tracker class in plugin
51
+ *
52
+ * @param $tracker
53
+ */
54
+ public function set_tracker( $tracker ) {
55
+ }
56
+
57
+ /**
58
+ * Set helper class in plugin
59
+ *
60
+ * @param $helper
61
+ */
62
+ public function set_helper( $helper ) {
63
+ }
64
+ }
vendor/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Builder;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+ use WPDesk\PluginBuilder\Plugin\ActivationAware;
7
+ use WPDesk\PluginBuilder\Storage\PluginStorage;
8
+
9
+ /**
10
+ * Builder that have info about activations
11
+ *
12
+ * Warning: We can't extend InfoBuilder.php as some old plugins(without wp-flow) will load the old version od InfoBuilder class that have private plugin property.
13
+ *
14
+ * @package WPDesk\PluginBuilder\Builder
15
+ */
16
+ class InfoActivationBuilder extends AbstractBuilder
17
+ {
18
+ const FILTER_PLUGIN_CLASS = 'wp_builder_plugin_class';
19
+ const HOOK_BEFORE_PLUGIN_INIT = 'wp_builder_before_plugin_init';
20
+ const HOOK_AFTER_PLUGIN_INIT = 'wp_builder_before_init';
21
+
22
+ /** @var AbstractPlugin */
23
+ private $plugin;
24
+
25
+ /** @var \WPDesk_Buildable */
26
+ private $info;
27
+
28
+ /** @var string */
29
+ protected $storage_id;
30
+
31
+ /**
32
+ * @var bool
33
+ */
34
+ private $is_active;
35
+
36
+ /**
37
+ * @param \WPDesk_Buildable $info
38
+ * @param bool $is_active
39
+ */
40
+ public function __construct(\WPDesk_Buildable $info, $is_active)
41
+ {
42
+ $this->info = $info;
43
+ $this->storage_id = $info->get_class_name();
44
+ $this->is_active = $is_active;
45
+ }
46
+
47
+ /**
48
+ * Builds instance of plugin
49
+ */
50
+ public function build_plugin()
51
+ {
52
+ $class_name = apply_filters(self::FILTER_PLUGIN_CLASS, $this->info->get_class_name());
53
+
54
+ /** @var AbstractPlugin $plugin */
55
+ $this->plugin = new $class_name($this->info);
56
+ if ($this->plugin instanceof ActivationAware && $this->is_active) {
57
+ $this->plugin->set_active();
58
+ }
59
+
60
+ return $this->plugin;
61
+ }
62
+
63
+ public function store_plugin(PluginStorage $storage)
64
+ {
65
+ $storage->add_to_storage($this->storage_id, $this->plugin);
66
+ }
67
+
68
+ public function init_plugin()
69
+ {
70
+ do_action(self::HOOK_BEFORE_PLUGIN_INIT, $this->plugin);
71
+ $this->plugin->init();
72
+ do_action(self::HOOK_AFTER_PLUGIN_INIT, $this->plugin);
73
+ }
74
+
75
+ /**
76
+ * @return AbstractPlugin
77
+ */
78
+ public function get_plugin()
79
+ {
80
+ return $this->plugin;
81
+ }
82
+ }
vendor/wpdesk/wp-builder/src/Builder/InfoBuilder.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Builder;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+ use WPDesk\PluginBuilder\Storage\PluginStorage;
7
+
8
+ /**
9
+ * @deprecated Should not be used as some old plugins are using it and we can't touch this.
10
+ *
11
+ * @package WPDesk\PluginBuilder\Builder
12
+ */
13
+ class InfoBuilder extends AbstractBuilder {
14
+ const FILTER_PLUGIN_CLASS = 'wp_builder_plugin_class';
15
+ const HOOK_BEFORE_PLUGIN_INIT = 'wp_builder_before_plugin_init';
16
+ const HOOK_AFTER_PLUGIN_INIT = 'wp_builder_before_init';
17
+
18
+ /** @var AbstractPlugin */
19
+ private $plugin;
20
+
21
+ /** @var \WPDesk_Buildable */
22
+ private $info;
23
+
24
+ /** @var string */
25
+ protected $storage_id;
26
+
27
+ public function __construct( \WPDesk_Buildable $info ) {
28
+ $this->info = $info;
29
+ $this->storage_id = $info->get_class_name();
30
+ }
31
+
32
+ /**
33
+ * Builds instance of plugin
34
+ */
35
+ public function build_plugin() {
36
+ $class_name = apply_filters( self::FILTER_PLUGIN_CLASS, $this->info->get_class_name() );
37
+
38
+ /** @var AbstractPlugin $plugin */
39
+ $this->plugin = new $class_name( $this->info );
40
+ }
41
+
42
+ public function store_plugin( PluginStorage $storage ) {
43
+ $storage->add_to_storage( $this->storage_id, $this->plugin );
44
+ }
45
+
46
+ public function init_plugin() {
47
+ do_action( self::HOOK_BEFORE_PLUGIN_INIT, $this->plugin );
48
+ $this->plugin->init();
49
+ do_action( self::HOOK_AFTER_PLUGIN_INIT, $this->plugin );
50
+ }
51
+
52
+ /**
53
+ * @return AbstractPlugin
54
+ */
55
+ public function get_plugin() {
56
+ return $this->plugin;
57
+ }
58
+ }
vendor/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * Base plugin with most basic functionalities used by every WPDesk plugin.
7
+ *
8
+ *
9
+ * Known issues:
10
+ *
11
+ * The class name is too generic but can't be changed as it would introduce a major incompatibility for most of the plugins.
12
+ * The $plugin_url, $docs_url and most other fields should be removed as they only litter the place but for compatibility reasons we can't do it right now.
13
+ * Hook methods should be moved to external classes but for compatibility reasons we can't do it right now.
14
+ */
15
+ abstract class AbstractPlugin extends SlimPlugin {
16
+
17
+ /**
18
+ * Most info about plugin internals.
19
+ *
20
+ * @var \WPDesk_Plugin_Info
21
+ */
22
+ protected $plugin_info;
23
+
24
+ /**
25
+ * Unique string for this plugin in [a-z_]+ format.
26
+ *
27
+ * @var string
28
+ */
29
+ protected $plugin_namespace;
30
+
31
+ /**
32
+ * Absolute URL to the plugin dir.
33
+ *
34
+ * @var string
35
+ */
36
+ protected $plugin_url;
37
+
38
+ /**
39
+ * Absolute URL to the plugin docs.
40
+ *
41
+ * @var string
42
+ */
43
+ protected $docs_url;
44
+
45
+ /**
46
+ * Absolute URL to the plugin settings url.
47
+ *
48
+ * @var string
49
+ */
50
+ protected $settings_url;
51
+
52
+ /**
53
+ * Support URL.
54
+ *
55
+ * @var string
56
+ */
57
+ protected $support_url;
58
+
59
+ /**
60
+ * AbstractPlugin constructor.
61
+ *
62
+ * @param \WPDesk_Plugin_Info $plugin_info
63
+ */
64
+ public function __construct( $plugin_info ) {
65
+ $this->plugin_info = $plugin_info;
66
+ $this->plugin_namespace = strtolower( $plugin_info->get_plugin_dir() );
67
+ $this->plugin_url = $this->plugin_info->get_plugin_url();
68
+ $this->init_base_variables();
69
+ }
70
+
71
+ /**
72
+ * Initialize internal state of the plugin.
73
+ *
74
+ * @return void
75
+ * @deprecated Just use __construct to initialize plugin internal state.
76
+ *
77
+ */
78
+ public function init_base_variables() {
79
+ }
80
+
81
+ /**
82
+ * Initializes plugin external state.
83
+ *
84
+ * The plugin internal state is initialized in the constructor and the plugin should be internally consistent after creation.
85
+ * The external state includes hooks execution, communication with other plugins, integration with WC etc.
86
+ *
87
+ * @return void
88
+ */
89
+ public function init() {
90
+ $this->hooks();
91
+ }
92
+
93
+ /**
94
+ * Returns absolute path to the plugin dir.
95
+ *
96
+ * @return string
97
+ */
98
+ public function get_plugin_file_path() {
99
+ return $this->plugin_info->get_plugin_file_name();
100
+ }
101
+
102
+ /**
103
+ * Returns plugin text domain.
104
+ *
105
+ * @return string
106
+ */
107
+ public function get_text_domain() {
108
+ return $this->plugin_info->get_text_domain();
109
+ }
110
+
111
+ /**
112
+ * Returns unique string for plugin in [a-z_]+ format. Can be used as plugin id in various places like plugin slug etc.
113
+ *
114
+ * @return string
115
+ */
116
+ public function get_namespace() {
117
+ return $this->plugin_namespace;
118
+ }
119
+
120
+ /**
121
+ * Returns plugin absolute URL.
122
+ *
123
+ * @return string
124
+ */
125
+ public function get_plugin_url() {
126
+ return esc_url( trailingslashit( $this->plugin_url ) );
127
+ }
128
+
129
+ /**
130
+ * Returns plugin absolute URL to dir with front end assets.
131
+ *
132
+ * @return string
133
+ */
134
+ public function get_plugin_assets_url() {
135
+ return esc_url( trailingslashit( $this->get_plugin_url() . 'assets' ) );
136
+ }
137
+
138
+ /**
139
+ * @return $this
140
+ * @deprecated For backward compatibility.
141
+ *
142
+ */
143
+ public function get_plugin() {
144
+ return $this;
145
+ }
146
+
147
+ /**
148
+ * Integrate with WordPress and with other plugins using action/filter system.
149
+ *
150
+ * @return void
151
+ */
152
+ protected function hooks() {
153
+ add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
154
+ add_action( 'wp_enqueue_scripts', [ $this, 'wp_enqueue_scripts' ] );
155
+ add_action( 'plugins_loaded', [ $this, 'load_plugin_text_domain' ] );
156
+ add_filter( 'plugin_action_links_' . plugin_basename( $this->get_plugin_file_path() ), [
157
+ $this,
158
+ 'links_filter'
159
+ ] );
160
+ }
161
+ /**
162
+ * Initialize plugin test domain. This is a hook function. Do not execute directly.
163
+ *
164
+ * @return void
165
+ */
166
+ public function load_plugin_text_domain() {
167
+ load_plugin_textdomain( $this->get_text_domain(), false, $this->get_namespace() . '/lang/' );
168
+ }
169
+
170
+ /**
171
+ * Append JS scripts in the WordPress admin panel. This is a hook function. Do not execute directly.
172
+ *
173
+ * @return void
174
+ */
175
+ public function admin_enqueue_scripts() {
176
+ }
177
+
178
+ /**
179
+ * Append JS scripts in WordPress. This is a hook function. Do not execute directly.
180
+ *
181
+ * @return void
182
+ */
183
+ public function wp_enqueue_scripts() {
184
+ }
185
+
186
+ /**
187
+ * Initialize plugin admin links. This is a hook function. Do not execute directly.
188
+ *
189
+ * @param string[] $links
190
+ *
191
+ * @return string[]
192
+ */
193
+ public function links_filter( $links ) {
194
+ $support_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/support/' : 'https://www.wpdesk.net/support';
195
+
196
+ if ( $this->support_url ) {
197
+ $support_link = $this->support_url;
198
+ }
199
+
200
+ $plugin_links = [
201
+ '<a target="_blank" href="' . $support_link . '">' . __( 'Support', $this->get_text_domain() ) . '</a>',
202
+ ];
203
+ $links = array_merge( $plugin_links, $links );
204
+
205
+ if ( $this->docs_url ) {
206
+ $plugin_links = [
207
+ '<a target="_blank" href="' . $this->docs_url . '">' . __( 'Docs', $this->get_text_domain() ) . '</a>',
208
+ ];
209
+ $links = array_merge( $plugin_links, $links );
210
+ }
211
+
212
+ if ( $this->settings_url ) {
213
+ $plugin_links = [
214
+ '<a href="' . $this->settings_url . '">' . __( 'Settings', $this->get_text_domain() ) . '</a>',
215
+ ];
216
+ $links = array_merge( $plugin_links, $links );
217
+ }
218
+
219
+ return $links;
220
+ }
221
+
222
+ }
223
+
vendor/wpdesk/wp-builder/src/Plugin/Activateable.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace WPDesk\PluginBuilder\Plugin;
5
+
6
+ /**
7
+ * Tag the plugin with this ingterface to hook it to the WordPress activation hook.
8
+ *
9
+ * Note: works from plugin flow ^2.2.
10
+ *
11
+ * @package WPDesk\PluginBuilder\Plugin
12
+ */
13
+ interface Activateable {
14
+
15
+ /**
16
+ * Plugin activated in WordPress. Do not execute directly.
17
+ *
18
+ * @return void
19
+ */
20
+ public function activate();
21
+ }
vendor/wpdesk/wp-builder/src/Plugin/ActivationAware.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * It means that this class is should know about SUBSCRIPTION activation
7
+ *
8
+ * @package WPDesk\PluginBuilder\Plugin
9
+ */
10
+ interface ActivationAware {
11
+
12
+ /**
13
+ * Set the activation flag to true
14
+ *
15
+ * @return void
16
+ */
17
+ public function set_active();
18
+
19
+ /**
20
+ * Is subscription active?
21
+ *
22
+ * @return bool
23
+ */
24
+ public function is_active();
25
+
26
+ }
27
+
vendor/wpdesk/wp-builder/src/Plugin/ActivationTracker.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * @deprecated nobody uses it :) And also this library is not a place for this class
7
+ *
8
+ * @package WPDesk\PluginBuilder\Plugin
9
+ */
10
+ class ActivationTracker {
11
+
12
+ /**
13
+ * Namespace.
14
+ *
15
+ * @var string
16
+ */
17
+ private $namespace;
18
+
19
+ /**
20
+ * ActivationTracker constructor.
21
+ *
22
+ * @param string $namespace Namespace for settings.
23
+ */
24
+ public function __construct( $namespace ) {
25
+ $this->namespace = $namespace;
26
+ }
27
+
28
+ /**
29
+ * Option name for date storage
30
+ *
31
+ * @return string
32
+ */
33
+ private function get_option_name_activation_date() {
34
+ return $this->namespace . '_activation';
35
+ }
36
+
37
+ /**
38
+ * Returns activation date and sets it if were not set before
39
+ *
40
+ * @return int unix timestamp for activation datetime
41
+ */
42
+ public function get_activation_date() {
43
+ $activation_date
44
+ = get_option( $this->get_option_name_activation_date() );
45
+ if ( empty( $activation_date ) ) {
46
+ return $this->touch_activation_date();
47
+ }
48
+
49
+ return intval( $activation_date );
50
+ }
51
+
52
+ /**
53
+ * Was activation more than two weeks before today
54
+ *
55
+ * @return bool
56
+ */
57
+ public function is_activated_more_than_two_weeks() {
58
+ $two_weeks = 60 * 60 * 24 * 7 * 2;
59
+
60
+ return $this->get_activation_date() + $two_weeks < time();
61
+ }
62
+
63
+ /**
64
+ * Sets activatiion date for today
65
+ *
66
+ * @return int unit timestamp for now
67
+ */
68
+ public function touch_activation_date() {
69
+ $now = time();
70
+ update_option( $this->get_option_name_activation_date(), $now );
71
+
72
+ return $now;
73
+ }
74
+
75
+ }
vendor/wpdesk/wp-builder/src/Plugin/Conditional.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace WPDesk\PluginBuilder\Plugin;
5
+
6
+ /**
7
+ * Something that can be instantiated/hooked conditionally.
8
+ *
9
+ * @see https://github.com/mwpd/basic-scaffold/blob/master/src/Infrastructure/Conditional.php by Alain Schlesser
10
+ *
11
+ * @package WPDesk\PluginBuilder\Plugin
12
+ */
13
+ interface Conditional {
14
+ /**
15
+ * Check whether the conditional object is currently needed.
16
+ *
17
+ * @return bool Whether the conditional object is needed.
18
+ */
19
+ public static function is_needed();
20
+ }
vendor/wpdesk/wp-builder/src/Plugin/Deactivateable.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace WPDesk\PluginBuilder\Plugin;
5
+
6
+ /**
7
+ * Tag the plugin with this ingterface to hook it to the WordPress deactivation hook.
8
+ *
9
+ * Note: works from plugin flow ^2.2.
10
+ *
11
+ * @package WPDesk\PluginBuilder\Plugin
12
+ */
13
+ interface Deactivateable {
14
+
15
+ /**
16
+ * Plugin deactivate in WordPress. Do not execute directly.
17
+ *
18
+ * @return void
19
+ */
20
+ public function deactivate();
21
+ }
vendor/wpdesk/wp-builder/src/Plugin/Hookable.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ interface Hookable {
6
+
7
+ /**
8
+ * Init hooks (actions and filters).
9
+ *
10
+ * @return void
11
+ */
12
+ public function hooks();
13
+
14
+ }
15
+
vendor/wpdesk/wp-builder/src/Plugin/HookableCollection.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ interface HookableCollection extends Hookable {
6
+
7
+ /**
8
+ * Add hookable object.
9
+ *
10
+ * @param Hookable|HookablePluginDependant $hookable_object Hookable object.
11
+ */
12
+ public function add_hookable( Hookable $hookable_object );
13
+
14
+ /**
15
+ * Get hookable instance.
16
+ *
17
+ * @param string $class_name Class name.
18
+ *
19
+ * @return false|Hookable
20
+ */
21
+ public function get_hookable_instance_by_class_name( $class_name );
22
+
23
+ }
24
+
vendor/wpdesk/wp-builder/src/Plugin/HookableParent.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ trait HookableParent {
6
+
7
+ /**
8
+ * Hookable objects.
9
+ *
10
+ * @var array[Hookable]
11
+ */
12
+ private $hookable_objects = array();
13
+
14
+ /**
15
+ * Add hookable object.
16
+ *
17
+ * @param Hookable|HookablePluginDependant $hookable_object Hookable object.
18
+ */
19
+ public function add_hookable( Hookable $hookable_object ) {
20
+ if ( $hookable_object instanceof HookablePluginDependant ) {
21
+ $hookable_object->set_plugin( $this );
22
+ }
23
+ $this->hookable_objects[] = $hookable_object;
24
+ }
25
+
26
+ /**
27
+ * Get hookable instance.
28
+ *
29
+ * @param string $class_name Class name.
30
+ *
31
+ * @return false|Hookable
32
+ */
33
+ public function get_hookable_instance_by_class_name( $class_name ) {
34
+ foreach ( $this->hookable_objects as $hookable_object ) {
35
+ if ( $hookable_object instanceof $class_name ) {
36
+ return $hookable_object;
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+
42
+ /**
43
+ * Run hooks method on all hookable objects.
44
+ */
45
+ protected function hooks_on_hookable_objects() {
46
+ /** @var Hookable $hookable_object $hookable_object */
47
+ foreach ( $this->hookable_objects as $hookable_object ) {
48
+ if ($hookable_object instanceof Conditional) {
49
+ if ($hookable_object::is_needed()) {
50
+ $hookable_object->hooks();
51
+ }
52
+ } else {
53
+ $hookable_object->hooks();
54
+ }
55
+ }
56
+ }
57
+
58
+
59
+ }
vendor/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ interface HookablePluginDependant extends Hookable {
6
+
7
+ /**
8
+ * Set Plugin.
9
+ *
10
+ * @param AbstractPlugin $plugin Plugin.
11
+ *
12
+ * @return null
13
+ */
14
+ public function set_plugin( AbstractPlugin $plugin );
15
+
16
+ /**
17
+ * Get plugin.
18
+ *
19
+ * @return AbstractPlugin.
20
+ */
21
+ public function get_plugin();
22
+
23
+ }
24
+
vendor/wpdesk/wp-builder/src/Plugin/PluginAccess.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * @package WPDesk\PluginBuilder\Plugin
7
+ */
8
+ trait PluginAccess {
9
+ /**
10
+ * Plugin.
11
+ *
12
+ * @var AbstractPlugin
13
+ */
14
+ private $plugin;
15
+
16
+ /**
17
+ * Set plugin.
18
+ *
19
+ * @param AbstractPlugin $plugin Plugin.
20
+ */
21
+ public function set_plugin( AbstractPlugin $plugin ) {
22
+ $this->plugin = $plugin;
23
+ }
24
+
25
+ /**
26
+ * Get plugin.
27
+ *
28
+ * @return AbstractPlugin
29
+ */
30
+ public function get_plugin() {
31
+ return $this->plugin;
32
+ }
33
+
34
+ }
vendor/wpdesk/wp-builder/src/Plugin/SlimPlugin.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * Most clean plugin class with only most important details.
7
+ */
8
+ abstract class SlimPlugin implements \WPDesk_Translatable {
9
+
10
+ /**
11
+ * Initializes plugin external state.
12
+ *
13
+ * The plugin internal state is initialized in the constructor and the plugin should be internally consistent after creation.
14
+ * The external state includes hooks execution, communication with other plugins, integration with WC etc.
15
+ *
16
+ * @return void
17
+ */
18
+ abstract public function init();
19
+ }
20
+
vendor/wpdesk/wp-builder/src/Plugin/TemplateLoad.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Plugin;
4
+
5
+ /**
6
+ * @deprecated Use wpdesk/wp-view
7
+ *
8
+ * @package WPDesk\PluginBuilder\Plugin
9
+ */
10
+ trait TemplateLoad {
11
+
12
+ /**
13
+ * Plugin path.
14
+ *
15
+ * @var string
16
+ */
17
+ protected $plugin_path;
18
+
19
+ /**
20
+ * Template path.
21
+ *
22
+ * @var string
23
+ */
24
+ protected $template_path;
25
+
26
+ /**
27
+ * Init base variables for plugin
28
+ */
29
+ public function init_template_base_variables() {
30
+ $this->plugin_path = $this->plugin_info->get_plugin_dir();
31
+ $this->template_path = $this->plugin_info->get_text_domain();
32
+ }
33
+
34
+ /**
35
+ * Renders end returns selected template
36
+ *
37
+ * @param string $name Name of the template.
38
+ * @param string $path Additional inner path to the template.
39
+ * @param array $args args Accessible from template.
40
+ *
41
+ * @return string
42
+ */
43
+ public function load_template( $name, $path = '', $args = array() ) {
44
+ $plugin_template_path = trailingslashit( $this->plugin_path ) . 'templates/';
45
+
46
+ // Look within passed path within the theme - this is priority.
47
+ $template = locate_template(
48
+ array(
49
+ trailingslashit( $this->get_template_path() ) . trailingslashit( $path ) . $name . '.php',
50
+ )
51
+ );
52
+
53
+ if ( ! $template ) {
54
+ $template = $plugin_template_path . trailingslashit( $path ) . $name . '.php';
55
+ }
56
+
57
+ extract( $args );
58
+ ob_start();
59
+ include( $template );
60
+
61
+ return ob_get_clean();
62
+ }
63
+
64
+ /**
65
+ * Get template path.
66
+ *
67
+ * @return string
68
+ */
69
+ public function get_template_path() {
70
+ return trailingslashit( $this->template_path );
71
+ }
72
+
73
+
74
+ }
vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Have info about what class should be built by WPDesk_Builder
5
+ *
6
+ * have to be compatible with PHP 5.2.x
7
+ */
8
+ interface WPDesk_Buildable {
9
+ /** @return string */
10
+ public function get_class_name();
11
+ }
vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! interface_exists( 'WPDesk_Translatable' ) ) {
4
+ require_once __DIR__ . '/Translatable.php';
5
+ }
6
+
7
+
8
+ /**
9
+ * Have MUST HAVE info for plugin instantion
10
+ *
11
+ * have to be compatible with PHP 5.2.x
12
+ */
13
+ interface WPDesk_Has_Plugin_Info extends WPDesk_Translatable {
14
+ /**
15
+ * @return string
16
+ */
17
+ public function get_plugin_file_name();
18
+
19
+ /**
20
+ * @return string
21
+ */
22
+ public function get_plugin_dir();
23
+
24
+ /**
25
+ * @return string
26
+ */
27
+ public function get_version();
28
+
29
+ }
vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! interface_exists( 'WPDesk_Translatable' ) ) {
4
+ require_once __DIR__ . '/Translatable.php';
5
+ }
6
+ if ( ! interface_exists( 'WPDesk_Buildable' ) ) {
7
+ require_once __DIR__ . '/Buildable.php';
8
+ }
9
+ if ( ! interface_exists( 'WPDesk_Has_Plugin_Info' ) ) {
10
+ require_once __DIR__ . '/Has_Plugin_Info.php';
11
+ }
12
+
13
+ /**
14
+ * Structure with core info about plugin
15
+ *
16
+ * have to be compatible with PHP 5.2.x
17
+ */
18
+ class WPDesk_Plugin_Info implements WPDesk_Translatable, WPDesk_Buildable, WPDesk_Has_Plugin_Info {
19
+ /** @var string */
20
+ private $plugin_file_name;
21
+
22
+ /** @var string */
23
+ private $plugin_dir;
24
+
25
+ /** @var string */
26
+ private $plugin_url;
27
+
28
+ /** @var string */
29
+ private $class_name;
30
+
31
+ /** @var string */
32
+ private $version;
33
+
34
+ /** @var string */
35
+ private $product_id;
36
+
37
+ /** @var string */
38
+ private $plugin_name;
39
+
40
+ /** @var \DateTimeInterface */
41
+ private $release_date;
42
+
43
+ /** string */
44
+ private $text_domain;
45
+
46
+ /**
47
+ * @return string
48
+ */
49
+ public function get_plugin_file_name() {
50
+ return $this->plugin_file_name;
51
+ }
52
+
53
+ /**
54
+ * @param string $plugin_name
55
+ */
56
+ public function set_plugin_file_name( $plugin_name ) {
57
+ $this->plugin_file_name = $plugin_name;
58
+ }
59
+
60
+ /**
61
+ * @return string
62
+ */
63
+ public function get_plugin_dir() {
64
+ return $this->plugin_dir;
65
+ }
66
+
67
+ /**
68
+ * @param string $plugin_dir
69
+ */
70
+ public function set_plugin_dir( $plugin_dir ) {
71
+ $this->plugin_dir = $plugin_dir;
72
+ }
73
+
74
+ /**
75
+ * @return string
76
+ */
77
+ public function get_plugin_url() {
78
+ return $this->plugin_url;
79
+ }
80
+
81
+ /**
82
+ * @param string $plugin_url
83
+ */
84
+ public function set_plugin_url( $plugin_url ) {
85
+ $this->plugin_url = $plugin_url;
86
+ }
87
+
88
+ /**
89
+ * @return string
90
+ */
91
+ public function get_version() {
92
+ return $this->version;
93
+ }
94
+
95
+ /**
96
+ * @param string $version
97
+ */
98
+ public function set_version( $version ) {
99
+ $this->version = $version;
100
+ }
101
+
102
+ /**
103
+ * @return string
104
+ */
105
+ public function get_product_id() {
106
+ return $this->product_id;
107
+ }
108
+
109
+ /**
110
+ * @param string $product_id
111
+ */
112
+ public function set_product_id( $product_id ) {
113
+ $this->product_id = $product_id;
114
+ }
115
+
116
+ /**
117
+ * @return string
118
+ */
119
+ public function get_plugin_name() {
120
+ return $this->plugin_name;
121
+ }
122
+
123
+ /**
124
+ * @param string $plugin_name
125
+ */
126
+ public function set_plugin_name( $plugin_name ) {
127
+ $this->plugin_name = $plugin_name;
128
+ }
129
+
130
+ /**
131
+ * @return DateTimeInterface
132
+ */
133
+ public function get_release_date() {
134
+ return $this->release_date;
135
+ }
136
+
137
+ /**
138
+ * @param \DateTimeInterface $release_date
139
+ */
140
+ public function set_release_date( $release_date ) {
141
+ $this->release_date = $release_date;
142
+ }
143
+
144
+ /**
145
+ * @return string
146
+ */
147
+ public function get_class_name() {
148
+ return $this->class_name;
149
+ }
150
+
151
+ /**
152
+ * @param string $class_name
153
+ */
154
+ public function set_class_name( $class_name ) {
155
+ $this->class_name = $class_name;
156
+ }
157
+
158
+ /**
159
+ * @return string
160
+ */
161
+ public function get_text_domain() {
162
+ return $this->text_domain;
163
+ }
164
+
165
+ /**
166
+ * @param $value
167
+ */
168
+ public function set_text_domain( $value ) {
169
+ $this->text_domain = $value;
170
+ }
171
+ }
vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @deprecated Have typo so better use WPDesk_Translatable
5
+ */
6
+ interface WPDesk_Translable {
7
+ /** @return string */
8
+ public function get_text_domain();
9
+ }
vendor/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! interface_exists( 'WPDesk_Translable' ) ) {
4
+ require_once 'Translable.php';
5
+ }
6
+
7
+ /**
8
+ * Have info about textdomain - how to translate texts
9
+ *
10
+ * have to be compatible with PHP 5.2.x
11
+ */
12
+ interface WPDesk_Translatable extends WPDesk_Translable {
13
+ /** @return string */
14
+ public function get_text_domain();
15
+ }
vendor/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage\Exception;
4
+
5
+ class ClassAlreadyExists extends \RuntimeException
6
+ {
7
+
8
+ }
vendor/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage\Exception;
4
+
5
+ class ClassNotExists extends \RuntimeException
6
+ {
7
+
8
+ }
vendor/wpdesk/wp-builder/src/Storage/PluginStorage.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+
7
+ interface PluginStorage {
8
+
9
+ /**
10
+ * @param string $class
11
+ * @param AbstractPlugin $object
12
+ */
13
+ public function add_to_storage( $class, $object );
14
+
15
+ /**
16
+ * @param string $class
17
+ *
18
+ * @return AbstractPlugin
19
+ */
20
+ public function get_from_storage( $class );
21
+ }
22
+
vendor/wpdesk/wp-builder/src/Storage/StaticStorage.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+
7
+ /**
8
+ * Can store plugin instances in static variable
9
+ *
10
+ * @package WPDesk\PluginBuilder\Storage
11
+ */
12
+ class StaticStorage implements PluginStorage {
13
+ protected static $instances = [];
14
+
15
+ /**
16
+ * @param string $class
17
+ * @param AbstractPlugin $object
18
+ */
19
+ public function add_to_storage( $class, $object ) {
20
+ if ( isset( self::$instances[ $class ] ) ) {
21
+ throw new Exception\ClassAlreadyExists( "Class {$class} already exists" );
22
+ }
23
+ self::$instances[ $class ] = $object;
24
+ }
25
+
26
+ /**
27
+ * @param string $class
28
+ *
29
+ * @return AbstractPlugin
30
+ */
31
+ public function get_from_storage( $class ) {
32
+ if ( isset( self::$instances[ $class ] ) ) {
33
+ return self::$instances[ $class ];
34
+ }
35
+ throw new Exception\ClassNotExists( "Class {$class} not exists in storage" );
36
+ }
37
+ }
38
+
vendor/wpdesk/wp-builder/src/Storage/StorageFactory.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage;
4
+
5
+ class StorageFactory {
6
+
7
+ /**
8
+ * @return PluginStorage
9
+ */
10
+ public function create_storage() {
11
+ return new WordpressFilterStorage();
12
+ }
13
+ }
14
+
vendor/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\PluginBuilder\Storage;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
6
+
7
+ /**
8
+ * Can store plugin instances in WordPress filter system.
9
+ *
10
+ * @package WPDesk\PluginBuilder\Storage
11
+ */
12
+ class WordpressFilterStorage implements PluginStorage {
13
+ const STORAGE_FILTER_NAME = 'wpdesk_plugin_instances';
14
+
15
+ /**
16
+ * @param string $class
17
+ * @param AbstractPlugin $object
18
+ */
19
+ public function add_to_storage( $class, $object ) {
20
+ add_filter( self::STORAGE_FILTER_NAME, static function ( $plugins ) use ( $class, $object ) {
21
+ if ( isset( $plugins[ $class ] ) ) {
22
+ throw new Exception\ClassAlreadyExists( "Class {$class} already exists" );
23
+ }
24
+ $plugins[ $class ] = $object;
25
+
26
+ return $plugins;
27
+ } );
28
+
29
+ }
30
+
31
+ /**
32
+ * @param string $class
33
+ *
34
+ * @return AbstractPlugin
35
+ */
36
+ public function get_from_storage( $class ) {
37
+ $plugins = apply_filters( self::STORAGE_FILTER_NAME, [] );
38
+ if ( isset( $plugins[ $class ] ) ) {
39
+ return $plugins[ $class ];
40
+ }
41
+ throw new Exception\ClassNotExists( "Class {$class} not exists in storage" );
42
+ }
43
+ }
44
+
vendor/wpdesk/wp-pointer/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ ## [2.0.0] - 2020-07-14
2
+ ### Fixed
3
+ - pointer position relative to DOM element
4
+
5
+ ## [1.0.3] - 2020-06-30
6
+ ### Added
7
+ - additional pointer CSS
vendor/wpdesk/wp-pointer/LICENSE.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2018 WP Desk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
vendor/wpdesk/wp-pointer/composer.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "wpdesk/wp-pointer",
3
+ "description": "Library for displaying Wordpress pointer messages.",
4
+ "license": "MIT",
5
+ "keywords": ["wordpress", "pointer", "admin"],
6
+ "homepage": "https://gitlab.com/wpdesk/wp-pointer",
7
+ "minimum-stability": "stable",
8
+ "authors": [
9
+ {
10
+ "name": "grola",
11
+ "email": "grola@wpdesk.net"
12
+ }
13
+ ],
14
+ "require": {
15
+ "php": ">=5.5",
16
+ "wpdesk/wp-builder": "^1.1"
17
+ },
18
+ "require-dev": {
19
+ "phpunit/phpunit": "<7",
20
+ "wp-coding-standards/wpcs": "^0.14.1",
21
+ "squizlabs/php_codesniffer": "^3.0.2",
22
+ "mockery/mockery": "*",
23
+ "10up/wp_mock": "*",
24
+ "wimg/php-compatibility": "^8"
25
+ },
26
+ "autoload": {
27
+ "psr-4": {"WPDesk\\Pointer\\": "src/WPDesk/Pointer/"}
28
+ },
29
+ "autoload-dev": {
30
+ },
31
+ "scripts": {
32
+ "phpcs": "phpcs",
33
+ "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
34
+ "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
35
+ "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
36
+ "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage"
37
+ }
38
+ }
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\Pointer;
4
+
5
+ /**
6
+ * Pointer conditions.
7
+ *
8
+ * @package WPDesk\Pointer
9
+ */
10
+ class PointerConditions
11
+ {
12
+
13
+ /**
14
+ * @var null|string|array
15
+ */
16
+ private $screenId;
17
+
18
+ /**
19
+ * @var null|string
20
+ */
21
+ private $capability;
22
+
23
+ /**
24
+ * PointerConditions constructor.
25
+ *
26
+ * @param null|string|array $screenId Screen id. null or empty string - all screens.
27
+ * @param null|string $capability User capability. null or empty string for all capabilities.
28
+ */
29
+ public function __construct(
30
+ $screenId = null,
31
+ $capability = null
32
+ ) {
33
+ $this->screenId = $screenId;
34
+ $this->capability = $capability;
35
+ }
36
+
37
+ /**
38
+ * @return array|string|null
39
+ */
40
+ public function getScreenId()
41
+ {
42
+ return $this->screenId;
43
+ }
44
+
45
+ /**
46
+ * @param array|string|null $screenId
47
+ */
48
+ public function setScreenId($screenId)
49
+ {
50
+ $this->screenId = $screenId;
51
+ }
52
+
53
+ /**
54
+ * @return string
55
+ */
56
+ public function getCapability()
57
+ {
58
+ return $this->capability;
59
+ }
60
+
61
+ /**
62
+ * @param string $capability
63
+ */
64
+ public function setCapability($capability)
65
+ {
66
+ $this->capability = $capability;
67
+ }
68
+
69
+ /**
70
+ * @return bool
71
+ */
72
+ private function areScreenIdMet()
73
+ {
74
+ $screenIdMet = false;
75
+ if (!empty($this->screenId)) {
76
+ if (!is_array($this->screenId)) {
77
+ $this->screenId = array($this->screenId);
78
+ }
79
+ $screen = get_current_screen();
80
+ if (null !== $screen && in_array($screen->id, $this->screenId, true)) {
81
+ $screenIdMet = true;
82
+ }
83
+ } else {
84
+ $screenIdMet = true;
85
+ }
86
+ return $screenIdMet;
87
+ }
88
+
89
+ /**
90
+ * @return bool
91
+ */
92
+ private function areCapabilityMet()
93
+ {
94
+ if (!empty($this->capability)) {
95
+ $capabilityMet = current_user_can($this->capability);
96
+ } else {
97
+ $capabilityMet = true;
98
+ }
99
+ return $capabilityMet;
100
+ }
101
+
102
+ /**
103
+ * @return bool
104
+ */
105
+ public function areConditionsMet()
106
+ {
107
+ return $this->areCapabilityMet() && $this->areScreenIdMet();
108
+ }
109
+
110
+ }
111
+
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\Pointer;
4
+
5
+ /**
6
+ * WordPress admin pointer message.
7
+ *
8
+ * @package WPDesk\Pointer
9
+ */
10
+ class PointerMessage
11
+ {
12
+ const USER_META_DISMISSED_WP_POINTERS = 'dismissed_wp_pointers';
13
+
14
+ /**
15
+ * Is action added?
16
+ * @var bool
17
+ */
18
+ private $actionAdded = false;
19
+
20
+ /**
21
+ * @var string
22
+ */
23
+ private $id;
24
+
25
+ /**
26
+ * @var string
27
+ */
28
+ private $anchor;
29
+
30
+ /**
31
+ * @var string
32
+ */
33
+ private $content;
34
+
35
+ /**
36
+ * @var string
37
+ */
38
+ private $title;
39
+
40
+ /**
41
+ * @var PointerPosition
42
+ */
43
+ private $position;
44
+
45
+ /**
46
+ * @var string|array
47
+ */
48
+ private $pointerClass;
49
+
50
+ /**
51
+ * @var int
52
+ */
53
+ private $pointerWidth;
54
+
55
+ /**
56
+ * @var PointerConditions
57
+ */
58
+ private $conditions;
59
+
60
+ /**
61
+ * @var array
62
+ */
63
+ private $pointerCss = array();
64
+
65
+ /**
66
+ * @var array
67
+ */
68
+ private $defaultPointerCss = array(
69
+ 'top' => '50%',
70
+ 'left' => '100%',
71
+ '-webkit-transform' => 'translateY(-50%)',
72
+ '-ms-transform' => 'translateY(-50%)',
73
+ 'transform' => 'translateY(-50%)',
74
+ );
75
+
76
+ /**
77
+ * PointerMessage constructor.
78
+ *
79
+ * @param string $id
80
+ * @param string $anchor
81
+ * @param string $title
82
+ * @param string $content
83
+ * @param PointerPosition $position
84
+ * @param string pointerClass
85
+ * @param int $pointerWidth
86
+ * @param null|PointerConditions $conditions Pointer conditions.
87
+ * @param array $pointerCss Pointer CSS.
88
+ */
89
+ public function __construct(
90
+ $id,
91
+ $anchor,
92
+ $title,
93
+ $content,
94
+ $position = null,
95
+ $pointerClass = 'wp-pointer',
96
+ $pointerWidth = 320,
97
+ $conditions = null,
98
+ $pointerCss = array()
99
+ ) {
100
+ $this->id = $id;
101
+ $this->anchor = $anchor;
102
+ $this->title = $title;
103
+ $this->content = $content;
104
+ if ($position === null) {
105
+ $position = new PointerPosition();
106
+ }
107
+ $this->position = $position;
108
+ $this->pointerClass = $pointerClass;
109
+ $this->pointerWidth = $pointerWidth;
110
+ if (null === $conditions) {
111
+ $this->conditions = new PointerConditions();
112
+ } else {
113
+ $this->conditions = $conditions;
114
+ }
115
+ $this->pointerCss = $pointerCss;
116
+ $this->addAction();
117
+ }
118
+
119
+ /**
120
+ * Enqueue scripts.
121
+ */
122
+ public function enqueueScripts()
123
+ {
124
+ wp_enqueue_style('wp-pointer');
125
+ wp_enqueue_script('wp-pointer');
126
+ }
127
+
128
+ /**
129
+ * Add notice action.
130
+ */
131
+ protected function addAction()
132
+ {
133
+ if (!$this->actionAdded) {
134
+ add_action('admin_print_footer_scripts', array($this, 'maybeRenderJavascript'));
135
+ add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
136
+ $this->actionAdded = true;
137
+ }
138
+ }
139
+
140
+ /**
141
+ * Remove action.
142
+ */
143
+ public function removeAction()
144
+ {
145
+ if ($this->actionAdded) {
146
+ remove_action('admin_print_footer_scripts', array($this, 'maybeRenderJavascript'));
147
+ remove_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
148
+ $this->actionAdded = false;
149
+ }
150
+ }
151
+
152
+
153
+ /**
154
+ * @return string
155
+ */
156
+ public function getId()
157
+ {
158
+ return $this->id;
159
+ }
160
+
161
+ /**
162
+ * @param string $id
163
+ */
164
+ public function setId($id)
165
+ {
166
+ $this->id = $id;
167
+ }
168
+
169
+ /**
170
+ * @return string
171
+ */
172
+ public function getAnchor()
173
+ {
174
+ return $this->anchor;
175
+ }
176
+
177
+ /**
178
+ * @param string $anchor
179
+ */
180
+ public function setAnchor($anchor)
181
+ {
182
+ $this->anchor = $anchor;
183
+ }
184
+
185
+ /**
186
+ * @return string
187
+ */
188
+ public function getContent()
189
+ {
190
+ return $this->content;
191
+ }
192
+
193
+ /**
194
+ * @param string $content
195
+ */
196
+ public function setContent($content)
197
+ {
198
+ $this->content = $content;
199
+ }
200
+
201
+ /**
202
+ * @return string
203
+ */
204
+ public function getTitle()
205
+ {
206
+ return $this->title;
207
+ }
208
+
209
+ /**
210
+ * @param string $title
211
+ */
212
+ public function setTitle($title)
213
+ {
214
+ $this->title = $title;
215
+ }
216
+
217
+ /**
218
+ * @return array|string
219
+ */
220
+ public function getPosition()
221
+ {
222
+ return $this->position;
223
+ }
224
+
225
+ /**
226
+ * @param array|string $position
227
+ */
228
+ public function setPosition($position)
229
+ {
230
+ $this->position = $position;
231
+ }
232
+
233
+ /**
234
+ * @return array|string
235
+ */
236
+ public function getPointerClass()
237
+ {
238
+ return $this->pointerClass;
239
+ }
240
+
241
+ /**
242
+ * @param array|string $pointerClass
243
+ */
244
+ public function setPointerClass($pointerClass)
245
+ {
246
+ $this->pointerClass = $pointerClass;
247
+ }
248
+
249
+ /**
250
+ * @return int
251
+ */
252
+ public function getPointerWidth()
253
+ {
254
+ return $this->pointerWidth;
255
+ }
256
+
257
+ /**
258
+ * @param int $pointerWidth
259
+ */
260
+ public function setPointerWidth($pointerWidth)
261
+ {
262
+ $this->pointerWidth = $pointerWidth;
263
+ }
264
+
265
+ /**
266
+ * @return PointerConditions
267
+ */
268
+ public function getConditions()
269
+ {
270
+ return $this->conditions;
271
+ }
272
+
273
+ /**
274
+ * @return array
275
+ */
276
+ public function getPointerCss() {
277
+ return $this->pointerCss;
278
+ }
279
+
280
+ /**
281
+ * @param PointerConditions $conditions
282
+ */
283
+ public function setConditions($conditions)
284
+ {
285
+ $this->conditions = $conditions;
286
+ }
287
+
288
+ /**
289
+ * Render Java Script for pointer message.
290
+ */
291
+ public function renderJavaScript()
292
+ {
293
+ $pointerAnchor = $this->getAnchor();
294
+ $pointerClass = $this->getPointerClass();
295
+ $pointerContentId = 'wpdesk_pointer_content_' . $this->getId();
296
+ $pointerWidth = $this->getPointerWidth();
297
+ $pointerContent = sprintf(
298
+ '<h3>%1$s</h3><p id="%2$s">%3$s</p>',
299
+ $this->title,
300
+ $pointerContentId,
301
+ $this->content
302
+ );
303
+ $pointerPosition = $this->getPosition();
304
+ $pointerId = $this->getId();
305
+ $pointerCss = array_merge($this->defaultPointerCss, $this->getPointerCss());
306
+ include 'views/html-script-pointer-message.php';
307
+ }
308
+
309
+ /**
310
+ * Meybe render Java Script for pointer message.
311
+ */
312
+ public function maybeRenderJavascript()
313
+ {
314
+ if ($this->conditions->areConditionsMet() && !$this->isDismissed()) {
315
+ $this->renderJavaScript();
316
+ }
317
+ }
318
+
319
+ /**
320
+ * Is pointer message already dismissed?
321
+ *
322
+ * @return bool
323
+ */
324
+ private function isDismissed()
325
+ {
326
+ $dismissedPointerMessages = array_filter(
327
+ explode(',', (string) get_user_meta(get_current_user_id(), self::USER_META_DISMISSED_WP_POINTERS, true))
328
+ );
329
+ return in_array($this->id, $dismissedPointerMessages, true);
330
+ }
331
+
332
+ /**
333
+ * Un dismiss pointer message.
334
+ */
335
+ public function unDismiss()
336
+ {
337
+ $dismissedPointerMessages = array_filter(
338
+ explode(',', (string) get_user_meta(get_current_user_id(), self::USER_META_DISMISSED_WP_POINTERS, true))
339
+ );
340
+ foreach ($dismissedPointerMessages as $key => $value) {
341
+ if ($value === $this->getId()) {
342
+ unset($dismissedPointerMessages[$key]);
343
+ update_user_meta(
344
+ get_current_user_id(),
345
+ self::USER_META_DISMISSED_WP_POINTERS,
346
+ implode(',', $dismissedPointerMessages)
347
+ );
348
+ }
349
+ }
350
+ }
351
+
352
+ }
353
+
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\Pointer;
4
+
5
+ /**
6
+ * WordPress admin pointer message position.
7
+ *
8
+ * @package WPDesk\Pointer
9
+ */
10
+ class PointerPosition
11
+ {
12
+
13
+ const TOP = 'top';
14
+ const RIGHT = 'right';
15
+ const BOTTOM = 'bottom';
16
+ const LEFT = 'left';
17
+
18
+ /**
19
+ * @var string
20
+ */
21
+ private $edge = false;
22
+
23
+ /**
24
+ * @var string
25
+ */
26
+ private $align;
27
+
28
+ public function __construct(
29
+ $edge = 'left',
30
+ $align = 'top'
31
+ ) {
32
+ $this->edge = $edge;
33
+ $this->align = $align;
34
+ }
35
+
36
+ /**
37
+ * @return string
38
+ */
39
+ public function getEdge()
40
+ {
41
+ return $this->edge;
42
+ }
43
+
44
+ /**
45
+ * @param string $edge
46
+ */
47
+ public function setEdge($edge)
48
+ {
49
+ $this->edge = $edge;
50
+ }
51
+
52
+ /**
53
+ * @return string
54
+ */
55
+ public function getAlign()
56
+ {
57
+ return $this->align;
58
+ }
59
+
60
+ /**
61
+ * @param string $align
62
+ */
63
+ public function setAlign($align)
64
+ {
65
+ $this->align = $align;
66
+ }
67
+
68
+ /**
69
+ * Render as JSON.
70
+ */
71
+ public function render()
72
+ {
73
+ echo json_encode(array('edge' => $this->edge, 'align' => $this->align));
74
+ }
75
+
76
+ }
77
+
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WPDesk\Pointer;
4
+
5
+ use WPDesk\PluginBuilder\Plugin\Hookable;
6
+
7
+ /**
8
+ * Pointers handler.
9
+ *
10
+ * @package WPDesk\Pointer
11
+ */
12
+ class PointersScripts implements Hookable
13
+ {
14
+
15
+ /**
16
+ * @var array
17
+ */
18
+ private $enqueueOnScreens = array();
19
+
20
+ /**
21
+ * PointersScripts constructor.
22
+ *
23
+ * @param null|string|array $enqueueOnScreens Empty for all screens.
24
+ */
25
+ public function __construct($enqueueOnScreens = array())
26
+ {
27
+ if (null === $enqueueOnScreens) {
28
+ $enqueueOnScreens = array();
29
+ }
30
+ if (!is_array($enqueueOnScreens)) {
31
+ $enqueueOnScreens = array($enqueueOnScreens);
32
+ }
33
+ $this->enqueueOnScreens = $enqueueOnScreens;
34
+ }
35
+
36
+ /**
37
+ * Hooks.
38
+ */
39
+ public function hooks()
40
+ {
41
+ add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
42
+ }
43
+
44
+ /**
45
+ * Enqueue scripts.
46
+ *
47
+ * @param string $hook
48
+ */
49
+ public function enqueueScripts($hook)
50
+ {
51
+ if (count($this->enqueueOnScreens) === 0 || in_array($hook, $this->enqueueOnScreens, true)) {
52
+ wp_enqueue_style('wp-pointer');
53
+ wp_enqueue_script('wp-pointer');
54
+ }
55
+ }
56
+
57
+ }
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $pointerAnchor
4
+ * @var string $pointerContent
5
+ * @var \WPDesk\Pointer\PointerPosition $pointerPosition
6
+ * @var string $pointerId
7
+ * @var string $pointerContentId
8
+ * @var int $pointerWidth
9
+ * @var array $pointerCss
10
+ */
11
+ ?>
12
+ <script type="text/javascript">
13
+ jQuery(document).ready( function($) {
14
+ if(typeof(jQuery().pointer) != 'undefined') {
15
+ $('<?php echo $pointerAnchor; ?>').pointer({
16
+ pointerWidth: <?php echo $pointerWidth; ?>,
17
+ content: <?php echo json_encode($pointerContent); ?>,
18
+ position: <?php echo $pointerPosition->render(); ?>,
19
+ <?php if ( $pointerCss ) : ?>
20
+ show: function(event, t){
21
+ t.pointer.css(<?php echo json_encode( $pointerCss ); ?>);
22
+ $('<?php echo $pointerAnchor; ?>').css('position', 'relative');
23
+ t.pointer.appendTo('<?php echo $pointerAnchor; ?>');
24
+ },
25
+ <?php endif; ?>
26
+ close: function() {
27
+ $('#<?php echo $pointerContentId; ?>').remove();
28
+ $.post(ajaxurl, {
29
+ pointer: '<?php echo $pointerId; ?>',
30
+ action: 'dismiss-wp-pointer'
31
+ });
32
+ },
33
+ }).pointer('open');
34
+ }
35
+ });
36
+ </script>
vendor_prefixed/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php CHANGED
@@ -47,6 +47,14 @@ class PointerMessage
47
  * @var PointerConditions
48
  */
49
  private $conditions;
 
 
 
 
 
 
 
 
50
  /**
51
  * PointerMessage constructor.
52
  *
@@ -58,8 +66,9 @@ class PointerMessage
58
  * @param string pointerClass
59
  * @param int $pointerWidth
60
  * @param null|PointerConditions $conditions Pointer conditions.
 
61
  */
62
- public function __construct($id, $anchor, $title, $content, $position = null, $pointerClass = 'wp-pointer', $pointerWidth = 320, $conditions = null)
63
  {
64
  $this->id = $id;
65
  $this->anchor = $anchor;
@@ -76,6 +85,7 @@ class PointerMessage
76
  } else {
77
  $this->conditions = $conditions;
78
  }
 
79
  $this->addAction();
80
  }
81
  /**
@@ -213,6 +223,13 @@ class PointerMessage
213
  {
214
  return $this->conditions;
215
  }
 
 
 
 
 
 
 
216
  /**
217
  * @param PointerConditions $conditions
218
  */
@@ -232,6 +249,7 @@ class PointerMessage
232
  $pointerContent = \sprintf('<h3>%1$s</h3><p id="%2$s">%3$s</p>', $this->title, $pointerContentId, $this->content);
233
  $pointerPosition = $this->getPosition();
234
  $pointerId = $this->getId();
 
235
  include 'views/html-script-pointer-message.php';
236
  }
237
  /**
47
  * @var PointerConditions
48
  */
49
  private $conditions;
50
+ /**
51
+ * @var array
52
+ */
53
+ private $pointerCss = array();
54
+ /**
55
+ * @var array
56
+ */
57
+ private $defaultPointerCss = array('top' => '50%', 'left' => '100%', '-webkit-transform' => 'translateY(-50%)', '-ms-transform' => 'translateY(-50%)', 'transform' => 'translateY(-50%)');
58
  /**
59
  * PointerMessage constructor.
60
  *
66
  * @param string pointerClass
67
  * @param int $pointerWidth
68
  * @param null|PointerConditions $conditions Pointer conditions.
69
+ * @param array $pointerCss Pointer CSS.
70
  */
71
+ public function __construct($id, $anchor, $title, $content, $position = null, $pointerClass = 'wp-pointer', $pointerWidth = 320, $conditions = null, $pointerCss = array())
72
  {
73
  $this->id = $id;
74
  $this->anchor = $anchor;
85
  } else {
86
  $this->conditions = $conditions;
87
  }
88
+ $this->pointerCss = $pointerCss;
89
  $this->addAction();
90
  }
91
  /**
223
  {
224
  return $this->conditions;
225
  }
226
+ /**
227
+ * @return array
228
+ */
229
+ public function getPointerCss()
230
+ {
231
+ return $this->pointerCss;
232
+ }
233
  /**
234
  * @param PointerConditions $conditions
235
  */
249
  $pointerContent = \sprintf('<h3>%1$s</h3><p id="%2$s">%3$s</p>', $this->title, $pointerContentId, $this->content);
250
  $pointerPosition = $this->getPosition();
251
  $pointerId = $this->getId();
252
+ $pointerCss = \array_merge($this->defaultPointerCss, $this->getPointerCss());
253
  include 'views/html-script-pointer-message.php';
254
  }
255
  /**
vendor_prefixed/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php CHANGED
@@ -9,6 +9,7 @@ namespace FSVendor;
9
  * @var string $pointerId
10
  * @var string $pointerContentId
11
  * @var int $pointerWidth
 
12
  */
13
  ?>
14
  <script type="text/javascript">
@@ -26,6 +27,23 @@ echo \json_encode($pointerContent);
26
  position: <?php
27
  echo $pointerPosition->render();
28
  ?>,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  close: function() {
30
  $('#<?php
31
  echo $pointerContentId;
9
  * @var string $pointerId
10
  * @var string $pointerContentId
11
  * @var int $pointerWidth
12
+ * @var array $pointerCss
13
  */
14
  ?>
15
  <script type="text/javascript">
27
  position: <?php
28
  echo $pointerPosition->render();
29
  ?>,
30
+ <?php
31
+ if ($pointerCss) {
32
+ ?>
33
+ show: function(event, t){
34
+ t.pointer.css(<?php
35
+ echo \json_encode($pointerCss);
36
+ ?>);
37
+ $('<?php
38
+ echo $pointerAnchor;
39
+ ?>').css('position', 'relative');
40
+ t.pointer.appendTo('<?php
41
+ echo $pointerAnchor;
42
+ ?>');
43
+ },
44
+ <?php
45
+ }
46
+ ?>
47
  close: function() {
48
  $('#<?php
49
  echo $pointerContentId;
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/composer.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "wpdesk\/wp-wpdesk-tracker-user-feedback",
3
+ "authors": [
4
+ {
5
+ "name": "Krzysiek",
6
+ "email": "krzysiek@wpdesk.pl"
7
+ },
8
+ {
9
+ "name": "Grzegorz",
10
+ "email": "grzegorz@wpdesk.pl"
11
+ }
12
+ ],
13
+ "prefer-stable": true,
14
+ "minimum-stability": "dev",
15
+ "require": {
16
+ "php": ">=5.6"
17
+ },
18
+ "require-dev": {
19
+ "phpunit\/phpunit": "<7",
20
+ "wp-coding-standards\/wpcs": "^0.14.1",
21
+ "squizlabs\/php_codesniffer": "^3.0.2",
22
+ "mockery\/mockery": "*",
23
+ "10up\/wp_mock": "*",
24
+ "wimg\/php-compatibility": "^8",
25
+ "wpdesk\/wp-wpdesk-tracker": "^2.0",
26
+ "wpdesk\/wp-builder": "^1.4"
27
+ },
28
+ "autoload": {
29
+ "psr-4": {
30
+ "FSVendor\\WPDesk\\Tracker\\UserFeedback\\": "src\/WPDesk\/Tracker\/UserFeedback\/"
31
+ }
32
+ },
33
+ "autoload-dev": {
34
+ "psr-4": {
35
+ "FSVendor\\WPDesk\\Tracker\\UserFeedback\\": "src\/WPDesk\/Tracker\/UserFeedback\/"
36
+ },
37
+ "classmap": [
38
+ "tests\/"
39
+ ]
40
+ },
41
+ "extra": {
42
+ "text-domain": "wp-wpdesk-tracker-user-feedback",
43
+ "translations-folder": "lang",
44
+ "po-files": {
45
+ "pl_PL": "pl_PL.po"
46
+ }
47
+ },
48
+ "scripts": {
49
+ "test": "echo composer is alive",
50
+ "phpcs": "phpcs",
51
+ "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
52
+ "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
53
+ "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
54
+ "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage",
55
+ "docs": "apigen generate"
56
+ }
57
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/AjaxUserFeedbackDataHandler.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
6
+ /**
7
+ * Can handle ajax request with user feedback data and sends data to WP Desk.
8
+ */
9
+ class AjaxUserFeedbackDataHandler implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
10
+ {
11
+ const AJAX_ACTION = 'wpdesk_tracker_user_feedback_handler_';
12
+ const REQUEST_ADDITIONAL_INFO = 'additional_info';
13
+ const REQUEST_SELECTED_OPTION = 'selected_option';
14
+ const FEEDBACK_ID = 'feedback_id';
15
+ /**
16
+ * @var UserFeedbackData
17
+ */
18
+ protected $user_feedback_data;
19
+ /**
20
+ * @var \WPDesk_Tracker_Sender
21
+ */
22
+ private $sender;
23
+ /**
24
+ * @param UserFeedbackData $user_feedback_data .
25
+ * @param \WPDesk_Tracker_Sender|null $sender
26
+ */
27
+ public function __construct(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, $sender = null)
28
+ {
29
+ $this->user_feedback_data = $user_feedback_data;
30
+ $this->sender = $sender;
31
+ }
32
+ /**
33
+ * Hooks.
34
+ */
35
+ public function hooks()
36
+ {
37
+ \add_action('wp_ajax_' . self::AJAX_ACTION . $this->user_feedback_data->get_thickbox_id(), array($this, 'handleAjaxRequest'));
38
+ }
39
+ /**
40
+ * Prepare payload.
41
+ *
42
+ * @param array $request .
43
+ *
44
+ * @return array
45
+ */
46
+ private function preparePayload(array $request)
47
+ {
48
+ $payload = array('click_action' => 'user_feedback', self::FEEDBACK_ID => $this->user_feedback_data->get_thickbox_id(), 'selected_option' => $request[self::REQUEST_SELECTED_OPTION]);
49
+ if (!empty($request[self::REQUEST_ADDITIONAL_INFO])) {
50
+ $payload['additional_info'] = $request[self::REQUEST_ADDITIONAL_INFO];
51
+ }
52
+ return \apply_filters('wpdesk_tracker_user_feedback_data', $payload);
53
+ }
54
+ /**
55
+ * Send payload to WP Desk.
56
+ *
57
+ * @param array $payload
58
+ */
59
+ private function sendPayloadToWpdesk(array $payload)
60
+ {
61
+ $this->sender->send_payload($payload);
62
+ }
63
+ /**
64
+ * Handle AJAX request.
65
+ */
66
+ public function handleAjaxRequest()
67
+ {
68
+ \check_ajax_referer(self::AJAX_ACTION . $this->user_feedback_data->get_thickbox_id());
69
+ if (isset($_REQUEST[self::REQUEST_SELECTED_OPTION])) {
70
+ $payload = $this->preparePayload($_REQUEST);
71
+ if (null !== $this->sender) {
72
+ $this->sendPayloadToWpdesk($this->preparePayload($_REQUEST));
73
+ }
74
+ \do_action('wpdesk_tracker_user_feedback_data_handled', $payload);
75
+ }
76
+ }
77
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Scripts.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ /**
6
+ * Can generate user feedback scripts.
7
+ */
8
+ class Scripts
9
+ {
10
+ use UserFeedbackContent;
11
+ /**
12
+ * Constructor.
13
+ *
14
+ * @param UserFeedbackData $user_feedback_data .
15
+ * @param string|null $view_file .
16
+ */
17
+ public function __construct(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, $view_file = null)
18
+ {
19
+ $this->user_feedback_data = $user_feedback_data;
20
+ if (!empty($view_file)) {
21
+ $this->view_file = $view_file;
22
+ } else {
23
+ $this->view_file = __DIR__ . '/views/scripts.php';
24
+ }
25
+ }
26
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Thickbox.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ /**
6
+ * Can generate user feedback thickbox content.
7
+ */
8
+ class Thickbox
9
+ {
10
+ use UserFeedbackContent;
11
+ /**
12
+ * Constructor.
13
+ *
14
+ * @param UserFeedbackData $user_feedback_data .
15
+ * @param string|null $view_file .
16
+ */
17
+ public function __construct(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, $view_file = null)
18
+ {
19
+ $thickbox_id = $user_feedback_data->get_thickbox_id();
20
+ $this->user_feedback_data = $user_feedback_data;
21
+ if (!empty($view_file)) {
22
+ $this->view_file = $view_file;
23
+ } else {
24
+ $this->view_file = __DIR__ . '/views/thickbox.php';
25
+ }
26
+ }
27
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/Tracker.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
6
+ /**
7
+ * Can track user feedback.
8
+ */
9
+ class Tracker implements \FSVendor\WPDesk\PluginBuilder\Plugin\Hookable
10
+ {
11
+ /**
12
+ * @var UserFeedbackData
13
+ */
14
+ private $user_feedback_data;
15
+ /**
16
+ * @var Scripts
17
+ */
18
+ private $scripts;
19
+ /**
20
+ * @var Thickbox
21
+ */
22
+ private $thickbox;
23
+ /**
24
+ * @var AjaxUserFeedbackDataHandler
25
+ */
26
+ private $ajax;
27
+ /**
28
+ * Tracker constructor.
29
+ *
30
+ * @param UserFeedbackData $user_feedback_data .
31
+ * @param Scripts $scripts .
32
+ * @param Thickbox $thickbox .
33
+ * @param AjaxUserFeedbackDataHandler $ajax
34
+ */
35
+ public function __construct(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, \FSVendor\WPDesk\Tracker\UserFeedback\Scripts $scripts, \FSVendor\WPDesk\Tracker\UserFeedback\Thickbox $thickbox, \FSVendor\WPDesk\Tracker\UserFeedback\AjaxUserFeedbackDataHandler $ajax)
36
+ {
37
+ $this->user_feedback_data = $user_feedback_data;
38
+ $this->scripts = $scripts;
39
+ $this->thickbox = $thickbox;
40
+ $this->ajax = $ajax;
41
+ }
42
+ /**
43
+ * Hooks.
44
+ */
45
+ public function hooks()
46
+ {
47
+ \add_action('admin_print_footer_scripts-' . $this->user_feedback_data->get_hook_suffix(), [$this, 'printUserFeedbackScripts']);
48
+ \add_action('admin_footer-' . $this->user_feedback_data->get_hook_suffix(), [$this, 'printUserFeedbackThickbox']);
49
+ \add_action('admin_enqueue_scripts', [$this, 'enqueue_thickbox']);
50
+ $this->ajax->hooks();
51
+ }
52
+ /**
53
+ * Enqueue thickbox script and styles.
54
+ */
55
+ public function enqueue_thickbox()
56
+ {
57
+ \wp_enqueue_script('thickbox');
58
+ \wp_enqueue_style('thickbox');
59
+ }
60
+ /**
61
+ * Print user feedback scripts.
62
+ */
63
+ public function printUserFeedbackScripts()
64
+ {
65
+ echo $this->scripts->getContent();
66
+ }
67
+ /**
68
+ * Print user feedback thickbox.
69
+ */
70
+ public function printUserFeedbackThickbox()
71
+ {
72
+ echo $this->thickbox->getContent();
73
+ }
74
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/TrackerFactory.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ /**
6
+ * Can create tracker.
7
+ */
8
+ class TrackerFactory
9
+ {
10
+ /**
11
+ * Create custom tracker.
12
+ *
13
+ * @param PluginData $user_feedback_data .
14
+ * @param Scripts|null $scripts .
15
+ * @param Thickbox|null $thickbox .
16
+ * @param AjaxUserFeedbackDataHandler|null $ajax
17
+ *
18
+ * @return Tracker
19
+ */
20
+ public static function createCustomTracker(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, $scripts = null, $thickbox = null, $ajax = null)
21
+ {
22
+ if (empty($scripts)) {
23
+ $scripts = new \FSVendor\WPDesk\Tracker\UserFeedback\Scripts($user_feedback_data);
24
+ }
25
+ if (empty($thickbox)) {
26
+ $thickbox = new \FSVendor\WPDesk\Tracker\UserFeedback\Thickbox($user_feedback_data);
27
+ }
28
+ if (empty($ajax)) {
29
+ $sender = new \FSVendor\WPDesk_Tracker_Sender_Wordpress_To_WPDesk();
30
+ $sender = new \FSVendor\WPDesk_Tracker_Sender_Logged($sender);
31
+ $ajax = new \FSVendor\WPDesk\Tracker\UserFeedback\AjaxUserFeedbackDataHandler($user_feedback_data, $sender);
32
+ }
33
+ return new \FSVendor\WPDesk\Tracker\UserFeedback\Tracker($user_feedback_data, $scripts, $thickbox, $ajax);
34
+ }
35
+ /**
36
+ * Create custom tracker without sender.
37
+ * Created tracker do not sends payload data to server.
38
+ *
39
+ * @param PluginData $user_feedback_data .
40
+ * @param Scripts|null $scripts .
41
+ * @param Thickbox|null $thickbox .
42
+ * @param AjaxUserFeedbackDataHandler|null $ajax
43
+ *
44
+ * @return Tracker
45
+ */
46
+ public static function createCustomTrackerWithoutSender(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackData $user_feedback_data, $scripts = null, $thickbox = null, $ajax = null)
47
+ {
48
+ if (empty($scripts)) {
49
+ $scripts = new \FSVendor\WPDesk\Tracker\UserFeedback\Scripts($user_feedback_data);
50
+ }
51
+ if (empty($thickbox)) {
52
+ $thickbox = new \FSVendor\WPDesk\Tracker\UserFeedback\Thickbox($user_feedback_data);
53
+ }
54
+ if (empty($ajax)) {
55
+ $ajax = new \FSVendor\WPDesk\Tracker\UserFeedback\AjaxUserFeedbackDataHandler($user_feedback_data);
56
+ }
57
+ return new \FSVendor\WPDesk\Tracker\UserFeedback\Tracker($user_feedback_data, $scripts, $thickbox, $ajax);
58
+ }
59
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackContent.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ /**
6
+ * Can generate content.
7
+ */
8
+ trait UserFeedbackContent
9
+ {
10
+ /**
11
+ * @var UserFeedbackData
12
+ */
13
+ private $user_feedback_data;
14
+ /**
15
+ * @var string
16
+ */
17
+ private $view_file = __DIR__ . '/views/abstract.php';
18
+ /**
19
+ * Returns HTML content.
20
+ *
21
+ * @return string
22
+ */
23
+ public function getContent()
24
+ {
25
+ $thickbox_id = $this->user_feedback_data->get_thickbox_id();
26
+ $thickbox_title = $this->user_feedback_data->get_thickbox_title();
27
+ $thickbox_heading = $this->user_feedback_data->get_heading();
28
+ $thickbox_question = $this->user_feedback_data->get_question();
29
+ $thickbox_feedback_options = $this->user_feedback_data->get_feedback_options();
30
+ $thickbox_all_options = \count($thickbox_feedback_options);
31
+ $button_send_text = \__('Proceed', 'flexible-shipping');
32
+ $ajax_action = \FSVendor\WPDesk\Tracker\UserFeedback\AjaxUserFeedbackDataHandler::AJAX_ACTION . $thickbox_id;
33
+ $ajax_nonce = \wp_create_nonce($ajax_action);
34
+ \ob_start();
35
+ include $this->view_file;
36
+ return \ob_get_clean();
37
+ }
38
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackData.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ class UserFeedbackData
6
+ {
7
+ /**
8
+ * @var UserFeedbackOption[]
9
+ */
10
+ private $feedback_options = array();
11
+ /**
12
+ * @var string
13
+ */
14
+ private $thickbox_id;
15
+ /**
16
+ * @var string
17
+ */
18
+ private $thickbox_title;
19
+ /**
20
+ * @var string
21
+ */
22
+ private $heading;
23
+ /**
24
+ * @var string
25
+ */
26
+ private $question;
27
+ /**
28
+ * @var string
29
+ */
30
+ private $hook_suffix;
31
+ /**
32
+ * UserFeedbackData constructor.
33
+ *
34
+ * @param string $thickbox_id
35
+ * @param string $thickbox_title
36
+ * @param string $heading
37
+ * @param string $question
38
+ * @param string $hook_suffix
39
+ */
40
+ public function __construct($thickbox_id, $thickbox_title, $heading, $question, $hook_suffix)
41
+ {
42
+ $this->thickbox_id = $thickbox_id;
43
+ $this->thickbox_title = $thickbox_title;
44
+ $this->heading = $heading;
45
+ $this->question = $question;
46
+ $this->hook_suffix = $hook_suffix;
47
+ }
48
+ /**
49
+ * @param UserFeedbackOption $feedback_option
50
+ *
51
+ * @return UserFeedbackData
52
+ */
53
+ public function add_feedback_option(\FSVendor\WPDesk\Tracker\UserFeedback\UserFeedbackOption $feedback_option)
54
+ {
55
+ $this->feedback_options[] = $feedback_option;
56
+ return $this;
57
+ }
58
+ /**
59
+ * @return UserFeedbackOption[]
60
+ */
61
+ public function get_feedback_options()
62
+ {
63
+ return $this->feedback_options;
64
+ }
65
+ /**
66
+ * @return string
67
+ */
68
+ public function get_thickbox_id()
69
+ {
70
+ return $this->thickbox_id;
71
+ }
72
+ /**
73
+ * @return string
74
+ */
75
+ public function get_thickbox_title()
76
+ {
77
+ return $this->thickbox_title;
78
+ }
79
+ /**
80
+ * @return string
81
+ */
82
+ public function get_heading()
83
+ {
84
+ return $this->heading;
85
+ }
86
+ /**
87
+ * @return string
88
+ */
89
+ public function get_question()
90
+ {
91
+ return $this->question;
92
+ }
93
+ /**
94
+ * @return string
95
+ */
96
+ public function get_hook_suffix()
97
+ {
98
+ return $this->hook_suffix;
99
+ }
100
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/UserFeedbackOption.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor\WPDesk\Tracker\UserFeedback;
4
+
5
+ class UserFeedbackOption
6
+ {
7
+ /**
8
+ * @var string
9
+ */
10
+ private $option_name;
11
+ /**
12
+ * @var string
13
+ */
14
+ private $option_text;
15
+ /**
16
+ * @var bool
17
+ */
18
+ private $has_additional_info;
19
+ /**
20
+ * @var string
21
+ */
22
+ private $additional_info_placeholder;
23
+ /**
24
+ * UserFeedbackOption constructor.
25
+ *
26
+ * @param string $option_name
27
+ * @param string $option_text
28
+ * @param bool $has_additional_info
29
+ * @param string $additional_info_placeholder
30
+ */
31
+ public function __construct($option_name, $option_text, $has_additional_info = \false, $additional_info_placeholder = '')
32
+ {
33
+ $this->option_name = $option_name;
34
+ $this->option_text = $option_text;
35
+ $this->has_additional_info = $has_additional_info;
36
+ $this->additional_info_placeholder = $additional_info_placeholder;
37
+ }
38
+ /**
39
+ * @return string
40
+ */
41
+ public function get_option_name()
42
+ {
43
+ return $this->option_name;
44
+ }
45
+ /**
46
+ * @return string
47
+ */
48
+ public function get_option_text()
49
+ {
50
+ return $this->option_text;
51
+ }
52
+ /**
53
+ * @return bool
54
+ */
55
+ public function has_additional_info()
56
+ {
57
+ return $this->has_additional_info;
58
+ }
59
+ /**
60
+ * @return string
61
+ */
62
+ public function get_additional_info_placeholder()
63
+ {
64
+ return $this->additional_info_placeholder;
65
+ }
66
+ }
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/abstract.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor;
4
+
5
+ /**
6
+ * @var $plugin_title string
7
+ * @var $plugin_file string
8
+ * @var $plugin_slug string
9
+ * @var $thickbox_id string
10
+ * @var $ajax_action string
11
+ * @var $ajax_nonce string
12
+ */
13
+ if (!\defined('ABSPATH')) {
14
+ exit;
15
+ }
16
+ ?><!-- AbstractContent --><?php
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/scripts.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor;
4
+
5
+ /**
6
+ * @var $thickbox_id string
7
+ * @var $thickbox_title string
8
+ * @var $ajax_action string
9
+ * @var $ajax_nonce string
10
+ * @var $button_send_text string
11
+ * @var $thickbox_all_options int
12
+ */
13
+ if (!\defined('ABSPATH')) {
14
+ exit;
15
+ }
16
+ ?><script type="text/javascript">
17
+
18
+ jQuery(document).ready(function(){
19
+
20
+ function resize_user_feedback_tb_window() {
21
+ let margin_horizontal = 30;
22
+ let $TB_ajaxContent = jQuery('#TB_ajaxContent');
23
+ let $TB_window = jQuery(document).find('#TB_window');
24
+ let width = $TB_ajaxContent.width();
25
+ let height = jQuery('#TB_title').outerHeight(true) + 20;
26
+ $TB_ajaxContent.children().each(function(){
27
+ height += jQuery(this).outerHeight(true);
28
+ });
29
+ $TB_ajaxContent.height( height );
30
+ $TB_window.width( width + margin_horizontal ).height( $TB_ajaxContent.outerHeight(true) ).css( 'margin-left', - ( width + margin_horizontal ) / 2 );
31
+ }
32
+
33
+ jQuery(document).bind('<?php
34
+ echo \esc_attr($thickbox_id);
35
+ ?>', function(e){
36
+ let tb_id = '#TB_inline?inlineId=<?php
37
+ echo $thickbox_id;
38
+ ?>';
39
+ tb_show('<?php
40
+ echo \esc_html($thickbox_title);
41
+ ?>', tb_id);
42
+ resize_user_feedback_tb_window();
43
+ });
44
+
45
+ jQuery(document).on( 'click', '.<?php
46
+ echo $thickbox_id;
47
+ ?> .tracker-button-close', function(e) {
48
+ e.preventDefault();
49
+ tb_remove();
50
+ });
51
+
52
+ jQuery(document).on( 'click', '.<?php
53
+ echo $thickbox_id;
54
+ ?> .skip-proceed', function(e) {
55
+ e.preventDefault();
56
+ tb_remove();
57
+ jQuery(document).trigger('<?php
58
+ echo $thickbox_id;
59
+ ?>_proceed');
60
+ });
61
+
62
+ jQuery(document).on( 'click', '.<?php
63
+ echo $thickbox_id;
64
+ ?> .allow-proceed', function(e) {
65
+ e.preventDefault();
66
+ let selected_option = jQuery('.<?php
67
+ echo $thickbox_id;
68
+ ?> input[name=selected_option]:checked').val();
69
+ let additional_info = jQuery('.<?php
70
+ echo $thickbox_id;
71
+ ?> input[name=selected_option]:checked').closest('li').find('.additional-info').val();
72
+ if ( typeof selected_option !== 'undefined' ) {
73
+ jQuery('.button').attr('disabled',true);
74
+ jQuery.ajax( '<?php
75
+ echo \admin_url('admin-ajax.php');
76
+ ?>',
77
+ {
78
+ type: 'POST',
79
+ data: {
80
+ 'action': '<?php
81
+ echo $ajax_action;
82
+ ?>',
83
+ '_ajax_nonce': '<?php
84
+ echo $ajax_nonce;
85
+ ?>',
86
+ 'selected_option': selected_option,
87
+ 'additional_info': additional_info,
88
+ }
89
+ }
90
+ ).always(function() {
91
+ jQuery(document).trigger('<?php
92
+ echo $thickbox_id;
93
+ ?>_proceed');
94
+ });
95
+ }
96
+ else {
97
+ jQuery(document).trigger('<?php
98
+ echo $thickbox_id;
99
+ ?>_proceed');
100
+ }
101
+ });
102
+
103
+ jQuery(document).on( 'click', '.<?php
104
+ echo $thickbox_id;
105
+ ?> input[type=radio]', function(){
106
+ var tracker_user_feedback = jQuery(this).closest('.<?php
107
+ echo $thickbox_id;
108
+ ?>');
109
+ tracker_user_feedback.find('input[type=radio]').each(function(){
110
+ if ( jQuery(this).data("show") ) {
111
+ var show_element = tracker_user_feedback.find( '.' + jQuery(this).data('show') );
112
+ if ( jQuery(this).is(':checked') ) {
113
+ show_element.show();
114
+ } else {
115
+ show_element.hide();
116
+ }
117
+ }
118
+ });
119
+ resize_user_feedback_tb_window();
120
+ jQuery('.<?php
121
+ echo $thickbox_id;
122
+ ?> .skip-proceed').addClass('allow-proceed').removeClass('skip-proceed').html( '<?php
123
+ echo \esc_html($button_send_text);
124
+ ?>' );
125
+ });
126
+
127
+ jQuery(window).load(function() {
128
+ jQuery(window).resize(function(){
129
+ resize_user_feedback_tb_window();
130
+ });
131
+ });
132
+
133
+ });
134
+
135
+ </script>
136
+ <style>
137
+ #TB_ajaxContent {
138
+ overflow: hidden;
139
+ }
140
+ .<?php
141
+ echo $thickbox_id;
142
+ ?> input[type=text] {
143
+ margin-left: 25px;
144
+ width: 90%;
145
+ }
146
+ .<?php
147
+ echo $thickbox_id;
148
+ ?> textarea {
149
+ margin-left: 25px;
150
+ width: 90%;
151
+ height: 86px;
152
+ resize: none;
153
+ }
154
+ .<?php
155
+ echo $thickbox_id;
156
+ ?> textarea.no_question {
157
+ margin-left: 0px;
158
+ width: 90%;
159
+ }
160
+ </style>
161
+ <?php
vendor_prefixed/wpdesk/wp-wpdesk-tracker-user-feedback/src/WPDesk/Tracker/UserFeedback/views/thickbox.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor;
4
+
5
+ /**
6
+ * @var $thickbox_id string
7
+ * @var $thickbox_title string
8
+ * @var $thickbox_heading string
9
+ * @var $thickbox_question string
10
+ * @var $thickbox_feedback_options \WPDesk\Tracker\UserFeedback\UserFeedbackOption[]
11
+ * @var $ajax_action string
12
+ * @var $ajax_nonce string
13
+ * @var $thickbox_all_options int
14
+ */
15
+ if (!\defined('ABSPATH')) {
16
+ exit;
17
+ }
18
+ ?><div id="<?php
19
+ echo $thickbox_id;
20
+ ?>" style="display:none;">
21
+ <?php
22
+ if ($thickbox_heading) {
23
+ ?>
24
+ <h4><?php
25
+ echo \esc_html($thickbox_heading);
26
+ ?></h4>
27
+ <?php
28
+ }
29
+ ?>
30
+ <div class="wpdesk_tracker_user_feedback <?php
31
+ echo $thickbox_id;
32
+ ?>">
33
+ <div class="body">
34
+ <div class="panel active" data-panel-id="options">
35
+ <h2><strong><?php
36
+ echo \esc_html($thickbox_question);
37
+ ?></strong></h2>
38
+ <ul class="reasons-list">
39
+ <?php
40
+ foreach ($thickbox_feedback_options as $feedback_option) {
41
+ ?>
42
+ <li class="reason <?php
43
+ echo \esc_attr($feedback_option->has_additional_info() ? 'has-input' : '');
44
+ ?>">
45
+ <label style="<?php
46
+ echo \esc_attr($feedback_option->get_option_text() === '' ? 'display: none' : '');
47
+ ?>">
48
+ <span>
49
+ <input
50
+ type="radio"
51
+ name="selected_option"
52
+ value="<?php
53
+ echo \esc_attr($feedback_option->get_option_name());
54
+ ?>"
55
+ data-show="<?php
56
+ echo \esc_attr($feedback_option->get_option_name());
57
+ ?>"
58
+ <?php
59
+ echo \esc_attr(1 === $thickbox_all_options ? 'checked' : '');
60
+ ?>
61
+ />
62
+ </span>
63
+ <span><?php
64
+ echo \esc_html($feedback_option->get_option_text());
65
+ ?></span>
66
+ </label>
67
+ <?php
68
+ if ($feedback_option->has_additional_info()) {
69
+ ?>
70
+ <div class="<?php
71
+ echo \esc_attr($feedback_option->get_option_name());
72
+ ?>" class="option-input" style="<?php
73
+ echo \esc_attr(1 !== $thickbox_all_options ? 'display: none' : '');
74
+ ?>">
75
+ <textarea
76
+ class="additional-info <?php
77
+ echo \esc_attr($feedback_option->get_option_text() === '' ? 'no_question' : '');
78
+ ?>"
79
+ name="<?php
80
+ echo \esc_attr($feedback_option->get_option_name());
81
+ ?>_input"
82
+ placeholder="<?php
83
+ echo \esc_attr($feedback_option->get_additional_info_placeholder());
84
+ ?>"></textarea>
85
+ </div>
86
+ <?php
87
+ }
88
+ ?>
89
+ </li>
90
+ <?php
91
+ }
92
+ ?>
93
+ </ul>
94
+ </div>
95
+ </div>
96
+ <div class="footer">
97
+ <a href="#" class="button button-secondary button-close tracker-button-close"><?php
98
+ \_e('Cancel', 'flexible-shipping');
99
+ ?></a>
100
+ <a href="#" class="button button-primary <?php
101
+ echo \esc_attr(1 === $thickbox_all_options ? 'allow-proceed' : 'skip-proceed');
102
+ ?>"><?php
103
+ echo \esc_html(1 === $thickbox_all_options ? $button_send_text : \__('Skip', 'flexible-shipping'));
104
+ ?></a>
105
+ </div>
106
+ </div>
107
+ </div><?php
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FSVendor;
4
+
5
+ class WPDesk_Tracker_Persistence_Consent
6
+ {
7
+ /**
8
+ * Option name with settings.
9
+ * @var string
10
+ */
11
+ private $option_name = 'wpdesk_helper_options';
12
+ /**
13
+ * Checks if consent of tracking is active.
14
+ *
15
+ * @return bool Consent status.
16
+ */
17
+ public function is_active()
18
+ {
19
+ $options = \get_option($this->option_name, array());
20
+ if (!\is_array($options)) {
21
+ $options = array();
22
+ }
23
+ return isset($options['wpdesk_tracker_agree']) && $options['wpdesk_tracker_agree'] === '1';
24
+ }
25
+ }