WooCommerce Germanized - Version 2.3.3

Version Description

  • Feature: Option to manually resend paid for order email
  • Feature: WooCommerce 3.7 support
  • Improvement: Better hook documentation
  • Improvement: Moved digital delivery time text option to delivery time settings
  • Improvement: Role based pricing compatibility mini cart support
  • Improvement: White space between percentage and number in tax rate
  • Improvement: Use woocommerce_gzd_customer_registration_redirect filter while redirecting from checkout to myaccount
  • Fix: Prevent error while trying to access parent products
  • Fix: Better legacy method calling support
  • Fix: Zero tax rate shipping tax calculation fallback
Download this release

Release Info

Developer vendidero
Plugin Icon 128x128 WooCommerce Germanized
Version 2.3.3
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.3

Files changed (79) hide show
  1. i18n/languages/woocommerce-germanized-de_DE.mo +0 -0
  2. i18n/languages/woocommerce-germanized-de_DE.po +166 -155
  3. i18n/languages/woocommerce-germanized-de_DE_formal.mo +0 -0
  4. i18n/languages/woocommerce-germanized-de_DE_formal.po +166 -155
  5. includes/abstracts/abstract-wc-gzd-compatibility-woocommerce-role-based-pricing.php +89 -79
  6. includes/abstracts/abstract-wc-gzd-product.php +318 -10
  7. includes/abstracts/abstract-wc-gzd-taxonomy.php +38 -7
  8. includes/admin/class-wc-gzd-admin-legal-checkboxes.php +34 -0
  9. includes/admin/class-wc-gzd-admin-notices.php +7 -0
  10. includes/admin/class-wc-gzd-admin-order.php +10 -0
  11. includes/admin/class-wc-gzd-admin-status.php +7 -0
  12. includes/admin/class-wc-gzd-admin.php +85 -6
  13. includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php +20 -5
  14. includes/admin/settings/class-wc-gzd-settings-germanized.php +149 -15
  15. includes/admin/views/html-admin-page-checkbox.php +27 -2
  16. includes/admin/views/html-admin-page-checkboxes.php +8 -1
  17. includes/admin/views/html-page-status-germanized.php +80 -7
  18. includes/admin/views/html-settings-section.php +39 -4
  19. includes/api/class-wc-gzd-rest-api.php +8 -1
  20. includes/api/class-wc-gzd-rest-products-controller.php +9 -1
  21. includes/api/v1/class-wc-gzd-rest-product-delivery-times-controller.php +0 -9
  22. includes/api/v1/class-wc-gzd-rest-product-price-labels-controller.php +0 -9
  23. includes/api/v1/class-wc-gzd-rest-product-units-controller.php +0 -9
  24. includes/class-wc-gzd-ajax.php +13 -6
  25. includes/class-wc-gzd-cache-helper.php +10 -0
  26. includes/class-wc-gzd-checkout.php +128 -12
  27. includes/class-wc-gzd-customer-helper.php +134 -15
  28. includes/class-wc-gzd-dhl-parcel-shops.php +33 -0
  29. includes/class-wc-gzd-ekomi.php +21 -0
  30. includes/class-wc-gzd-emails.php +241 -21
  31. includes/class-wc-gzd-hook-priorities.php +10 -1
  32. includes/class-wc-gzd-install.php +72 -19
  33. includes/class-wc-gzd-legal-checkbox-manager.php +101 -1
  34. includes/class-wc-gzd-legal-checkbox.php +65 -9
  35. includes/class-wc-gzd-payment-gateways.php +35 -4
  36. includes/class-wc-gzd-post-types.php +42 -0
  37. includes/class-wc-gzd-privacy.php +35 -0
  38. includes/class-wc-gzd-product-attribute-helper.php +1 -0
  39. includes/class-wc-gzd-product-attribute.php +9 -1
  40. includes/class-wc-gzd-product-factory.php +8 -0
  41. includes/class-wc-gzd-product-grouped.php +45 -3
  42. includes/class-wc-gzd-product-variable.php +118 -6
  43. includes/class-wc-gzd-revocation.php +15 -0
  44. includes/class-wc-gzd-shipping-rate.php +18 -0
  45. includes/class-wc-gzd-shortcodes.php +47 -1
  46. includes/class-wc-gzd-virtual-vat-helper.php +19 -1
  47. includes/compatibility/class-wc-gzd-compatibility-woo-poly-integration.php +25 -0
  48. includes/compatibility/class-wc-gzd-compatibility-woocommerce-subscriptions.php +7 -0
  49. includes/compatibility/class-wc-gzd-compatibility-wpml-string-translation.php +39 -7
  50. includes/compatibility/class-wc-gzd-compatibility-wpml.php +27 -0
  51. includes/compatibility/elementor/widgets/abstact-class-wc-gzd-elementor-widget.php +32 -1
  52. includes/emails/class-wc-gzd-email-customer-on-hold-order.php +9 -0
  53. includes/emails/class-wc-gzd-email-customer-paid-for-order.php +4 -0
  54. includes/emails/class-wc-gzd-email-customer-revocation.php +7 -0
  55. includes/export/class-wc-gzd-product-export.php +17 -2
  56. includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php +229 -40
  57. includes/gateways/invoice/class-wc-gzd-gateway-invoice.php +8 -0
  58. includes/import/class-wc-gzd-product-import.php +18 -1
  59. includes/trusted-shops/class-wc-gzd-trusted-shops-review-exporter.php +26 -2
  60. includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php +36 -0
  61. includes/trusted-shops/class-wc-gzd-trusted-shops-template-hooks.php +9 -0
  62. includes/trusted-shops/class-wc-gzd-trusted-shops.php +16 -0
  63. includes/trusted-shops/widgets/class-wc-gzd-trusted-shops-widget-review-sticker.php +1 -1
  64. includes/wc-gzd-cart-functions.php +48 -1
  65. includes/wc-gzd-core-functions.php +177 -7
  66. includes/wc-gzd-legacy-functions.php +46 -28
  67. includes/wc-gzd-product-functions.php +29 -0
  68. includes/wc-gzd-template-functions.php +87 -13
  69. includes/wc-gzd-template-hooks.php +25 -2
  70. readme.txt +14 -2
  71. templates/checkboxes/default.php +13 -1
  72. templates/checkout/order-submit.php +10 -1
  73. templates/checkout/review-order-product-table.php +10 -1
  74. templates/checkout/terms-sepa.php +12 -1
  75. templates/checkout/terms.php +22 -12
  76. templates/emails/email-footer-attachment.php +11 -5
  77. templates/forms/revocation-form.php +10 -1
  78. templates/trusted-shops/thankyou.php +38 -7
  79. woocommerce-germanized.php +171 -21
i18n/languages/woocommerce-germanized-de_DE.mo CHANGED
Binary file
i18n/languages/woocommerce-germanized-de_DE.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce Germanized\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-05-13 13:52+0200\n"
6
- "PO-Revision-Date: 2019-05-13 13:52+0200\n"
7
  "Last-Translator: holzhannes <holzhannes@posteo.de>\n"
8
  "Language-Team: \n"
9
  "Language: de_DE\n"
@@ -11,7 +11,7 @@ msgstr ""
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
- "X-Generator: Poedit 2.2.1\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
@@ -93,30 +93,30 @@ msgid "l"
93
  msgstr "l"
94
 
95
  # @ woocommerce-germanized
96
- #: includes/abstracts/abstract-wc-gzd-product.php:369
97
- #: includes/abstracts/abstract-wc-gzd-product.php:378
98
- #: includes/wc-gzd-core-functions.php:268
99
- #: includes/wc-gzd-template-functions.php:444 woocommerce-germanized.php:941
100
  msgid "incl. VAT"
101
  msgstr "inkl. MwSt."
102
 
103
  # @ woocommerce-germanized
104
- #: includes/abstracts/abstract-wc-gzd-product.php:369
105
  msgid "excl. VAT"
106
  msgstr "exkl. MwSt."
107
 
108
  # @ woocommerce-germanized
109
- #: includes/abstracts/abstract-wc-gzd-product.php:371
110
- #: includes/wc-gzd-core-functions.php:268 woocommerce-germanized.php:941
111
  #, php-format
112
  msgid "incl. %s%% VAT"
113
- msgstr "inkl. %s%% MwSt."
114
 
115
  # @ woocommerce-germanized
116
- #: includes/abstracts/abstract-wc-gzd-product.php:371
117
  #, php-format
118
  msgid "excl. %s%% VAT"
119
- msgstr "exkl. %s%% MwSt."
120
 
121
  # @ woocommerce-germanized
122
  #: includes/admin/class-wc-gzd-admin-customer.php:47
@@ -252,7 +252,7 @@ msgstr "Virtuelles Produkt"
252
 
253
  #: includes/admin/class-wc-gzd-admin-legal-checkboxes.php:101
254
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
255
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:119
256
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:774
257
  #: includes/class-wc-gzd-legal-checkbox-manager.php:122
258
  msgid "Service"
@@ -366,7 +366,7 @@ msgstr ""
366
  #: includes/admin/class-wc-gzd-admin-status.php:38
367
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
368
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:233
369
- #: includes/wc-gzd-core-functions.php:165
370
  msgid "Terms & Conditions"
371
  msgstr "AGB"
372
 
@@ -380,7 +380,7 @@ msgstr "Widerrufsbelehrung"
380
  #: includes/admin/class-wc-gzd-admin-status.php:40
381
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
382
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:255
383
- #: includes/wc-gzd-core-functions.php:167
384
  msgid "Imprint"
385
  msgstr "Impressum"
386
 
@@ -392,7 +392,7 @@ msgstr "Datenschutzbelehrung"
392
  # @ woocommerce-germanized
393
  #: includes/admin/class-wc-gzd-admin-status.php:42
394
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:277
395
- #: includes/wc-gzd-core-functions.php:172
396
  msgid "Payment Methods"
397
  msgstr "Zahlungarten"
398
 
@@ -412,64 +412,73 @@ msgstr "Willkommen bei Germanized"
412
  msgid "Go to Germanized Settings"
413
  msgstr "Germanized Einstellungen"
414
 
415
- #: includes/admin/class-wc-gzd-admin.php:111
416
- #: includes/class-wc-gzd-dhl-parcel-shops.php:180
417
  msgid "Yes"
418
  msgstr "Ja"
419
 
420
- #: includes/admin/class-wc-gzd-admin.php:111
421
- #: includes/class-wc-gzd-dhl-parcel-shops.php:180
422
  msgid "No"
423
  msgstr "Nein"
424
 
425
- #: includes/admin/class-wc-gzd-admin.php:164
 
 
 
 
426
  msgid "Order confirmation manually sent to customer."
427
  msgstr "Bestellbestätigung manuell an den Kunden versendet."
428
 
429
  # @ woocommerce-germanized
430
- #: includes/admin/class-wc-gzd-admin.php:170
431
  msgid "Resend order confirmation"
432
  msgstr "Bestellbestätigung erneut versenden"
433
 
434
  # @ woocommerce-germanized
435
- #: includes/admin/class-wc-gzd-admin.php:179
 
 
 
 
 
436
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:25
437
  #: includes/admin/views/html-page-status-germanized.php:22
438
  msgid "Germanized"
439
  msgstr "Germanized"
440
 
441
- #: includes/admin/class-wc-gzd-admin.php:189
442
  msgid "Parcel Delivery Data Transfer:"
443
  msgstr "Paketdienstleister Datenweitergabe:"
444
 
445
- #: includes/admin/class-wc-gzd-admin.php:190
446
  msgid "allowed"
447
  msgstr "akzeptiert"
448
 
449
- #: includes/admin/class-wc-gzd-admin.php:190
450
  msgid "not allowed"
451
  msgstr "nicht akzeptiert"
452
 
453
  # @ woocommerce-germanized
454
- #: includes/admin/class-wc-gzd-admin.php:279
455
  msgid "Optional Email Content"
456
  msgstr "Optionaler E-Mail Inhalt"
457
 
458
  # @ woocommerce-germanized
459
- #: includes/admin/class-wc-gzd-admin.php:288
460
  msgid "Add content which will be replacing default page content within emails."
461
  msgstr ""
462
  "Fülle dieses Feld aus um einen abweichenden E-Mail Anhangstext für diese "
463
  "Seite zu bestimmen."
464
 
465
  # @ woocommerce-germanized
466
- #: includes/admin/class-wc-gzd-admin.php:299
467
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:153
468
  msgid "Optional Mini Description"
469
  msgstr "Warenkorb Kurzbeschreibung"
470
 
471
  # @ woocommerce-germanized
472
- #: includes/admin/class-wc-gzd-admin.php:318
473
  msgid ""
474
  "This content will be shown as short product description within checkout and "
475
  "emails."
@@ -478,12 +487,12 @@ msgstr ""
478
  "Produkt Kurzbeschreibung angezeigt."
479
 
480
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
481
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:120
482
  msgid "Service products do not sell physical products."
483
  msgstr "Dienstleistungen werden nicht in physikalischer Form verkauft."
484
 
485
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:85
486
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
487
  msgid "Sale Label"
488
  msgstr "Streichpreis Hinweis"
489
 
@@ -494,13 +503,13 @@ msgid "Same as Parent"
494
  msgstr "Gleiche wie übergeordnet"
495
 
496
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:95
497
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
498
  msgid "Sale Regular Label"
499
  msgstr "Angebotspreis Hinweis"
500
 
501
  # @ woocommerce-germanized
502
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:113
503
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:148
504
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:704
505
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:867
506
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:916
@@ -523,7 +532,7 @@ msgstr ""
523
 
524
  # @ woocommerce-germanized
525
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:117
526
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:168
527
  msgid "Calculation"
528
  msgstr "Berechnung"
529
 
@@ -557,7 +566,7 @@ msgstr "Allgemein"
557
 
558
  # @ woocommerce-germanized
559
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:138
560
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:219
561
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1091
562
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1124
563
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1157
@@ -572,21 +581,21 @@ msgstr "Lieferzeit"
572
  msgid "Same as parent"
573
  msgstr "Gleiche wie übergeordnet"
574
 
575
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:127
576
  msgid "Diff. Taxation"
577
  msgstr "Differenzbesteuerung"
578
 
579
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:128
580
  msgid "Product applies to differential taxation based on §25a UStG."
581
  msgstr "Produkt ist differenzbesteuert nach §25a UStG."
582
 
583
  # @ woocommerce-germanized
584
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
585
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
586
  msgid "Select Price Label"
587
  msgstr "Preishinweis auswählen"
588
 
589
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
590
  msgid ""
591
  "If the product is on sale you may want to show a price label right before "
592
  "outputting the old price to inform the customer."
@@ -596,7 +605,7 @@ msgstr ""
596
  "Preis). Mit diesem Hinweis kannst du genau festlegen, um welchen Preis es "
597
  "sich dabei handelte (z.B. UVP)."
598
 
599
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
600
  msgid ""
601
  "If the product is on sale you may want to show a price label right before "
602
  "outputting the new price to inform the customer."
@@ -606,35 +615,35 @@ msgstr ""
606
  "Preis)."
607
 
608
  # @ woocommerce-germanized
609
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
610
  #: includes/api/class-wc-gzd-rest-products-controller.php:113
611
  #: includes/class-wc-gzd-post-types.php:66
612
  msgid "Unit"
613
  msgstr "Einheit"
614
 
615
  # @ woocommerce-germanized
616
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
617
  msgid "Select unit"
618
  msgstr "Einheit auswählen"
619
 
620
  # @ woocommerce-germanized
621
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
622
  msgid "Needed if selling on a per unit basis"
623
  msgstr "Notwendig falls auf pro-Einheit-Basis verkauft werden soll"
624
 
625
  # @ woocommerce-germanized
626
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:148
627
  msgid "Number of units included per default product price. Example: 1000 ml."
628
  msgstr ""
629
  "Anzahl der Produkteinheiten auf Basis des Produktpreises. Beispiel: 1000 ml."
630
 
631
  # @ woocommerce-germanized
632
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
633
  msgid "Base Price Units"
634
  msgstr "Grundpreiseinheiten"
635
 
636
  # @ woocommerce-germanized
637
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
638
  msgid ""
639
  "Base price units. Example base price: 0,99 € / 100 ml. Insert 100 as base "
640
  "price unit amount."
@@ -643,33 +652,33 @@ msgstr ""
643
  "hier 100 als Grundpreiseinheiten ein."
644
 
645
  # @ woocommerce-germanized
646
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:168
647
  msgid "Calculate base prices automatically."
648
  msgstr "Grundpreis automatisch berechnen."
649
 
650
  # @ woocommerce-germanized
651
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:170
652
  msgid "Regular Base Price"
653
  msgstr "Regulärer Grundpreis"
654
 
655
  # @ woocommerce-germanized
656
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:171
657
  msgid "Sale Base Price"
658
  msgstr "Angebotsgrundpreis"
659
 
660
  # @ woocommerce-germanized
661
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:181
662
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:223
663
  msgid "Search for a delivery time&hellip;"
664
  msgstr "Lieferzeit suchen&hellip;"
665
 
666
  # @ woocommerce-germanized
667
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:232
668
  msgid "Free shipping?"
669
  msgstr "Versand kostenlos?"
670
 
671
  # @ woocommerce-germanized
672
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:232
673
  msgid "This option disables the \"plus shipping costs\" notice on product page"
674
  msgstr ""
675
  "Deaktiviert den Hinweis \"zzgl. Versandkosten\". Ohne Auswirkungen auf die "
@@ -727,7 +736,7 @@ msgstr "Anzeige"
727
  # @ woocommerce-germanized
728
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:121
729
  msgid "Legal Checkboxes"
730
- msgstr "Rechtliche Checkboxen"
731
 
732
  # @ woocommerce-germanized
733
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:122
@@ -1089,7 +1098,7 @@ msgid ""
1089
  msgstr "Passe hier, falls notwending, den Kleinunternehmer Hinweistext an."
1090
 
1091
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:392
1092
- #: includes/wc-gzd-core-functions.php:214
1093
  msgid ""
1094
  "Value added tax is not collected, as small businesses according to §19 (1) "
1095
  "UStG."
@@ -1224,7 +1233,7 @@ msgstr ""
1224
 
1225
  # @ woocommerce-germanized
1226
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:484
1227
- #: includes/wc-gzd-core-functions.php:173
1228
  msgid "Shipping Costs"
1229
  msgstr "Versandkosten"
1230
 
@@ -1420,7 +1429,7 @@ msgstr "Tagen"
1420
 
1421
  # @ woocommerce-germanized
1422
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:580
1423
- #: includes/wc-gzd-core-functions.php:166
1424
  msgid "Right of Recission"
1425
  msgstr "Widerrufsrecht"
1426
 
@@ -1838,7 +1847,7 @@ msgstr ""
1838
  "Platzhalter für den höchsten Preis."
1839
 
1840
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1038
1841
- #: includes/wc-gzd-core-functions.php:525
1842
  msgid "{min_price} &ndash; {max_price}"
1843
  msgstr "{min_price} &ndash; {max_price}"
1844
 
@@ -1910,7 +1919,7 @@ msgstr "Warenkorb"
1910
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1165
1911
  #: includes/admin/views/html-admin-page-checkboxes.php:17
1912
  #: includes/class-wc-gzd-legal-checkbox.php:735
1913
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:663
1914
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:106
1915
  msgid "Description"
1916
  msgstr "Beschreibung"
@@ -1971,7 +1980,7 @@ msgstr ""
1971
  "der Option \"Auswahl von Versandarten im Checkout deaktivieren\"."
1972
 
1973
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1200
1974
- #: includes/class-wc-gzd-dhl-parcel-shops.php:356
1975
  msgid "Parcel Shop Finder"
1976
  msgstr "Paketshop finden"
1977
 
@@ -2905,15 +2914,15 @@ msgid "Upgrade now"
2905
  msgstr "jetzt upgraden"
2906
 
2907
  #: includes/api/class-wc-gzd-rest-customers-controller.php:151
2908
- #: includes/class-wc-gzd-dhl-parcel-shops.php:149
2909
  msgid "Send to DHL Parcel Shop?"
2910
  msgstr "An DHL Paketshop oder Packstation senden?"
2911
 
2912
  #: includes/api/class-wc-gzd-rest-customers-controller.php:157
2913
  #: includes/api/class-wc-gzd-rest-orders-controller.php:181
2914
- #: includes/class-wc-gzd-dhl-parcel-shops.php:161
2915
- #: includes/class-wc-gzd-dhl-parcel-shops.php:187
2916
- #: includes/class-wc-gzd-dhl-parcel-shops.php:200
2917
  #: includes/class-wc-gzd-privacy.php:58 includes/class-wc-gzd-privacy.php:82
2918
  #: includes/class-wc-gzd-privacy.php:120
2919
  msgid "Postnumber"
@@ -2923,7 +2932,7 @@ msgstr "PostNummer"
2923
  #: includes/api/class-wc-gzd-rest-customers-controller.php:163
2924
  #: includes/api/class-wc-gzd-rest-orders-controller.php:194
2925
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:30
2926
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:659
2927
  #: includes/gateways/direct-debit/views/html-export.php:27
2928
  msgid "Direct Debit"
2929
  msgstr "Lastschrift"
@@ -2935,8 +2944,8 @@ msgstr "Lastschrift"
2935
  #: includes/class-wc-gzd-privacy.php:123
2936
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:108
2937
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:450
2938
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:685
2939
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:826
2940
  msgid "Account Holder"
2941
  msgstr "Kontoinhaber"
2942
 
@@ -2947,9 +2956,9 @@ msgstr "Kontoinhaber"
2947
  #: includes/class-wc-gzd-privacy.php:124
2948
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:115
2949
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:451
2950
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:693
2951
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:830
2952
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:923
2953
  msgid "IBAN"
2954
  msgstr "IBAN"
2955
 
@@ -2960,16 +2969,16 @@ msgstr "IBAN"
2960
  #: includes/class-wc-gzd-privacy.php:125
2961
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:122
2962
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:452
2963
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:834
2964
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:924
2965
  msgid "BIC/SWIFT"
2966
  msgstr "BIC/SWIFT"
2967
 
2968
  #: includes/api/class-wc-gzd-rest-orders-controller.php:175
2969
- #: includes/class-wc-gzd-dhl-parcel-shops.php:237
2970
- #: includes/class-wc-gzd-dhl-parcel-shops.php:279
2971
- #: includes/class-wc-gzd-dhl-parcel-shops.php:334
2972
- #: includes/class-wc-gzd-dhl-parcel-shops.php:335
2973
  msgid "Parcel Shop"
2974
  msgstr "Shop/Packstation"
2975
 
@@ -3192,7 +3201,7 @@ msgstr ""
3192
  #: includes/class-wc-gzd-customer-helper.php:108
3193
  #: includes/class-wc-gzd-customer-helper.php:116
3194
  #: includes/class-wc-gzd-revocation.php:41
3195
- #: includes/wc-gzd-core-functions.php:309
3196
  msgid "Mr."
3197
  msgstr "Herr"
3198
 
@@ -3203,8 +3212,8 @@ msgstr "Herr"
3203
  #: includes/class-wc-gzd-customer-helper.php:108
3204
  #: includes/class-wc-gzd-customer-helper.php:116
3205
  #: includes/class-wc-gzd-revocation.php:42
3206
- #: includes/wc-gzd-core-functions.php:309
3207
- #: includes/wc-gzd-core-functions.php:318
3208
  msgid "Ms."
3209
  msgstr "Frau"
3210
 
@@ -3226,7 +3235,7 @@ msgstr ""
3226
 
3227
  #: includes/class-wc-gzd-customer-helper.php:94
3228
  #: includes/class-wc-gzd-customer-helper.php:188
3229
- #: includes/class-wc-gzd-customer-helper.php:269
3230
  msgid ""
3231
  "Please activate your account through clicking on the activation link "
3232
  "received via email."
@@ -3243,7 +3252,7 @@ msgid "Please create an account or login before continuing to checkout"
3243
  msgstr ""
3244
  "Bitte erstelle ein Kundenkonto oder logge dich ein, bevor du zur Kasse gehst"
3245
 
3246
- #: includes/class-wc-gzd-customer-helper.php:292
3247
  msgid ""
3248
  "This activation code has expired. We have sent you a new activation code via "
3249
  "e-mail."
@@ -3252,34 +3261,34 @@ msgstr ""
3252
  "Code per E-Mail geschickt."
3253
 
3254
  # @ woocommerce-germanized
3255
- #: includes/class-wc-gzd-customer-helper.php:294
3256
  msgid "Sorry, but this activation code cannot be found."
3257
  msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
3258
 
3259
  # @ woocommerce-germanized
3260
- #: includes/class-wc-gzd-customer-helper.php:298
3261
  msgid "Thank you. You have successfully activated your account."
3262
  msgstr "Vielen Dank. Dein Benutzerkonto wurde erfolgreich aktiviert."
3263
 
3264
- #: includes/class-wc-gzd-customer-helper.php:408
3265
  msgid "Expired activation key"
3266
  msgstr "Abgelaufener Aktivierungscode"
3267
 
3268
- #: includes/class-wc-gzd-customer-helper.php:413
3269
  msgid "Invalid activation key"
3270
  msgstr "Aktivierungscode ungültig"
3271
 
3272
- #: includes/class-wc-gzd-dhl-parcel-shops.php:178
3273
  msgid "DHL Parcel Shop?"
3274
  msgstr "DHL Paketshop/Packstation?"
3275
 
3276
- #: includes/class-wc-gzd-dhl-parcel-shops.php:181
3277
  msgid "Select whether delivery to parcel shop should be enabled."
3278
  msgstr ""
3279
  "Wähle aus ob die Lieferung an DHL Paketshops bzw. Packstationen aktiviert "
3280
  "werden soll."
3281
 
3282
- #: includes/class-wc-gzd-dhl-parcel-shops.php:189
3283
  msgid ""
3284
  "In case delivery to parcel shop is enabled please fill in the corresponding "
3285
  "DHL post number."
@@ -3287,12 +3296,12 @@ msgstr ""
3287
  "Wenn die Lieferung an eine DHL Packstation aktiviert wurde, trage bitte die "
3288
  "PostNummer ein."
3289
 
3290
- #: includes/class-wc-gzd-dhl-parcel-shops.php:300
3291
  msgid "Your PostNumber should contain numbers only"
3292
  msgstr "Deine PostNummer sollte nur aus Zahlen bestehen."
3293
 
3294
- #: includes/class-wc-gzd-dhl-parcel-shops.php:306
3295
- #: includes/class-wc-gzd-dhl-parcel-shops.php:341
3296
  #, php-format
3297
  msgid "Parcel Shop Delivery is only supported in: %s."
3298
  msgstr ""
@@ -3441,7 +3450,7 @@ msgid "Thanks for creating an account on %s."
3441
  msgstr "Danke, dass du ein Konto bei %s erstellt hast."
3442
 
3443
  # @ woocommerce-germanized
3444
- #: includes/class-wc-gzd-emails.php:706
3445
  msgctxt "revocation-form"
3446
  msgid "Forward your Revocation online"
3447
  msgstr "Deinen Widerruf online erklären"
@@ -3680,7 +3689,7 @@ msgstr ""
3680
 
3681
  # @ woocommerce-germanized
3682
  #: includes/class-wc-gzd-legal-checkbox-manager.php:173
3683
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:750
3684
  msgid "I hereby agree to the {link}direct debit mandate{/link}."
3685
  msgstr "Hiermit erteile ich das {link}SEPA Lastschriftmandat{/link}."
3686
 
@@ -3822,7 +3831,7 @@ msgstr "%s Zahlungsgebühr"
3822
  # @ woocommerce-germanized
3823
  #: includes/class-wc-gzd-payment-gateways.php:98
3824
  #: includes/wc-gzd-order-functions.php:20
3825
- #: includes/wc-gzd-template-functions.php:378
3826
  #, php-format
3827
  msgid "Plus %s forwarding fee (charged by the transport agent)"
3828
  msgstr "zzgl. %s Übermittlungsentgelt (direkt an den Zusteller)"
@@ -4044,6 +4053,8 @@ msgstr ""
4044
  msgid "Visible during checkout"
4045
  msgstr "Im Checkout anzeigen"
4046
 
 
 
4047
  #: includes/class-wc-gzd-product-variable.php:132
4048
  #: includes/class-wc-gzd-product-variable.php:137
4049
  #, php-format
@@ -4551,105 +4562,105 @@ msgstr ""
4551
  "%s ein."
4552
 
4553
  # @ woocommerce-germanized
4554
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:569
4555
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:592
4556
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:616
4557
  msgid "a single payment"
4558
  msgstr "eine einmalige Zahlung"
4559
 
4560
  # @ woocommerce-germanized
4561
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:650
4562
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:93
4563
  msgid "Enable/Disable"
4564
  msgstr "Aktivieren/Deaktivieren"
4565
 
4566
  # @ woocommerce-germanized
4567
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:652
4568
  msgid "Enable Direct Debit Payment"
4569
  msgstr "Bezahlung per Lastschrift aktivieren"
4570
 
4571
  # @ woocommerce-germanized
4572
  # @ woocommerce
4573
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:656
4574
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:99
4575
  msgctxt "gateway"
4576
  msgid "Title"
4577
  msgstr "Bezeichnung"
4578
 
4579
  # @ woocommerce-germanized
4580
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:658
4581
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:101
4582
  msgid "This controls the title which the user sees during checkout."
4583
  msgstr ""
4584
  "Beschreibungstext, den Benutzer bei der Auswahl dieser Zahlungsart sehen."
4585
 
4586
  # @ woocommerce-germanized
4587
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:665
4588
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:108
4589
  msgid "Payment method description that the customer will see on your checkout."
4590
  msgstr "Beschreibung der Zahlungsart, die Kunden auf deiner Website sehen."
4591
 
4592
  # @ woocommerce-germanized
4593
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:666
4594
  msgid "The order amount will be debited directly from your bank account."
4595
  msgstr ""
4596
  "Der Gesamtbestellbetrag wird per SEPA-Lastschrift direkt von deinem Konto "
4597
  "abgebucht."
4598
 
4599
  # @ woocommerce-germanized
4600
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:670
4601
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:113
4602
  msgid "Instructions"
4603
  msgstr "Anweisungen"
4604
 
4605
  # @ woocommerce-germanized
4606
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:672
4607
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:115
4608
  msgid "Instructions that will be added to the thank you page and emails."
4609
  msgstr "Anweisung, die zur „Danke“-Seite und zu E-Mails hinzugefügt werden."
4610
 
4611
  # @ woocommerce-germanized
4612
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:677
4613
  msgid "Debtee"
4614
  msgstr "Gläubiger Informationen"
4615
 
4616
  # @ woocommerce-germanized
4617
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:679
4618
  msgid "Insert your company information."
4619
  msgstr "Füge hier die Informationen zu deinem Unternehmen ein."
4620
 
4621
  # @ woocommerce-germanized
4622
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:681
4623
  msgid "Company Inc, John Doe Street, New York"
4624
  msgstr "Musterfirma GmbH, Musterstraße 12, 12203 Musterstadt"
4625
 
4626
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:687
4627
  msgid "Insert the bank account holder name."
4628
  msgstr "Füge hier den Namen des Kontoinhabers ein."
4629
 
4630
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:689
4631
  msgid "Company Inc"
4632
  msgstr "Muster GmbH"
4633
 
4634
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:695
4635
  msgid "Insert the bank account IBAN."
4636
  msgstr "Füge hier den IBAN deines Kontos ein."
4637
 
4638
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:700
4639
  msgid "BIC"
4640
  msgstr "BIC"
4641
 
4642
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:702
4643
  msgid "Insert the bank account BIC."
4644
  msgstr "Füge hier den BIC deines Kontos ein."
4645
 
4646
  # @ woocommerce-germanized
4647
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:707
4648
  msgid "Debtee identification number"
4649
  msgstr "Identifikationsnummer"
4650
 
4651
  # @ woocommerce-germanized
4652
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:709
4653
  #, php-format
4654
  msgid ""
4655
  "Insert your debtee indentification number. More information can be found <a "
@@ -4659,16 +4670,16 @@ msgstr ""
4659
  "Weitere Informationen zu dieser Nummer erhältst du <a href=\"%s\">hier</a>."
4660
 
4661
  # @ woocommerce-germanized
4662
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:713
4663
  msgid "Generate Mandate ID"
4664
  msgstr "Mandat-Referenz generieren"
4665
 
4666
  # @ woocommerce-germanized
4667
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:715
4668
  msgid "Automatically generate Mandate ID."
4669
  msgstr "Mandat-Referenznummer automatisch generieren."
4670
 
4671
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:716
4672
  msgid ""
4673
  "Automatically generate Mandate ID after order completion (based on Order ID)."
4674
  msgstr ""
@@ -4676,11 +4687,11 @@ msgstr ""
4676
  "basierend auf der Bestellnummer."
4677
 
4678
  # @ woocommerce-germanized
4679
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:720
4680
  msgid "XML Pain Format"
4681
  msgstr "XML Pain Format"
4682
 
4683
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:722
4684
  msgid ""
4685
  "You may adjust the XML Export Pain Schema to your banks needs. Some banks "
4686
  "may require pain.001.003.03."
@@ -4689,11 +4700,11 @@ msgstr ""
4689
  "Banken benötigen z.B. pain.001.003.03."
4690
 
4691
  # @ woocommerce-germanized
4692
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:726
4693
  msgid "Mandate ID Format"
4694
  msgstr "Mandat-Referenz Format"
4695
 
4696
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:728
4697
  msgid ""
4698
  "You may extend the Mandate ID format by adding a prefix and/or suffix. Use "
4699
  "{id} as placeholder to insert the automatically generated ID."
@@ -4702,12 +4713,12 @@ msgstr ""
4702
  "{id} als Platzhalter um die automatisch generierte Referenznummer einzufügen."
4703
 
4704
  # @ woocommerce-germanized
4705
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:732
4706
  msgid "Mandate Text"
4707
  msgstr "Lastschriftmandat"
4708
 
4709
  # @ woocommerce-germanized
4710
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:734
4711
  msgid ""
4712
  "This text will be populated with live order/checkout data. Will be used as "
4713
  "preview direct debit mandate and as email template text."
@@ -4718,28 +4729,28 @@ msgstr ""
4718
  "Verfügung gestellt."
4719
 
4720
  # @ woocommerce-germanized
4721
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:740
4722
  msgid "Checkbox"
4723
  msgstr "Checkbox"
4724
 
4725
  # @ woocommerce-germanized
4726
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:741
4727
  msgid "Enable \"agree to SEPA mandate\" checkbox"
4728
  msgstr "Aktiviere die Checkbox zur Bestätigung des Lastschriftmandates."
4729
 
4730
  # @ woocommerce-germanized
4731
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:743
4732
  msgid "Enable a checkbox linking to a SEPA direct debit mandate preview."
4733
  msgstr ""
4734
  "Aktiviere eine Checkbox, die zu einer Vorschau des Lastschrift-Mandats führt."
4735
 
4736
  # @ woocommerce-germanized
4737
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:747
4738
  msgid "Checkbox label"
4739
  msgstr "Checkbox Text"
4740
 
4741
  # @ woocommerce-germanized
4742
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:749
4743
  msgid ""
4744
  "Customize the checkbox label. Use {link}link name{/link} to insert the "
4745
  "preview link."
@@ -4747,17 +4758,17 @@ msgstr ""
4747
  "Passe den Checkbox Text an. Verwende {link}SEPA Lastschriftmandat{/link} um "
4748
  "auf die Vorschau zu verlinken."
4749
 
4750
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:754
4751
  msgid "Enable pre-notification"
4752
  msgstr "Vorankündigung aktivieren"
4753
 
4754
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:755
4755
  msgid "Insert pre-notification text within the order confirmation email."
4756
  msgstr ""
4757
  "Fügt einen Standard-Text zur Vorankündigung des SEPA-Einzugs in die "
4758
  "Bestellbestätigung ein."
4759
 
4760
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:757
4761
  msgid ""
4762
  "This option inserts a standard text containing a pre-notification for the "
4763
  "customer."
@@ -4766,11 +4777,11 @@ msgstr ""
4766
  "die Bestellbestätigung ein. In der Ankündigung wird u.a. ein konkreter "
4767
  "Fälligkeitstermin genannt."
4768
 
4769
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:761
4770
  msgid "Debit days"
4771
  msgstr "Fälligkeitstage"
4772
 
4773
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:763
4774
  msgid ""
4775
  "This option is used to calculate the debit date and is added to the order "
4776
  "date."
@@ -4780,15 +4791,15 @@ msgstr ""
4780
  "hier eingestellten Anzahl Tage."
4781
 
4782
  # @ woocommerce-germanized
4783
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:767
4784
  msgid "Mask IBAN"
4785
  msgstr "IBAN maskieren"
4786
 
4787
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:768
4788
  msgid "Mask the IBAN within emails."
4789
  msgstr "IBAN in E-Mails maskieren."
4790
 
4791
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:770
4792
  msgid ""
4793
  "This will lead to masked IBANs within emails (replaced by *). All but last 4 "
4794
  "digits will be masked."
@@ -4796,15 +4807,15 @@ msgstr ""
4796
  "Der IBAN wird in E-Mails (abgesehen von den letzten 4 Stellen) mit * "
4797
  "maskiert."
4798
 
4799
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:779
4800
  msgid "Remember"
4801
  msgstr "Bankdaten merken\t"
4802
 
4803
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:780
4804
  msgid "Remember account data for returning customers."
4805
  msgstr "Bankverbindung für registrierte Kunden speichern."
4806
 
4807
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:782
4808
  msgid "Save account data as user meta if user has/creates a customer account."
4809
  msgstr ""
4810
  "Speichert die Bankverbindung für registrierte Kunden in der user_meta "
@@ -4812,32 +4823,32 @@ msgstr ""
4812
  "eigenständig aus."
4813
 
4814
  # @ woocommerce-germanized
4815
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:865
4816
  msgid "Please insert your SEPA account data."
4817
  msgstr "Bitte füge deine SEPA Kontoinformationen ein."
4818
 
4819
  # @ woocommerce-germanized
4820
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:874
4821
  msgid "Your IBAN seems to be invalid."
4822
  msgstr "Dein IBAN scheint nicht gültig zu sein."
4823
 
4824
  # @ woocommerce-germanized
4825
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:876
4826
  msgid "Your IBAN's country code doesn’t match with your billing country."
4827
  msgstr "Der Ländercode des IBANs stimmt nicht mit dem Rechnungsland überein."
4828
 
4829
  # @ woocommerce-germanized
4830
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:881
4831
  msgid "Your BIC seems to be invalid."
4832
  msgstr "Dein BIC/SWIFT scheint nicht gültig zu sein."
4833
 
4834
  # @ woocommerce-germanized
4835
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:925
4836
  msgid "is invalid"
4837
  msgstr "ist ungültig"
4838
 
4839
  # @ woocommerce-germanized
4840
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:962
4841
  msgid "Awaiting Direct Debit Payment"
4842
  msgstr "Zahlung per Lastschrift ausstehend"
4843
 
@@ -4901,7 +4912,7 @@ msgstr ""
4901
  # @ woocommerce-germanized
4902
  # @ woocommerce
4903
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:64
4904
- #: woocommerce-germanized.php:661
4905
  msgid "Settings"
4906
  msgstr "Einstellungen"
4907
 
@@ -6009,23 +6020,23 @@ msgid "Title"
6009
  msgstr "Titel"
6010
 
6011
  # @ woocommerce-germanized
6012
- #: includes/wc-gzd-core-functions.php:168
6013
  msgid "Data Security"
6014
  msgstr "Datenschutzbelehrung"
6015
 
6016
  # @ woocommerce-germanized
6017
- #: includes/wc-gzd-template-functions.php:141
6018
  #: templates/checkout/edit-data-notice.php:16
6019
  msgid "Edit Order"
6020
  msgstr "Bestellung bearbeiten"
6021
 
6022
  # @ woocommerce-germanized
6023
- #: includes/wc-gzd-template-functions.php:152
6024
  msgid "Choose a Payment Gateway"
6025
  msgstr "Zahlungsart auswählen"
6026
 
6027
  # @ woocommerce
6028
- #: includes/wc-gzd-template-functions.php:300
6029
  msgid "Place order"
6030
  msgstr "Jetzt kaufen"
6031
 
@@ -6254,7 +6265,7 @@ msgctxt "trusted-shops"
6254
  msgid "cancel review reminder"
6255
  msgstr "von der Bewertungserinnerung abmelden"
6256
 
6257
- #: woocommerce-germanized.php:768
6258
  msgid "Pease wait while we are trying to redirect you to the payment provider."
6259
  msgstr "Einen Moment - wir versuchen dich zum Zahlungsanbieter weiterzuleiten."
6260
 
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce Germanized\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-07-12 15:15+0200\n"
6
+ "PO-Revision-Date: 2019-07-22 15:31+0200\n"
7
  "Last-Translator: holzhannes <holzhannes@posteo.de>\n"
8
  "Language-Team: \n"
9
  "Language: de_DE\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Generator: Poedit 2.2.3\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
93
  msgstr "l"
94
 
95
  # @ woocommerce-germanized
96
+ #: includes/abstracts/abstract-wc-gzd-product.php:353
97
+ #: includes/abstracts/abstract-wc-gzd-product.php:363
98
+ #: includes/wc-gzd-core-functions.php:282
99
+ #: includes/wc-gzd-template-functions.php:520 woocommerce-germanized.php:942
100
  msgid "incl. VAT"
101
  msgstr "inkl. MwSt."
102
 
103
  # @ woocommerce-germanized
104
+ #: includes/abstracts/abstract-wc-gzd-product.php:353
105
  msgid "excl. VAT"
106
  msgstr "exkl. MwSt."
107
 
108
  # @ woocommerce-germanized
109
+ #: includes/abstracts/abstract-wc-gzd-product.php:355
110
+ #: includes/wc-gzd-core-functions.php:282 woocommerce-germanized.php:942
111
  #, php-format
112
  msgid "incl. %s%% VAT"
113
+ msgstr "inkl. %s %% MwSt."
114
 
115
  # @ woocommerce-germanized
116
+ #: includes/abstracts/abstract-wc-gzd-product.php:355
117
  #, php-format
118
  msgid "excl. %s%% VAT"
119
+ msgstr "exkl. %s %% MwSt."
120
 
121
  # @ woocommerce-germanized
122
  #: includes/admin/class-wc-gzd-admin-customer.php:47
252
 
253
  #: includes/admin/class-wc-gzd-admin-legal-checkboxes.php:101
254
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
255
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:124
256
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:774
257
  #: includes/class-wc-gzd-legal-checkbox-manager.php:122
258
  msgid "Service"
366
  #: includes/admin/class-wc-gzd-admin-status.php:38
367
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
368
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:233
369
+ #: includes/wc-gzd-core-functions.php:179
370
  msgid "Terms & Conditions"
371
  msgstr "AGB"
372
 
380
  #: includes/admin/class-wc-gzd-admin-status.php:40
381
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
382
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:255
383
+ #: includes/wc-gzd-core-functions.php:181
384
  msgid "Imprint"
385
  msgstr "Impressum"
386
 
392
  # @ woocommerce-germanized
393
  #: includes/admin/class-wc-gzd-admin-status.php:42
394
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:277
395
+ #: includes/wc-gzd-core-functions.php:186
396
  msgid "Payment Methods"
397
  msgstr "Zahlungarten"
398
 
412
  msgid "Go to Germanized Settings"
413
  msgstr "Germanized Einstellungen"
414
 
415
+ #: includes/admin/class-wc-gzd-admin.php:112
416
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:203
417
  msgid "Yes"
418
  msgstr "Ja"
419
 
420
+ #: includes/admin/class-wc-gzd-admin.php:112
421
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:203
422
  msgid "No"
423
  msgstr "Nein"
424
 
425
+ #: includes/admin/class-wc-gzd-admin.php:160
426
+ msgid "Paid for order notification manually sent to customer."
427
+ msgstr "Bestellung bezahlt manuell an den Kunden versendet."
428
+
429
+ #: includes/admin/class-wc-gzd-admin.php:175
430
  msgid "Order confirmation manually sent to customer."
431
  msgstr "Bestellbestätigung manuell an den Kunden versendet."
432
 
433
  # @ woocommerce-germanized
434
+ #: includes/admin/class-wc-gzd-admin.php:181
435
  msgid "Resend order confirmation"
436
  msgstr "Bestellbestätigung erneut versenden"
437
 
438
  # @ woocommerce-germanized
439
+ #: includes/admin/class-wc-gzd-admin.php:182
440
+ msgid "Send paid for order notification"
441
+ msgstr "Bestellung bezahlt manuell versenden"
442
+
443
+ # @ woocommerce-germanized
444
+ #: includes/admin/class-wc-gzd-admin.php:192
445
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:25
446
  #: includes/admin/views/html-page-status-germanized.php:22
447
  msgid "Germanized"
448
  msgstr "Germanized"
449
 
450
+ #: includes/admin/class-wc-gzd-admin.php:203
451
  msgid "Parcel Delivery Data Transfer:"
452
  msgstr "Paketdienstleister Datenweitergabe:"
453
 
454
+ #: includes/admin/class-wc-gzd-admin.php:204
455
  msgid "allowed"
456
  msgstr "akzeptiert"
457
 
458
+ #: includes/admin/class-wc-gzd-admin.php:204
459
  msgid "not allowed"
460
  msgstr "nicht akzeptiert"
461
 
462
  # @ woocommerce-germanized
463
+ #: includes/admin/class-wc-gzd-admin.php:293
464
  msgid "Optional Email Content"
465
  msgstr "Optionaler E-Mail Inhalt"
466
 
467
  # @ woocommerce-germanized
468
+ #: includes/admin/class-wc-gzd-admin.php:302
469
  msgid "Add content which will be replacing default page content within emails."
470
  msgstr ""
471
  "Fülle dieses Feld aus um einen abweichenden E-Mail Anhangstext für diese "
472
  "Seite zu bestimmen."
473
 
474
  # @ woocommerce-germanized
475
+ #: includes/admin/class-wc-gzd-admin.php:313
476
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:153
477
  msgid "Optional Mini Description"
478
  msgstr "Warenkorb Kurzbeschreibung"
479
 
480
  # @ woocommerce-germanized
481
+ #: includes/admin/class-wc-gzd-admin.php:332
482
  msgid ""
483
  "This content will be shown as short product description within checkout and "
484
  "emails."
487
  "Produkt Kurzbeschreibung angezeigt."
488
 
489
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
490
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:125
491
  msgid "Service products do not sell physical products."
492
  msgstr "Dienstleistungen werden nicht in physikalischer Form verkauft."
493
 
494
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:85
495
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
496
  msgid "Sale Label"
497
  msgstr "Streichpreis Hinweis"
498
 
503
  msgstr "Gleiche wie übergeordnet"
504
 
505
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:95
506
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
507
  msgid "Sale Regular Label"
508
  msgstr "Angebotspreis Hinweis"
509
 
510
  # @ woocommerce-germanized
511
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:113
512
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:153
513
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:704
514
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:867
515
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:916
532
 
533
  # @ woocommerce-germanized
534
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:117
535
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:173
536
  msgid "Calculation"
537
  msgstr "Berechnung"
538
 
566
 
567
  # @ woocommerce-germanized
568
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:138
569
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:224
570
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1091
571
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1124
572
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1157
581
  msgid "Same as parent"
582
  msgstr "Gleiche wie übergeordnet"
583
 
584
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:132
585
  msgid "Diff. Taxation"
586
  msgstr "Differenzbesteuerung"
587
 
588
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:133
589
  msgid "Product applies to differential taxation based on §25a UStG."
590
  msgstr "Produkt ist differenzbesteuert nach §25a UStG."
591
 
592
  # @ woocommerce-germanized
593
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
594
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
595
  msgid "Select Price Label"
596
  msgstr "Preishinweis auswählen"
597
 
598
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
599
  msgid ""
600
  "If the product is on sale you may want to show a price label right before "
601
  "outputting the old price to inform the customer."
605
  "Preis). Mit diesem Hinweis kannst du genau festlegen, um welchen Preis es "
606
  "sich dabei handelte (z.B. UVP)."
607
 
608
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
609
  msgid ""
610
  "If the product is on sale you may want to show a price label right before "
611
  "outputting the new price to inform the customer."
615
  "Preis)."
616
 
617
  # @ woocommerce-germanized
618
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
619
  #: includes/api/class-wc-gzd-rest-products-controller.php:113
620
  #: includes/class-wc-gzd-post-types.php:66
621
  msgid "Unit"
622
  msgstr "Einheit"
623
 
624
  # @ woocommerce-germanized
625
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
626
  msgid "Select unit"
627
  msgstr "Einheit auswählen"
628
 
629
  # @ woocommerce-germanized
630
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
631
  msgid "Needed if selling on a per unit basis"
632
  msgstr "Notwendig falls auf pro-Einheit-Basis verkauft werden soll"
633
 
634
  # @ woocommerce-germanized
635
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:153
636
  msgid "Number of units included per default product price. Example: 1000 ml."
637
  msgstr ""
638
  "Anzahl der Produkteinheiten auf Basis des Produktpreises. Beispiel: 1000 ml."
639
 
640
  # @ woocommerce-germanized
641
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:154
642
  msgid "Base Price Units"
643
  msgstr "Grundpreiseinheiten"
644
 
645
  # @ woocommerce-germanized
646
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:154
647
  msgid ""
648
  "Base price units. Example base price: 0,99 € / 100 ml. Insert 100 as base "
649
  "price unit amount."
652
  "hier 100 als Grundpreiseinheiten ein."
653
 
654
  # @ woocommerce-germanized
655
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:173
656
  msgid "Calculate base prices automatically."
657
  msgstr "Grundpreis automatisch berechnen."
658
 
659
  # @ woocommerce-germanized
660
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:175
661
  msgid "Regular Base Price"
662
  msgstr "Regulärer Grundpreis"
663
 
664
  # @ woocommerce-germanized
665
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:176
666
  msgid "Sale Base Price"
667
  msgstr "Angebotsgrundpreis"
668
 
669
  # @ woocommerce-germanized
670
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:186
671
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:228
672
  msgid "Search for a delivery time&hellip;"
673
  msgstr "Lieferzeit suchen&hellip;"
674
 
675
  # @ woocommerce-germanized
676
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:237
677
  msgid "Free shipping?"
678
  msgstr "Versand kostenlos?"
679
 
680
  # @ woocommerce-germanized
681
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:237
682
  msgid "This option disables the \"plus shipping costs\" notice on product page"
683
  msgstr ""
684
  "Deaktiviert den Hinweis \"zzgl. Versandkosten\". Ohne Auswirkungen auf die "
736
  # @ woocommerce-germanized
737
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:121
738
  msgid "Legal Checkboxes"
739
+ msgstr "Checkboxen"
740
 
741
  # @ woocommerce-germanized
742
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:122
1098
  msgstr "Passe hier, falls notwending, den Kleinunternehmer Hinweistext an."
1099
 
1100
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:392
1101
+ #: includes/wc-gzd-core-functions.php:228
1102
  msgid ""
1103
  "Value added tax is not collected, as small businesses according to §19 (1) "
1104
  "UStG."
1233
 
1234
  # @ woocommerce-germanized
1235
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:484
1236
+ #: includes/wc-gzd-core-functions.php:187
1237
  msgid "Shipping Costs"
1238
  msgstr "Versandkosten"
1239
 
1429
 
1430
  # @ woocommerce-germanized
1431
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:580
1432
+ #: includes/wc-gzd-core-functions.php:180
1433
  msgid "Right of Recission"
1434
  msgstr "Widerrufsrecht"
1435
 
1847
  "Platzhalter für den höchsten Preis."
1848
 
1849
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1038
1850
+ #: includes/wc-gzd-core-functions.php:539
1851
  msgid "{min_price} &ndash; {max_price}"
1852
  msgstr "{min_price} &ndash; {max_price}"
1853
 
1919
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1165
1920
  #: includes/admin/views/html-admin-page-checkboxes.php:17
1921
  #: includes/class-wc-gzd-legal-checkbox.php:735
1922
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:664
1923
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:106
1924
  msgid "Description"
1925
  msgstr "Beschreibung"
1980
  "der Option \"Auswahl von Versandarten im Checkout deaktivieren\"."
1981
 
1982
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1200
1983
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:373
1984
  msgid "Parcel Shop Finder"
1985
  msgstr "Paketshop finden"
1986
 
2914
  msgstr "jetzt upgraden"
2915
 
2916
  #: includes/api/class-wc-gzd-rest-customers-controller.php:151
2917
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:172
2918
  msgid "Send to DHL Parcel Shop?"
2919
  msgstr "An DHL Paketshop oder Packstation senden?"
2920
 
2921
  #: includes/api/class-wc-gzd-rest-customers-controller.php:157
2922
  #: includes/api/class-wc-gzd-rest-orders-controller.php:181
2923
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:184
2924
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:210
2925
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:223
2926
  #: includes/class-wc-gzd-privacy.php:58 includes/class-wc-gzd-privacy.php:82
2927
  #: includes/class-wc-gzd-privacy.php:120
2928
  msgid "Postnumber"
2932
  #: includes/api/class-wc-gzd-rest-customers-controller.php:163
2933
  #: includes/api/class-wc-gzd-rest-orders-controller.php:194
2934
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:30
2935
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:660
2936
  #: includes/gateways/direct-debit/views/html-export.php:27
2937
  msgid "Direct Debit"
2938
  msgstr "Lastschrift"
2944
  #: includes/class-wc-gzd-privacy.php:123
2945
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:108
2946
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:450
2947
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:686
2948
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:827
2949
  msgid "Account Holder"
2950
  msgstr "Kontoinhaber"
2951
 
2956
  #: includes/class-wc-gzd-privacy.php:124
2957
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:115
2958
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:451
2959
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:694
2960
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:831
2961
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:924
2962
  msgid "IBAN"
2963
  msgstr "IBAN"
2964
 
2969
  #: includes/class-wc-gzd-privacy.php:125
2970
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:122
2971
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:452
2972
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:835
2973
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:925
2974
  msgid "BIC/SWIFT"
2975
  msgstr "BIC/SWIFT"
2976
 
2977
  #: includes/api/class-wc-gzd-rest-orders-controller.php:175
2978
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:260
2979
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:296
2980
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:351
2981
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:352
2982
  msgid "Parcel Shop"
2983
  msgstr "Shop/Packstation"
2984
 
3201
  #: includes/class-wc-gzd-customer-helper.php:108
3202
  #: includes/class-wc-gzd-customer-helper.php:116
3203
  #: includes/class-wc-gzd-revocation.php:41
3204
+ #: includes/wc-gzd-core-functions.php:323
3205
  msgid "Mr."
3206
  msgstr "Herr"
3207
 
3212
  #: includes/class-wc-gzd-customer-helper.php:108
3213
  #: includes/class-wc-gzd-customer-helper.php:116
3214
  #: includes/class-wc-gzd-revocation.php:42
3215
+ #: includes/wc-gzd-core-functions.php:323
3216
+ #: includes/wc-gzd-core-functions.php:332
3217
  msgid "Ms."
3218
  msgstr "Frau"
3219
 
3235
 
3236
  #: includes/class-wc-gzd-customer-helper.php:94
3237
  #: includes/class-wc-gzd-customer-helper.php:188
3238
+ #: includes/class-wc-gzd-customer-helper.php:268
3239
  msgid ""
3240
  "Please activate your account through clicking on the activation link "
3241
  "received via email."
3252
  msgstr ""
3253
  "Bitte erstelle ein Kundenkonto oder logge dich ein, bevor du zur Kasse gehst"
3254
 
3255
+ #: includes/class-wc-gzd-customer-helper.php:291
3256
  msgid ""
3257
  "This activation code has expired. We have sent you a new activation code via "
3258
  "e-mail."
3261
  "Code per E-Mail geschickt."
3262
 
3263
  # @ woocommerce-germanized
3264
+ #: includes/class-wc-gzd-customer-helper.php:293
3265
  msgid "Sorry, but this activation code cannot be found."
3266
  msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
3267
 
3268
  # @ woocommerce-germanized
3269
+ #: includes/class-wc-gzd-customer-helper.php:297
3270
  msgid "Thank you. You have successfully activated your account."
3271
  msgstr "Vielen Dank. Dein Benutzerkonto wurde erfolgreich aktiviert."
3272
 
3273
+ #: includes/class-wc-gzd-customer-helper.php:409
3274
  msgid "Expired activation key"
3275
  msgstr "Abgelaufener Aktivierungscode"
3276
 
3277
+ #: includes/class-wc-gzd-customer-helper.php:414
3278
  msgid "Invalid activation key"
3279
  msgstr "Aktivierungscode ungültig"
3280
 
3281
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:201
3282
  msgid "DHL Parcel Shop?"
3283
  msgstr "DHL Paketshop/Packstation?"
3284
 
3285
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:204
3286
  msgid "Select whether delivery to parcel shop should be enabled."
3287
  msgstr ""
3288
  "Wähle aus ob die Lieferung an DHL Paketshops bzw. Packstationen aktiviert "
3289
  "werden soll."
3290
 
3291
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:212
3292
  msgid ""
3293
  "In case delivery to parcel shop is enabled please fill in the corresponding "
3294
  "DHL post number."
3296
  "Wenn die Lieferung an eine DHL Packstation aktiviert wurde, trage bitte die "
3297
  "PostNummer ein."
3298
 
3299
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:317
3300
  msgid "Your PostNumber should contain numbers only"
3301
  msgstr "Deine PostNummer sollte nur aus Zahlen bestehen."
3302
 
3303
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:323
3304
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:358
3305
  #, php-format
3306
  msgid "Parcel Shop Delivery is only supported in: %s."
3307
  msgstr ""
3450
  msgstr "Danke, dass du ein Konto bei %s erstellt hast."
3451
 
3452
  # @ woocommerce-germanized
3453
+ #: includes/class-wc-gzd-emails.php:715
3454
  msgctxt "revocation-form"
3455
  msgid "Forward your Revocation online"
3456
  msgstr "Deinen Widerruf online erklären"
3689
 
3690
  # @ woocommerce-germanized
3691
  #: includes/class-wc-gzd-legal-checkbox-manager.php:173
3692
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:751
3693
  msgid "I hereby agree to the {link}direct debit mandate{/link}."
3694
  msgstr "Hiermit erteile ich das {link}SEPA Lastschriftmandat{/link}."
3695
 
3831
  # @ woocommerce-germanized
3832
  #: includes/class-wc-gzd-payment-gateways.php:98
3833
  #: includes/wc-gzd-order-functions.php:20
3834
+ #: includes/wc-gzd-template-functions.php:454
3835
  #, php-format
3836
  msgid "Plus %s forwarding fee (charged by the transport agent)"
3837
  msgstr "zzgl. %s Übermittlungsentgelt (direkt an den Zusteller)"
4053
  msgid "Visible during checkout"
4054
  msgstr "Im Checkout anzeigen"
4055
 
4056
+ #: includes/class-wc-gzd-product-grouped.php:227
4057
+ #: includes/class-wc-gzd-product-grouped.php:232
4058
  #: includes/class-wc-gzd-product-variable.php:132
4059
  #: includes/class-wc-gzd-product-variable.php:137
4060
  #, php-format
4562
  "%s ein."
4563
 
4564
  # @ woocommerce-germanized
4565
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:571
4566
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:593
4567
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:617
4568
  msgid "a single payment"
4569
  msgstr "eine einmalige Zahlung"
4570
 
4571
  # @ woocommerce-germanized
4572
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:651
4573
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:93
4574
  msgid "Enable/Disable"
4575
  msgstr "Aktivieren/Deaktivieren"
4576
 
4577
  # @ woocommerce-germanized
4578
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:653
4579
  msgid "Enable Direct Debit Payment"
4580
  msgstr "Bezahlung per Lastschrift aktivieren"
4581
 
4582
  # @ woocommerce-germanized
4583
  # @ woocommerce
4584
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:657
4585
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:99
4586
  msgctxt "gateway"
4587
  msgid "Title"
4588
  msgstr "Bezeichnung"
4589
 
4590
  # @ woocommerce-germanized
4591
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:659
4592
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:101
4593
  msgid "This controls the title which the user sees during checkout."
4594
  msgstr ""
4595
  "Beschreibungstext, den Benutzer bei der Auswahl dieser Zahlungsart sehen."
4596
 
4597
  # @ woocommerce-germanized
4598
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:666
4599
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:108
4600
  msgid "Payment method description that the customer will see on your checkout."
4601
  msgstr "Beschreibung der Zahlungsart, die Kunden auf deiner Website sehen."
4602
 
4603
  # @ woocommerce-germanized
4604
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:667
4605
  msgid "The order amount will be debited directly from your bank account."
4606
  msgstr ""
4607
  "Der Gesamtbestellbetrag wird per SEPA-Lastschrift direkt von deinem Konto "
4608
  "abgebucht."
4609
 
4610
  # @ woocommerce-germanized
4611
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:671
4612
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:113
4613
  msgid "Instructions"
4614
  msgstr "Anweisungen"
4615
 
4616
  # @ woocommerce-germanized
4617
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:673
4618
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:115
4619
  msgid "Instructions that will be added to the thank you page and emails."
4620
  msgstr "Anweisung, die zur „Danke“-Seite und zu E-Mails hinzugefügt werden."
4621
 
4622
  # @ woocommerce-germanized
4623
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:678
4624
  msgid "Debtee"
4625
  msgstr "Gläubiger Informationen"
4626
 
4627
  # @ woocommerce-germanized
4628
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:680
4629
  msgid "Insert your company information."
4630
  msgstr "Füge hier die Informationen zu deinem Unternehmen ein."
4631
 
4632
  # @ woocommerce-germanized
4633
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:682
4634
  msgid "Company Inc, John Doe Street, New York"
4635
  msgstr "Musterfirma GmbH, Musterstraße 12, 12203 Musterstadt"
4636
 
4637
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:688
4638
  msgid "Insert the bank account holder name."
4639
  msgstr "Füge hier den Namen des Kontoinhabers ein."
4640
 
4641
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:690
4642
  msgid "Company Inc"
4643
  msgstr "Muster GmbH"
4644
 
4645
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:696
4646
  msgid "Insert the bank account IBAN."
4647
  msgstr "Füge hier den IBAN deines Kontos ein."
4648
 
4649
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:701
4650
  msgid "BIC"
4651
  msgstr "BIC"
4652
 
4653
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:703
4654
  msgid "Insert the bank account BIC."
4655
  msgstr "Füge hier den BIC deines Kontos ein."
4656
 
4657
  # @ woocommerce-germanized
4658
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:708
4659
  msgid "Debtee identification number"
4660
  msgstr "Identifikationsnummer"
4661
 
4662
  # @ woocommerce-germanized
4663
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:710
4664
  #, php-format
4665
  msgid ""
4666
  "Insert your debtee indentification number. More information can be found <a "
4670
  "Weitere Informationen zu dieser Nummer erhältst du <a href=\"%s\">hier</a>."
4671
 
4672
  # @ woocommerce-germanized
4673
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:714
4674
  msgid "Generate Mandate ID"
4675
  msgstr "Mandat-Referenz generieren"
4676
 
4677
  # @ woocommerce-germanized
4678
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:716
4679
  msgid "Automatically generate Mandate ID."
4680
  msgstr "Mandat-Referenznummer automatisch generieren."
4681
 
4682
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:717
4683
  msgid ""
4684
  "Automatically generate Mandate ID after order completion (based on Order ID)."
4685
  msgstr ""
4687
  "basierend auf der Bestellnummer."
4688
 
4689
  # @ woocommerce-germanized
4690
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:721
4691
  msgid "XML Pain Format"
4692
  msgstr "XML Pain Format"
4693
 
4694
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:723
4695
  msgid ""
4696
  "You may adjust the XML Export Pain Schema to your banks needs. Some banks "
4697
  "may require pain.001.003.03."
4700
  "Banken benötigen z.B. pain.001.003.03."
4701
 
4702
  # @ woocommerce-germanized
4703
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:727
4704
  msgid "Mandate ID Format"
4705
  msgstr "Mandat-Referenz Format"
4706
 
4707
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:729
4708
  msgid ""
4709
  "You may extend the Mandate ID format by adding a prefix and/or suffix. Use "
4710
  "{id} as placeholder to insert the automatically generated ID."
4713
  "{id} als Platzhalter um die automatisch generierte Referenznummer einzufügen."
4714
 
4715
  # @ woocommerce-germanized
4716
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:733
4717
  msgid "Mandate Text"
4718
  msgstr "Lastschriftmandat"
4719
 
4720
  # @ woocommerce-germanized
4721
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:735
4722
  msgid ""
4723
  "This text will be populated with live order/checkout data. Will be used as "
4724
  "preview direct debit mandate and as email template text."
4729
  "Verfügung gestellt."
4730
 
4731
  # @ woocommerce-germanized
4732
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:741
4733
  msgid "Checkbox"
4734
  msgstr "Checkbox"
4735
 
4736
  # @ woocommerce-germanized
4737
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:742
4738
  msgid "Enable \"agree to SEPA mandate\" checkbox"
4739
  msgstr "Aktiviere die Checkbox zur Bestätigung des Lastschriftmandates."
4740
 
4741
  # @ woocommerce-germanized
4742
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:744
4743
  msgid "Enable a checkbox linking to a SEPA direct debit mandate preview."
4744
  msgstr ""
4745
  "Aktiviere eine Checkbox, die zu einer Vorschau des Lastschrift-Mandats führt."
4746
 
4747
  # @ woocommerce-germanized
4748
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:748
4749
  msgid "Checkbox label"
4750
  msgstr "Checkbox Text"
4751
 
4752
  # @ woocommerce-germanized
4753
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:750
4754
  msgid ""
4755
  "Customize the checkbox label. Use {link}link name{/link} to insert the "
4756
  "preview link."
4758
  "Passe den Checkbox Text an. Verwende {link}SEPA Lastschriftmandat{/link} um "
4759
  "auf die Vorschau zu verlinken."
4760
 
4761
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:755
4762
  msgid "Enable pre-notification"
4763
  msgstr "Vorankündigung aktivieren"
4764
 
4765
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:756
4766
  msgid "Insert pre-notification text within the order confirmation email."
4767
  msgstr ""
4768
  "Fügt einen Standard-Text zur Vorankündigung des SEPA-Einzugs in die "
4769
  "Bestellbestätigung ein."
4770
 
4771
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:758
4772
  msgid ""
4773
  "This option inserts a standard text containing a pre-notification for the "
4774
  "customer."
4777
  "die Bestellbestätigung ein. In der Ankündigung wird u.a. ein konkreter "
4778
  "Fälligkeitstermin genannt."
4779
 
4780
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:762
4781
  msgid "Debit days"
4782
  msgstr "Fälligkeitstage"
4783
 
4784
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:764
4785
  msgid ""
4786
  "This option is used to calculate the debit date and is added to the order "
4787
  "date."
4791
  "hier eingestellten Anzahl Tage."
4792
 
4793
  # @ woocommerce-germanized
4794
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:768
4795
  msgid "Mask IBAN"
4796
  msgstr "IBAN maskieren"
4797
 
4798
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:769
4799
  msgid "Mask the IBAN within emails."
4800
  msgstr "IBAN in E-Mails maskieren."
4801
 
4802
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:771
4803
  msgid ""
4804
  "This will lead to masked IBANs within emails (replaced by *). All but last 4 "
4805
  "digits will be masked."
4807
  "Der IBAN wird in E-Mails (abgesehen von den letzten 4 Stellen) mit * "
4808
  "maskiert."
4809
 
4810
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:780
4811
  msgid "Remember"
4812
  msgstr "Bankdaten merken\t"
4813
 
4814
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:781
4815
  msgid "Remember account data for returning customers."
4816
  msgstr "Bankverbindung für registrierte Kunden speichern."
4817
 
4818
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:783
4819
  msgid "Save account data as user meta if user has/creates a customer account."
4820
  msgstr ""
4821
  "Speichert die Bankverbindung für registrierte Kunden in der user_meta "
4823
  "eigenständig aus."
4824
 
4825
  # @ woocommerce-germanized
4826
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:866
4827
  msgid "Please insert your SEPA account data."
4828
  msgstr "Bitte füge deine SEPA Kontoinformationen ein."
4829
 
4830
  # @ woocommerce-germanized
4831
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:875
4832
  msgid "Your IBAN seems to be invalid."
4833
  msgstr "Dein IBAN scheint nicht gültig zu sein."
4834
 
4835
  # @ woocommerce-germanized
4836
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:877
4837
  msgid "Your IBAN's country code doesn’t match with your billing country."
4838
  msgstr "Der Ländercode des IBANs stimmt nicht mit dem Rechnungsland überein."
4839
 
4840
  # @ woocommerce-germanized
4841
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:882
4842
  msgid "Your BIC seems to be invalid."
4843
  msgstr "Dein BIC/SWIFT scheint nicht gültig zu sein."
4844
 
4845
  # @ woocommerce-germanized
4846
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:926
4847
  msgid "is invalid"
4848
  msgstr "ist ungültig"
4849
 
4850
  # @ woocommerce-germanized
4851
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:963
4852
  msgid "Awaiting Direct Debit Payment"
4853
  msgstr "Zahlung per Lastschrift ausstehend"
4854
 
4912
  # @ woocommerce-germanized
4913
  # @ woocommerce
4914
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:64
4915
+ #: woocommerce-germanized.php:662
4916
  msgid "Settings"
4917
  msgstr "Einstellungen"
4918
 
6020
  msgstr "Titel"
6021
 
6022
  # @ woocommerce-germanized
6023
+ #: includes/wc-gzd-core-functions.php:182
6024
  msgid "Data Security"
6025
  msgstr "Datenschutzbelehrung"
6026
 
6027
  # @ woocommerce-germanized
6028
+ #: includes/wc-gzd-template-functions.php:217
6029
  #: templates/checkout/edit-data-notice.php:16
6030
  msgid "Edit Order"
6031
  msgstr "Bestellung bearbeiten"
6032
 
6033
  # @ woocommerce-germanized
6034
+ #: includes/wc-gzd-template-functions.php:228
6035
  msgid "Choose a Payment Gateway"
6036
  msgstr "Zahlungsart auswählen"
6037
 
6038
  # @ woocommerce
6039
+ #: includes/wc-gzd-template-functions.php:376
6040
  msgid "Place order"
6041
  msgstr "Jetzt kaufen"
6042
 
6265
  msgid "cancel review reminder"
6266
  msgstr "von der Bewertungserinnerung abmelden"
6267
 
6268
+ #: woocommerce-germanized.php:769
6269
  msgid "Pease wait while we are trying to redirect you to the payment provider."
6270
  msgstr "Einen Moment - wir versuchen dich zum Zahlungsanbieter weiterzuleiten."
6271
 
i18n/languages/woocommerce-germanized-de_DE_formal.mo CHANGED
Binary file
i18n/languages/woocommerce-germanized-de_DE_formal.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce Germanized v1.5.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-05-13 13:52+0200\n"
6
- "PO-Revision-Date: 2019-05-13 13:52+0200\n"
7
  "Last-Translator: holzhannes <holzhannes@posteo.de>\n"
8
  "Language-Team: \n"
9
  "Language: de_DE\n"
@@ -11,7 +11,7 @@ msgstr ""
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
- "X-Generator: Poedit 2.2.1\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
@@ -93,30 +93,30 @@ msgid "l"
93
  msgstr "l"
94
 
95
  # @ woocommerce-germanized
96
- #: includes/abstracts/abstract-wc-gzd-product.php:369
97
- #: includes/abstracts/abstract-wc-gzd-product.php:378
98
- #: includes/wc-gzd-core-functions.php:268
99
- #: includes/wc-gzd-template-functions.php:444 woocommerce-germanized.php:941
100
  msgid "incl. VAT"
101
  msgstr "inkl. MwSt."
102
 
103
  # @ woocommerce-germanized
104
- #: includes/abstracts/abstract-wc-gzd-product.php:369
105
  msgid "excl. VAT"
106
  msgstr "exkl. MwSt."
107
 
108
  # @ woocommerce-germanized
109
- #: includes/abstracts/abstract-wc-gzd-product.php:371
110
- #: includes/wc-gzd-core-functions.php:268 woocommerce-germanized.php:941
111
  #, php-format
112
  msgid "incl. %s%% VAT"
113
- msgstr "inkl. %s%% MwSt."
114
 
115
  # @ woocommerce-germanized
116
- #: includes/abstracts/abstract-wc-gzd-product.php:371
117
  #, php-format
118
  msgid "excl. %s%% VAT"
119
- msgstr "exkl. %s%% MwSt."
120
 
121
  # @ woocommerce-germanized
122
  #: includes/admin/class-wc-gzd-admin-customer.php:47
@@ -252,7 +252,7 @@ msgstr "Virtuelles Produkt"
252
 
253
  #: includes/admin/class-wc-gzd-admin-legal-checkboxes.php:101
254
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
255
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:119
256
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:774
257
  #: includes/class-wc-gzd-legal-checkbox-manager.php:122
258
  msgid "Service"
@@ -366,7 +366,7 @@ msgstr ""
366
  #: includes/admin/class-wc-gzd-admin-status.php:38
367
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
368
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:233
369
- #: includes/wc-gzd-core-functions.php:165
370
  msgid "Terms & Conditions"
371
  msgstr "AGB"
372
 
@@ -380,7 +380,7 @@ msgstr "Widerrufsbelehrung"
380
  #: includes/admin/class-wc-gzd-admin-status.php:40
381
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
382
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:255
383
- #: includes/wc-gzd-core-functions.php:167
384
  msgid "Imprint"
385
  msgstr "Impressum"
386
 
@@ -392,7 +392,7 @@ msgstr "Datenschutzbelehrung"
392
  # @ woocommerce-germanized
393
  #: includes/admin/class-wc-gzd-admin-status.php:42
394
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:277
395
- #: includes/wc-gzd-core-functions.php:172
396
  msgid "Payment Methods"
397
  msgstr "Zahlungarten"
398
 
@@ -412,64 +412,73 @@ msgstr "Willkommen bei Germanized"
412
  msgid "Go to Germanized Settings"
413
  msgstr "Germanized Einstellungen"
414
 
415
- #: includes/admin/class-wc-gzd-admin.php:111
416
- #: includes/class-wc-gzd-dhl-parcel-shops.php:180
417
  msgid "Yes"
418
  msgstr "Ja"
419
 
420
- #: includes/admin/class-wc-gzd-admin.php:111
421
- #: includes/class-wc-gzd-dhl-parcel-shops.php:180
422
  msgid "No"
423
  msgstr "Nein"
424
 
425
- #: includes/admin/class-wc-gzd-admin.php:164
 
 
 
 
426
  msgid "Order confirmation manually sent to customer."
427
  msgstr "Bestellbestätigung manuell an den Kunden versendet."
428
 
429
  # @ woocommerce-germanized
430
- #: includes/admin/class-wc-gzd-admin.php:170
431
  msgid "Resend order confirmation"
432
  msgstr "Bestellbestätigung erneut versenden"
433
 
434
  # @ woocommerce-germanized
435
- #: includes/admin/class-wc-gzd-admin.php:179
 
 
 
 
 
436
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:25
437
  #: includes/admin/views/html-page-status-germanized.php:22
438
  msgid "Germanized"
439
  msgstr "Germanized"
440
 
441
- #: includes/admin/class-wc-gzd-admin.php:189
442
  msgid "Parcel Delivery Data Transfer:"
443
  msgstr "Paketdienstleister Datenweitergabe:"
444
 
445
- #: includes/admin/class-wc-gzd-admin.php:190
446
  msgid "allowed"
447
  msgstr "akzeptiert"
448
 
449
- #: includes/admin/class-wc-gzd-admin.php:190
450
  msgid "not allowed"
451
  msgstr "nicht akzeptiert"
452
 
453
  # @ woocommerce-germanized
454
- #: includes/admin/class-wc-gzd-admin.php:279
455
  msgid "Optional Email Content"
456
  msgstr "Optionaler E-Mail Inhalt"
457
 
458
  # @ woocommerce-germanized
459
- #: includes/admin/class-wc-gzd-admin.php:288
460
  msgid "Add content which will be replacing default page content within emails."
461
  msgstr ""
462
  "Füllen Sie dieses Feld aus um einen abweichenden E-Mail Anhangstext für "
463
  "diese Seite zu bestimmen."
464
 
465
  # @ woocommerce-germanized
466
- #: includes/admin/class-wc-gzd-admin.php:299
467
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:153
468
  msgid "Optional Mini Description"
469
  msgstr "Warenkorb Kurzbeschreibung"
470
 
471
  # @ woocommerce-germanized
472
- #: includes/admin/class-wc-gzd-admin.php:318
473
  msgid ""
474
  "This content will be shown as short product description within checkout and "
475
  "emails."
@@ -478,12 +487,12 @@ msgstr ""
478
  "Produkt Kurzbeschreibung angezeigt."
479
 
480
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
481
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:120
482
  msgid "Service products do not sell physical products."
483
  msgstr "Dienstleistungen werden nicht in physikalischer Form verkauft."
484
 
485
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:85
486
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
487
  msgid "Sale Label"
488
  msgstr "Regulärer Preishinweis"
489
 
@@ -494,13 +503,13 @@ msgid "Same as Parent"
494
  msgstr "Gleiche wie übergeordnet"
495
 
496
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:95
497
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
498
  msgid "Sale Regular Label"
499
  msgstr "Neuer Preis Hinweis"
500
 
501
  # @ woocommerce-germanized
502
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:113
503
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:148
504
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:704
505
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:867
506
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:916
@@ -523,7 +532,7 @@ msgstr ""
523
 
524
  # @ woocommerce-germanized
525
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:117
526
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:168
527
  msgid "Calculation"
528
  msgstr "Berechnung"
529
 
@@ -557,7 +566,7 @@ msgstr "Allgemein"
557
 
558
  # @ woocommerce-germanized
559
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:138
560
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:219
561
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1091
562
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1124
563
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1157
@@ -572,21 +581,21 @@ msgstr "Lieferzeit"
572
  msgid "Same as parent"
573
  msgstr "Gleiche wie übergeordnet"
574
 
575
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:127
576
  msgid "Diff. Taxation"
577
  msgstr "Differenzbesteuerung"
578
 
579
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:128
580
  msgid "Product applies to differential taxation based on §25a UStG."
581
  msgstr "Produkt ist differenzbesteuert nach §25a UStG."
582
 
583
  # @ woocommerce-germanized
584
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
585
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
586
  msgid "Select Price Label"
587
  msgstr "Preishinweis auswählen"
588
 
589
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:144
590
  msgid ""
591
  "If the product is on sale you may want to show a price label right before "
592
  "outputting the old price to inform the customer."
@@ -596,7 +605,7 @@ msgstr ""
596
  "Preis). Mit diesem Hinweis können Sie genau festlegen, um welchen Preis es "
597
  "sich dabei handelte (z.B. UVP)."
598
 
599
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:145
600
  msgid ""
601
  "If the product is on sale you may want to show a price label right before "
602
  "outputting the new price to inform the customer."
@@ -606,35 +615,35 @@ msgstr ""
606
  "neuer Preis)."
607
 
608
  # @ woocommerce-germanized
609
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
610
  #: includes/api/class-wc-gzd-rest-products-controller.php:113
611
  #: includes/class-wc-gzd-post-types.php:66
612
  msgid "Unit"
613
  msgstr "Einheit"
614
 
615
  # @ woocommerce-germanized
616
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
617
  msgid "Select unit"
618
  msgstr "Einheit auswählen"
619
 
620
  # @ woocommerce-germanized
621
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:147
622
  msgid "Needed if selling on a per unit basis"
623
  msgstr "Notwendig falls auf pro-Einheit-Basis verkauft werden soll"
624
 
625
  # @ woocommerce-germanized
626
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:148
627
  msgid "Number of units included per default product price. Example: 1000 ml."
628
  msgstr ""
629
  "Anzahl der Produkteinheiten auf Basis des Produktpreises. Beispiel: 1000 ml."
630
 
631
  # @ woocommerce-germanized
632
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
633
  msgid "Base Price Units"
634
  msgstr "Grundpreiseinheiten"
635
 
636
  # @ woocommerce-germanized
637
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
638
  msgid ""
639
  "Base price units. Example base price: 0,99 € / 100 ml. Insert 100 as base "
640
  "price unit amount."
@@ -643,33 +652,33 @@ msgstr ""
643
  "hier 100 als Grundpreiseinheiten ein."
644
 
645
  # @ woocommerce-germanized
646
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:168
647
  msgid "Calculate base prices automatically."
648
  msgstr "Grundpreis automatisch berechnen."
649
 
650
  # @ woocommerce-germanized
651
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:170
652
  msgid "Regular Base Price"
653
  msgstr "Regulärer Grundpreis"
654
 
655
  # @ woocommerce-germanized
656
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:171
657
  msgid "Sale Base Price"
658
  msgstr "Angebotsgrundpreis"
659
 
660
  # @ woocommerce-germanized
661
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:181
662
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:223
663
  msgid "Search for a delivery time&hellip;"
664
  msgstr "Lieferzeit suchen&hellip;"
665
 
666
  # @ woocommerce-germanized
667
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:232
668
  msgid "Free shipping?"
669
  msgstr "Versand kostenlos?"
670
 
671
  # @ woocommerce-germanized
672
- #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:232
673
  msgid "This option disables the \"plus shipping costs\" notice on product page"
674
  msgstr ""
675
  "Deaktiviert den Hinweis \"zzgl. Versandkosten\". Ohne Auswirkungen auf die "
@@ -727,7 +736,7 @@ msgstr "Anzeige"
727
  # @ woocommerce-germanized
728
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:121
729
  msgid "Legal Checkboxes"
730
- msgstr "Rechtliche Checkboxen"
731
 
732
  # @ woocommerce-germanized
733
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:122
@@ -1090,7 +1099,7 @@ msgstr ""
1090
  "Passen Sie hier, falls notwending, den Kleinunternehmer Hinweistext an."
1091
 
1092
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:392
1093
- #: includes/wc-gzd-core-functions.php:214
1094
  msgid ""
1095
  "Value added tax is not collected, as small businesses according to §19 (1) "
1096
  "UStG."
@@ -1225,7 +1234,7 @@ msgstr ""
1225
 
1226
  # @ woocommerce-germanized
1227
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:484
1228
- #: includes/wc-gzd-core-functions.php:173
1229
  msgid "Shipping Costs"
1230
  msgstr "Versandkosten"
1231
 
@@ -1421,7 +1430,7 @@ msgstr "Tagen"
1421
 
1422
  # @ woocommerce-germanized
1423
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:580
1424
- #: includes/wc-gzd-core-functions.php:166
1425
  msgid "Right of Recission"
1426
  msgstr "Widerrufsrecht"
1427
 
@@ -1839,7 +1848,7 @@ msgstr ""
1839
  "Platzhalter für den höchsten Preis."
1840
 
1841
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1038
1842
- #: includes/wc-gzd-core-functions.php:525
1843
  msgid "{min_price} &ndash; {max_price}"
1844
  msgstr "{min_price} &ndash; {max_price}"
1845
 
@@ -1911,7 +1920,7 @@ msgstr "Warenkorb"
1911
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1165
1912
  #: includes/admin/views/html-admin-page-checkboxes.php:17
1913
  #: includes/class-wc-gzd-legal-checkbox.php:735
1914
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:663
1915
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:106
1916
  msgid "Description"
1917
  msgstr "Beschreibung"
@@ -1972,7 +1981,7 @@ msgstr ""
1972
  "mit der Option \"Auswahl von Versandarten im Checkout deaktivieren\"."
1973
 
1974
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1200
1975
- #: includes/class-wc-gzd-dhl-parcel-shops.php:356
1976
  msgid "Parcel Shop Finder"
1977
  msgstr "Paketshop finden"
1978
 
@@ -2907,15 +2916,15 @@ msgid "Upgrade now"
2907
  msgstr "jetzt upgraden"
2908
 
2909
  #: includes/api/class-wc-gzd-rest-customers-controller.php:151
2910
- #: includes/class-wc-gzd-dhl-parcel-shops.php:149
2911
  msgid "Send to DHL Parcel Shop?"
2912
  msgstr "An DHL Paketshop oder Packstation senden?"
2913
 
2914
  #: includes/api/class-wc-gzd-rest-customers-controller.php:157
2915
  #: includes/api/class-wc-gzd-rest-orders-controller.php:181
2916
- #: includes/class-wc-gzd-dhl-parcel-shops.php:161
2917
- #: includes/class-wc-gzd-dhl-parcel-shops.php:187
2918
- #: includes/class-wc-gzd-dhl-parcel-shops.php:200
2919
  #: includes/class-wc-gzd-privacy.php:58 includes/class-wc-gzd-privacy.php:82
2920
  #: includes/class-wc-gzd-privacy.php:120
2921
  msgid "Postnumber"
@@ -2925,7 +2934,7 @@ msgstr "PostNummer"
2925
  #: includes/api/class-wc-gzd-rest-customers-controller.php:163
2926
  #: includes/api/class-wc-gzd-rest-orders-controller.php:194
2927
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:30
2928
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:659
2929
  #: includes/gateways/direct-debit/views/html-export.php:27
2930
  msgid "Direct Debit"
2931
  msgstr "Lastschrift"
@@ -2937,8 +2946,8 @@ msgstr "Lastschrift"
2937
  #: includes/class-wc-gzd-privacy.php:123
2938
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:108
2939
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:450
2940
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:685
2941
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:826
2942
  msgid "Account Holder"
2943
  msgstr "Kontoinhaber"
2944
 
@@ -2949,9 +2958,9 @@ msgstr "Kontoinhaber"
2949
  #: includes/class-wc-gzd-privacy.php:124
2950
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:115
2951
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:451
2952
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:693
2953
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:830
2954
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:923
2955
  msgid "IBAN"
2956
  msgstr "IBAN"
2957
 
@@ -2962,16 +2971,16 @@ msgstr "IBAN"
2962
  #: includes/class-wc-gzd-privacy.php:125
2963
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:122
2964
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:452
2965
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:834
2966
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:924
2967
  msgid "BIC/SWIFT"
2968
  msgstr "BIC/SWIFT"
2969
 
2970
  #: includes/api/class-wc-gzd-rest-orders-controller.php:175
2971
- #: includes/class-wc-gzd-dhl-parcel-shops.php:237
2972
- #: includes/class-wc-gzd-dhl-parcel-shops.php:279
2973
- #: includes/class-wc-gzd-dhl-parcel-shops.php:334
2974
- #: includes/class-wc-gzd-dhl-parcel-shops.php:335
2975
  msgid "Parcel Shop"
2976
  msgstr "Shop/Packstation"
2977
 
@@ -3194,7 +3203,7 @@ msgstr ""
3194
  #: includes/class-wc-gzd-customer-helper.php:108
3195
  #: includes/class-wc-gzd-customer-helper.php:116
3196
  #: includes/class-wc-gzd-revocation.php:41
3197
- #: includes/wc-gzd-core-functions.php:309
3198
  msgid "Mr."
3199
  msgstr "Herr"
3200
 
@@ -3205,8 +3214,8 @@ msgstr "Herr"
3205
  #: includes/class-wc-gzd-customer-helper.php:108
3206
  #: includes/class-wc-gzd-customer-helper.php:116
3207
  #: includes/class-wc-gzd-revocation.php:42
3208
- #: includes/wc-gzd-core-functions.php:309
3209
- #: includes/wc-gzd-core-functions.php:318
3210
  msgid "Ms."
3211
  msgstr "Frau"
3212
 
@@ -3228,7 +3237,7 @@ msgstr ""
3228
 
3229
  #: includes/class-wc-gzd-customer-helper.php:94
3230
  #: includes/class-wc-gzd-customer-helper.php:188
3231
- #: includes/class-wc-gzd-customer-helper.php:269
3232
  msgid ""
3233
  "Please activate your account through clicking on the activation link "
3234
  "received via email."
@@ -3247,7 +3256,7 @@ msgstr ""
3247
  "Bitte erstellen Sie ein Kundenkonto oder loggen Sie sich ein, bevor Sie zur "
3248
  "Kasse gehen"
3249
 
3250
- #: includes/class-wc-gzd-customer-helper.php:292
3251
  msgid ""
3252
  "This activation code has expired. We have sent you a new activation code via "
3253
  "e-mail."
@@ -3256,34 +3265,34 @@ msgstr ""
3256
  "Code per E-Mail geschickt."
3257
 
3258
  # @ woocommerce-germanized
3259
- #: includes/class-wc-gzd-customer-helper.php:294
3260
  msgid "Sorry, but this activation code cannot be found."
3261
  msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
3262
 
3263
  # @ woocommerce-germanized
3264
- #: includes/class-wc-gzd-customer-helper.php:298
3265
  msgid "Thank you. You have successfully activated your account."
3266
  msgstr "Vielen Dank. Ihr Benutzerkonto wurde erfolgreich aktiviert."
3267
 
3268
- #: includes/class-wc-gzd-customer-helper.php:408
3269
  msgid "Expired activation key"
3270
  msgstr "Abgelaufener Aktivierungscode"
3271
 
3272
- #: includes/class-wc-gzd-customer-helper.php:413
3273
  msgid "Invalid activation key"
3274
  msgstr "Aktivierungscode ungültig"
3275
 
3276
- #: includes/class-wc-gzd-dhl-parcel-shops.php:178
3277
  msgid "DHL Parcel Shop?"
3278
  msgstr "DHL Paketshop/Packstation?"
3279
 
3280
- #: includes/class-wc-gzd-dhl-parcel-shops.php:181
3281
  msgid "Select whether delivery to parcel shop should be enabled."
3282
  msgstr ""
3283
  "Wählen Sie aus ob die Lieferung an DHL Paketshops bzw. Packstationen "
3284
  "aktiviert werden soll."
3285
 
3286
- #: includes/class-wc-gzd-dhl-parcel-shops.php:189
3287
  msgid ""
3288
  "In case delivery to parcel shop is enabled please fill in the corresponding "
3289
  "DHL post number."
@@ -3291,12 +3300,12 @@ msgstr ""
3291
  "Wenn die Lieferung an eine DHL Packstation aktiviert wurde, tragen Sie bitte "
3292
  "die PostNummer ein."
3293
 
3294
- #: includes/class-wc-gzd-dhl-parcel-shops.php:300
3295
  msgid "Your PostNumber should contain numbers only"
3296
  msgstr "Ihre PostNummer sollte nur aus Zahlen bestehen."
3297
 
3298
- #: includes/class-wc-gzd-dhl-parcel-shops.php:306
3299
- #: includes/class-wc-gzd-dhl-parcel-shops.php:341
3300
  #, php-format
3301
  msgid "Parcel Shop Delivery is only supported in: %s."
3302
  msgstr ""
@@ -3444,7 +3453,7 @@ msgid "Thanks for creating an account on %s."
3444
  msgstr "Danke, dass Sie ein Konto bei %s erstellt haben."
3445
 
3446
  # @ woocommerce-germanized
3447
- #: includes/class-wc-gzd-emails.php:706
3448
  msgctxt "revocation-form"
3449
  msgid "Forward your Revocation online"
3450
  msgstr "Widerruf online erklären"
@@ -3684,7 +3693,7 @@ msgstr ""
3684
 
3685
  # @ woocommerce-germanized
3686
  #: includes/class-wc-gzd-legal-checkbox-manager.php:173
3687
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:750
3688
  msgid "I hereby agree to the {link}direct debit mandate{/link}."
3689
  msgstr "Hiermit erteile ich das {link}SEPA Lastschriftmandat{/link}."
3690
 
@@ -3827,7 +3836,7 @@ msgstr "%s Zahlungsgebühr"
3827
  # @ woocommerce-germanized
3828
  #: includes/class-wc-gzd-payment-gateways.php:98
3829
  #: includes/wc-gzd-order-functions.php:20
3830
- #: includes/wc-gzd-template-functions.php:378
3831
  #, php-format
3832
  msgid "Plus %s forwarding fee (charged by the transport agent)"
3833
  msgstr "zzgl. %s Übermittlungsentgelt (direkt an den Zusteller)"
@@ -4049,6 +4058,8 @@ msgstr ""
4049
  msgid "Visible during checkout"
4050
  msgstr "Im Checkout anzeigen"
4051
 
 
 
4052
  #: includes/class-wc-gzd-product-variable.php:132
4053
  #: includes/class-wc-gzd-product-variable.php:137
4054
  #, php-format
@@ -4556,105 +4567,105 @@ msgstr ""
4556
  "%s ein."
4557
 
4558
  # @ woocommerce-germanized
4559
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:569
4560
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:592
4561
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:616
4562
  msgid "a single payment"
4563
  msgstr "eine einmalige Zahlung"
4564
 
4565
  # @ woocommerce-germanized
4566
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:650
4567
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:93
4568
  msgid "Enable/Disable"
4569
  msgstr "Aktivieren/Deaktivieren"
4570
 
4571
  # @ woocommerce-germanized
4572
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:652
4573
  msgid "Enable Direct Debit Payment"
4574
  msgstr "Bezahlung per Lastschrift aktivieren"
4575
 
4576
  # @ woocommerce-germanized
4577
  # @ woocommerce
4578
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:656
4579
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:99
4580
  msgctxt "gateway"
4581
  msgid "Title"
4582
  msgstr "Bezeichnung"
4583
 
4584
  # @ woocommerce-germanized
4585
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:658
4586
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:101
4587
  msgid "This controls the title which the user sees during checkout."
4588
  msgstr ""
4589
  "Beschreibungstext, den Benutzer bei der Auswahl dieser Zahlungsart sehen."
4590
 
4591
  # @ woocommerce-germanized
4592
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:665
4593
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:108
4594
  msgid "Payment method description that the customer will see on your checkout."
4595
  msgstr "Beschreibung der Zahlungsart, die Kunden auf ihrer Website sehen."
4596
 
4597
  # @ woocommerce-germanized
4598
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:666
4599
  msgid "The order amount will be debited directly from your bank account."
4600
  msgstr ""
4601
  "Der Gesamtbestellbetrag wird per SEPA-Lastschrift direkt von Ihrem Konto "
4602
  "abgebucht."
4603
 
4604
  # @ woocommerce-germanized
4605
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:670
4606
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:113
4607
  msgid "Instructions"
4608
  msgstr "Anweisungen"
4609
 
4610
  # @ woocommerce-germanized
4611
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:672
4612
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:115
4613
  msgid "Instructions that will be added to the thank you page and emails."
4614
  msgstr "Anweisung, die zur „Danke“-Seite und zu E-Mails hinzugefügt werden."
4615
 
4616
  # @ woocommerce-germanized
4617
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:677
4618
  msgid "Debtee"
4619
  msgstr "Gläubiger Informationen"
4620
 
4621
  # @ woocommerce-germanized
4622
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:679
4623
  msgid "Insert your company information."
4624
  msgstr "Fügen Sie hier die Informationen zu ihrem Unternehmen ein."
4625
 
4626
  # @ woocommerce-germanized
4627
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:681
4628
  msgid "Company Inc, John Doe Street, New York"
4629
  msgstr "Musterfirma GmbH, Musterstraße 12, 12203 Musterstadt"
4630
 
4631
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:687
4632
  msgid "Insert the bank account holder name."
4633
  msgstr "Fügen Sie hier den Namen des Kontoinhabers ein."
4634
 
4635
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:689
4636
  msgid "Company Inc"
4637
  msgstr "Muster GmbH"
4638
 
4639
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:695
4640
  msgid "Insert the bank account IBAN."
4641
  msgstr "Fügen Sie hier den IBAN ihres Kontos ein."
4642
 
4643
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:700
4644
  msgid "BIC"
4645
  msgstr "BIC"
4646
 
4647
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:702
4648
  msgid "Insert the bank account BIC."
4649
  msgstr "Fügen Sie hier den BIC ihres Kontos ein."
4650
 
4651
  # @ woocommerce-germanized
4652
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:707
4653
  msgid "Debtee identification number"
4654
  msgstr "Identifikationsnummer"
4655
 
4656
  # @ woocommerce-germanized
4657
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:709
4658
  #, php-format
4659
  msgid ""
4660
  "Insert your debtee indentification number. More information can be found <a "
@@ -4664,16 +4675,16 @@ msgstr ""
4664
  "Weitere Informationen zu dieser Nummer erhalten Sie <a href=\"%s\">hier</a>."
4665
 
4666
  # @ woocommerce-germanized
4667
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:713
4668
  msgid "Generate Mandate ID"
4669
  msgstr "Mandat-Referenz generieren"
4670
 
4671
  # @ woocommerce-germanized
4672
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:715
4673
  msgid "Automatically generate Mandate ID."
4674
  msgstr "Mandat-Referenznummer automatisch generieren."
4675
 
4676
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:716
4677
  msgid ""
4678
  "Automatically generate Mandate ID after order completion (based on Order ID)."
4679
  msgstr ""
@@ -4681,11 +4692,11 @@ msgstr ""
4681
  "basierend auf der Bestellnummer generieren."
4682
 
4683
  # @ woocommerce-germanized
4684
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:720
4685
  msgid "XML Pain Format"
4686
  msgstr "XML Pain Format"
4687
 
4688
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:722
4689
  msgid ""
4690
  "You may adjust the XML Export Pain Schema to your banks needs. Some banks "
4691
  "may require pain.001.003.03."
@@ -4694,11 +4705,11 @@ msgstr ""
4694
  "Einige Banken benötigen z.B. pain.001.003.03."
4695
 
4696
  # @ woocommerce-germanized
4697
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:726
4698
  msgid "Mandate ID Format"
4699
  msgstr "Mandat-Referenz Format"
4700
 
4701
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:728
4702
  msgid ""
4703
  "You may extend the Mandate ID format by adding a prefix and/or suffix. Use "
4704
  "{id} as placeholder to insert the automatically generated ID."
@@ -4708,12 +4719,12 @@ msgstr ""
4708
  "einzufügen."
4709
 
4710
  # @ woocommerce-germanized
4711
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:732
4712
  msgid "Mandate Text"
4713
  msgstr "Lastschriftmandat"
4714
 
4715
  # @ woocommerce-germanized
4716
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:734
4717
  msgid ""
4718
  "This text will be populated with live order/checkout data. Will be used as "
4719
  "preview direct debit mandate and as email template text."
@@ -4724,29 +4735,29 @@ msgstr ""
4724
  "Verfügung gestellt."
4725
 
4726
  # @ woocommerce-germanized
4727
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:740
4728
  msgid "Checkbox"
4729
  msgstr "Checkbox"
4730
 
4731
  # @ woocommerce-germanized
4732
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:741
4733
  msgid "Enable \"agree to SEPA mandate\" checkbox"
4734
  msgstr "Aktivieren Sie die Checkbox zur Bestätigung des Lastschriftmandates."
4735
 
4736
  # @ woocommerce-germanized
4737
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:743
4738
  msgid "Enable a checkbox linking to a SEPA direct debit mandate preview."
4739
  msgstr ""
4740
  "Aktivieren Sie eine Checkbox, die zu einer Vorschau des Lastschrift-Mandats "
4741
  "führt."
4742
 
4743
  # @ woocommerce-germanized
4744
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:747
4745
  msgid "Checkbox label"
4746
  msgstr "Checkbox Text"
4747
 
4748
  # @ woocommerce-germanized
4749
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:749
4750
  msgid ""
4751
  "Customize the checkbox label. Use {link}link name{/link} to insert the "
4752
  "preview link."
@@ -4754,17 +4765,17 @@ msgstr ""
4754
  "Passt den Checkbox Text an. Verwenden Sie {link}SEPA Lastschriftmandat{/"
4755
  "link} um auf die Vorschau zu verlinken."
4756
 
4757
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:754
4758
  msgid "Enable pre-notification"
4759
  msgstr "Vorankündigung aktivieren"
4760
 
4761
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:755
4762
  msgid "Insert pre-notification text within the order confirmation email."
4763
  msgstr ""
4764
  "Fügt einen Standard-Text zur Vorankündigung des SEPA-Einzugs in die "
4765
  "Bestellbestätigung ein."
4766
 
4767
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:757
4768
  msgid ""
4769
  "This option inserts a standard text containing a pre-notification for the "
4770
  "customer."
@@ -4773,11 +4784,11 @@ msgstr ""
4773
  "die Bestellbestätigung ein. In der Ankündigung wird u.a. ein konkreter "
4774
  "Fälligkeitstermin genannt."
4775
 
4776
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:761
4777
  msgid "Debit days"
4778
  msgstr "Fälligkeitstage"
4779
 
4780
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:763
4781
  msgid ""
4782
  "This option is used to calculate the debit date and is added to the order "
4783
  "date."
@@ -4787,15 +4798,15 @@ msgstr ""
4787
  "hier eingestellten Anzahl Tage."
4788
 
4789
  # @ woocommerce-germanized
4790
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:767
4791
  msgid "Mask IBAN"
4792
  msgstr "IBAN maskieren"
4793
 
4794
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:768
4795
  msgid "Mask the IBAN within emails."
4796
  msgstr "IBAN in E-Mails maskieren."
4797
 
4798
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:770
4799
  msgid ""
4800
  "This will lead to masked IBANs within emails (replaced by *). All but last 4 "
4801
  "digits will be masked."
@@ -4803,15 +4814,15 @@ msgstr ""
4803
  "Der IBAN wird in E-Mails (abgesehen von den letzten 4 Stellen) mit * "
4804
  "maskiert."
4805
 
4806
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:779
4807
  msgid "Remember"
4808
  msgstr "Bankdaten merken\t"
4809
 
4810
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:780
4811
  msgid "Remember account data for returning customers."
4812
  msgstr "Bankverbindung für registrierte Kunden speichern."
4813
 
4814
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:782
4815
  msgid "Save account data as user meta if user has/creates a customer account."
4816
  msgstr ""
4817
  "Speichert die Bankverbindung für registrierte Kunden in der user_meta "
@@ -4819,32 +4830,32 @@ msgstr ""
4819
  "eigenständig aus."
4820
 
4821
  # @ woocommerce-germanized
4822
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:865
4823
  msgid "Please insert your SEPA account data."
4824
  msgstr "Bitte fügen Sie Ihre SEPA Kontoinformationen ein."
4825
 
4826
  # @ woocommerce-germanized
4827
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:874
4828
  msgid "Your IBAN seems to be invalid."
4829
  msgstr "Ihr IBAN scheint nicht gültig zu sein."
4830
 
4831
  # @ woocommerce-germanized
4832
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:876
4833
  msgid "Your IBAN's country code doesn’t match with your billing country."
4834
  msgstr "Der Ländercode des IBANs stimmt nicht mit dem Rechnungsland überein."
4835
 
4836
  # @ woocommerce-germanized
4837
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:881
4838
  msgid "Your BIC seems to be invalid."
4839
  msgstr "Ihr BIC/SWIFT scheint nicht gültig zu sein."
4840
 
4841
  # @ woocommerce-germanized
4842
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:925
4843
  msgid "is invalid"
4844
  msgstr "ist ungültig"
4845
 
4846
  # @ woocommerce-germanized
4847
- #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:962
4848
  msgid "Awaiting Direct Debit Payment"
4849
  msgstr "Zahlung per Lastschrift ausstehend"
4850
 
@@ -4908,7 +4919,7 @@ msgstr ""
4908
  # @ woocommerce-germanized
4909
  # @ woocommerce
4910
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:64
4911
- #: woocommerce-germanized.php:661
4912
  msgid "Settings"
4913
  msgstr "Einstellungen"
4914
 
@@ -6020,23 +6031,23 @@ msgid "Title"
6020
  msgstr "Anrede"
6021
 
6022
  # @ woocommerce-germanized
6023
- #: includes/wc-gzd-core-functions.php:168
6024
  msgid "Data Security"
6025
  msgstr "Datenschutzbelehrung"
6026
 
6027
  # @ woocommerce-germanized
6028
- #: includes/wc-gzd-template-functions.php:141
6029
  #: templates/checkout/edit-data-notice.php:16
6030
  msgid "Edit Order"
6031
  msgstr "Bestellung bearbeiten"
6032
 
6033
  # @ woocommerce-germanized
6034
- #: includes/wc-gzd-template-functions.php:152
6035
  msgid "Choose a Payment Gateway"
6036
  msgstr "Zahlungsart auswählen"
6037
 
6038
  # @ woocommerce
6039
- #: includes/wc-gzd-template-functions.php:300
6040
  msgid "Place order"
6041
  msgstr "Jetzt kaufen"
6042
 
@@ -6266,7 +6277,7 @@ msgctxt "trusted-shops"
6266
  msgid "cancel review reminder"
6267
  msgstr "von der Bewertungserinnerung abmelden"
6268
 
6269
- #: woocommerce-germanized.php:768
6270
  msgid "Pease wait while we are trying to redirect you to the payment provider."
6271
  msgstr "Einen Moment - wir versuchen Sie zum Zahlungsanbieter weiterzuleiten."
6272
 
2
  msgstr ""
3
  "Project-Id-Version: WooCommerce Germanized v1.5.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-07-12 15:15+0200\n"
6
+ "PO-Revision-Date: 2019-07-22 15:29+0200\n"
7
  "Last-Translator: holzhannes <holzhannes@posteo.de>\n"
8
  "Language-Team: \n"
9
  "Language: de_DE\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Generator: Poedit 2.2.3\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
93
  msgstr "l"
94
 
95
  # @ woocommerce-germanized
96
+ #: includes/abstracts/abstract-wc-gzd-product.php:353
97
+ #: includes/abstracts/abstract-wc-gzd-product.php:363
98
+ #: includes/wc-gzd-core-functions.php:282
99
+ #: includes/wc-gzd-template-functions.php:520 woocommerce-germanized.php:942
100
  msgid "incl. VAT"
101
  msgstr "inkl. MwSt."
102
 
103
  # @ woocommerce-germanized
104
+ #: includes/abstracts/abstract-wc-gzd-product.php:353
105
  msgid "excl. VAT"
106
  msgstr "exkl. MwSt."
107
 
108
  # @ woocommerce-germanized
109
+ #: includes/abstracts/abstract-wc-gzd-product.php:355
110
+ #: includes/wc-gzd-core-functions.php:282 woocommerce-germanized.php:942
111
  #, php-format
112
  msgid "incl. %s%% VAT"
113
+ msgstr "inkl. %s %% MwSt."
114
 
115
  # @ woocommerce-germanized
116
+ #: includes/abstracts/abstract-wc-gzd-product.php:355
117
  #, php-format
118
  msgid "excl. %s%% VAT"
119
+ msgstr "exkl. %s %% MwSt."
120
 
121
  # @ woocommerce-germanized
122
  #: includes/admin/class-wc-gzd-admin-customer.php:47
252
 
253
  #: includes/admin/class-wc-gzd-admin-legal-checkboxes.php:101
254
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
255
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:124
256
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:774
257
  #: includes/class-wc-gzd-legal-checkbox-manager.php:122
258
  msgid "Service"
366
  #: includes/admin/class-wc-gzd-admin-status.php:38
367
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
368
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:233
369
+ #: includes/wc-gzd-core-functions.php:179
370
  msgid "Terms & Conditions"
371
  msgstr "AGB"
372
 
380
  #: includes/admin/class-wc-gzd-admin-status.php:40
381
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:164
382
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:255
383
+ #: includes/wc-gzd-core-functions.php:181
384
  msgid "Imprint"
385
  msgstr "Impressum"
386
 
392
  # @ woocommerce-germanized
393
  #: includes/admin/class-wc-gzd-admin-status.php:42
394
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:277
395
+ #: includes/wc-gzd-core-functions.php:186
396
  msgid "Payment Methods"
397
  msgstr "Zahlungarten"
398
 
412
  msgid "Go to Germanized Settings"
413
  msgstr "Germanized Einstellungen"
414
 
415
+ #: includes/admin/class-wc-gzd-admin.php:112
416
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:203
417
  msgid "Yes"
418
  msgstr "Ja"
419
 
420
+ #: includes/admin/class-wc-gzd-admin.php:112
421
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:203
422
  msgid "No"
423
  msgstr "Nein"
424
 
425
+ #: includes/admin/class-wc-gzd-admin.php:160
426
+ msgid "Paid for order notification manually sent to customer."
427
+ msgstr "Bestellung bezahlt manuell an den Kunden versendet."
428
+
429
+ #: includes/admin/class-wc-gzd-admin.php:175
430
  msgid "Order confirmation manually sent to customer."
431
  msgstr "Bestellbestätigung manuell an den Kunden versendet."
432
 
433
  # @ woocommerce-germanized
434
+ #: includes/admin/class-wc-gzd-admin.php:181
435
  msgid "Resend order confirmation"
436
  msgstr "Bestellbestätigung erneut versenden"
437
 
438
  # @ woocommerce-germanized
439
+ #: includes/admin/class-wc-gzd-admin.php:182
440
+ msgid "Send paid for order notification"
441
+ msgstr "Bestellung bezahlt manuell versenden"
442
+
443
+ # @ woocommerce-germanized
444
+ #: includes/admin/class-wc-gzd-admin.php:192
445
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:25
446
  #: includes/admin/views/html-page-status-germanized.php:22
447
  msgid "Germanized"
448
  msgstr "Germanized"
449
 
450
+ #: includes/admin/class-wc-gzd-admin.php:203
451
  msgid "Parcel Delivery Data Transfer:"
452
  msgstr "Paketdienstleister Datenweitergabe:"
453
 
454
+ #: includes/admin/class-wc-gzd-admin.php:204
455
  msgid "allowed"
456
  msgstr "akzeptiert"
457
 
458
+ #: includes/admin/class-wc-gzd-admin.php:204
459
  msgid "not allowed"
460
  msgstr "nicht akzeptiert"
461
 
462
  # @ woocommerce-germanized
463
+ #: includes/admin/class-wc-gzd-admin.php:293
464
  msgid "Optional Email Content"
465
  msgstr "Optionaler E-Mail Inhalt"
466
 
467
  # @ woocommerce-germanized
468
+ #: includes/admin/class-wc-gzd-admin.php:302
469
  msgid "Add content which will be replacing default page content within emails."
470
  msgstr ""
471
  "Füllen Sie dieses Feld aus um einen abweichenden E-Mail Anhangstext für "
472
  "diese Seite zu bestimmen."
473
 
474
  # @ woocommerce-germanized
475
+ #: includes/admin/class-wc-gzd-admin.php:313
476
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:153
477
  msgid "Optional Mini Description"
478
  msgstr "Warenkorb Kurzbeschreibung"
479
 
480
  # @ woocommerce-germanized
481
+ #: includes/admin/class-wc-gzd-admin.php:332
482
  msgid ""
483
  "This content will be shown as short product description within checkout and "
484
  "emails."
487
  "Produkt Kurzbeschreibung angezeigt."
488
 
489
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:45
490
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:125
491
  msgid "Service products do not sell physical products."
492
  msgstr "Dienstleistungen werden nicht in physikalischer Form verkauft."
493
 
494
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:85
495
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
496
  msgid "Sale Label"
497
  msgstr "Regulärer Preishinweis"
498
 
503
  msgstr "Gleiche wie übergeordnet"
504
 
505
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:95
506
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
507
  msgid "Sale Regular Label"
508
  msgstr "Neuer Preis Hinweis"
509
 
510
  # @ woocommerce-germanized
511
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:113
512
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:153
513
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:704
514
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:867
515
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:916
532
 
533
  # @ woocommerce-germanized
534
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:117
535
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:173
536
  msgid "Calculation"
537
  msgstr "Berechnung"
538
 
566
 
567
  # @ woocommerce-germanized
568
  #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php:138
569
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:224
570
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1091
571
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1124
572
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1157
581
  msgid "Same as parent"
582
  msgstr "Gleiche wie übergeordnet"
583
 
584
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:132
585
  msgid "Diff. Taxation"
586
  msgstr "Differenzbesteuerung"
587
 
588
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:133
589
  msgid "Product applies to differential taxation based on §25a UStG."
590
  msgstr "Produkt ist differenzbesteuert nach §25a UStG."
591
 
592
  # @ woocommerce-germanized
593
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
594
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
595
  msgid "Select Price Label"
596
  msgstr "Preishinweis auswählen"
597
 
598
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:149
599
  msgid ""
600
  "If the product is on sale you may want to show a price label right before "
601
  "outputting the old price to inform the customer."
605
  "Preis). Mit diesem Hinweis können Sie genau festlegen, um welchen Preis es "
606
  "sich dabei handelte (z.B. UVP)."
607
 
608
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:150
609
  msgid ""
610
  "If the product is on sale you may want to show a price label right before "
611
  "outputting the new price to inform the customer."
615
  "neuer Preis)."
616
 
617
  # @ woocommerce-germanized
618
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
619
  #: includes/api/class-wc-gzd-rest-products-controller.php:113
620
  #: includes/class-wc-gzd-post-types.php:66
621
  msgid "Unit"
622
  msgstr "Einheit"
623
 
624
  # @ woocommerce-germanized
625
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
626
  msgid "Select unit"
627
  msgstr "Einheit auswählen"
628
 
629
  # @ woocommerce-germanized
630
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:152
631
  msgid "Needed if selling on a per unit basis"
632
  msgstr "Notwendig falls auf pro-Einheit-Basis verkauft werden soll"
633
 
634
  # @ woocommerce-germanized
635
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:153
636
  msgid "Number of units included per default product price. Example: 1000 ml."
637
  msgstr ""
638
  "Anzahl der Produkteinheiten auf Basis des Produktpreises. Beispiel: 1000 ml."
639
 
640
  # @ woocommerce-germanized
641
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:154
642
  msgid "Base Price Units"
643
  msgstr "Grundpreiseinheiten"
644
 
645
  # @ woocommerce-germanized
646
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:154
647
  msgid ""
648
  "Base price units. Example base price: 0,99 € / 100 ml. Insert 100 as base "
649
  "price unit amount."
652
  "hier 100 als Grundpreiseinheiten ein."
653
 
654
  # @ woocommerce-germanized
655
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:173
656
  msgid "Calculate base prices automatically."
657
  msgstr "Grundpreis automatisch berechnen."
658
 
659
  # @ woocommerce-germanized
660
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:175
661
  msgid "Regular Base Price"
662
  msgstr "Regulärer Grundpreis"
663
 
664
  # @ woocommerce-germanized
665
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:176
666
  msgid "Sale Base Price"
667
  msgstr "Angebotsgrundpreis"
668
 
669
  # @ woocommerce-germanized
670
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:186
671
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:228
672
  msgid "Search for a delivery time&hellip;"
673
  msgstr "Lieferzeit suchen&hellip;"
674
 
675
  # @ woocommerce-germanized
676
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:237
677
  msgid "Free shipping?"
678
  msgstr "Versand kostenlos?"
679
 
680
  # @ woocommerce-germanized
681
+ #: includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php:237
682
  msgid "This option disables the \"plus shipping costs\" notice on product page"
683
  msgstr ""
684
  "Deaktiviert den Hinweis \"zzgl. Versandkosten\". Ohne Auswirkungen auf die "
736
  # @ woocommerce-germanized
737
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:121
738
  msgid "Legal Checkboxes"
739
+ msgstr "Checkboxen"
740
 
741
  # @ woocommerce-germanized
742
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:122
1099
  "Passen Sie hier, falls notwending, den Kleinunternehmer Hinweistext an."
1100
 
1101
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:392
1102
+ #: includes/wc-gzd-core-functions.php:228
1103
  msgid ""
1104
  "Value added tax is not collected, as small businesses according to §19 (1) "
1105
  "UStG."
1234
 
1235
  # @ woocommerce-germanized
1236
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:484
1237
+ #: includes/wc-gzd-core-functions.php:187
1238
  msgid "Shipping Costs"
1239
  msgstr "Versandkosten"
1240
 
1430
 
1431
  # @ woocommerce-germanized
1432
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:580
1433
+ #: includes/wc-gzd-core-functions.php:180
1434
  msgid "Right of Recission"
1435
  msgstr "Widerrufsrecht"
1436
 
1848
  "Platzhalter für den höchsten Preis."
1849
 
1850
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1038
1851
+ #: includes/wc-gzd-core-functions.php:539
1852
  msgid "{min_price} &ndash; {max_price}"
1853
  msgstr "{min_price} &ndash; {max_price}"
1854
 
1920
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1165
1921
  #: includes/admin/views/html-admin-page-checkboxes.php:17
1922
  #: includes/class-wc-gzd-legal-checkbox.php:735
1923
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:664
1924
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:106
1925
  msgid "Description"
1926
  msgstr "Beschreibung"
1981
  "mit der Option \"Auswahl von Versandarten im Checkout deaktivieren\"."
1982
 
1983
  #: includes/admin/settings/class-wc-gzd-settings-germanized.php:1200
1984
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:373
1985
  msgid "Parcel Shop Finder"
1986
  msgstr "Paketshop finden"
1987
 
2916
  msgstr "jetzt upgraden"
2917
 
2918
  #: includes/api/class-wc-gzd-rest-customers-controller.php:151
2919
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:172
2920
  msgid "Send to DHL Parcel Shop?"
2921
  msgstr "An DHL Paketshop oder Packstation senden?"
2922
 
2923
  #: includes/api/class-wc-gzd-rest-customers-controller.php:157
2924
  #: includes/api/class-wc-gzd-rest-orders-controller.php:181
2925
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:184
2926
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:210
2927
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:223
2928
  #: includes/class-wc-gzd-privacy.php:58 includes/class-wc-gzd-privacy.php:82
2929
  #: includes/class-wc-gzd-privacy.php:120
2930
  msgid "Postnumber"
2934
  #: includes/api/class-wc-gzd-rest-customers-controller.php:163
2935
  #: includes/api/class-wc-gzd-rest-orders-controller.php:194
2936
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:30
2937
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:660
2938
  #: includes/gateways/direct-debit/views/html-export.php:27
2939
  msgid "Direct Debit"
2940
  msgstr "Lastschrift"
2946
  #: includes/class-wc-gzd-privacy.php:123
2947
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:108
2948
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:450
2949
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:686
2950
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:827
2951
  msgid "Account Holder"
2952
  msgstr "Kontoinhaber"
2953
 
2958
  #: includes/class-wc-gzd-privacy.php:124
2959
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:115
2960
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:451
2961
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:694
2962
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:831
2963
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:924
2964
  msgid "IBAN"
2965
  msgstr "IBAN"
2966
 
2971
  #: includes/class-wc-gzd-privacy.php:125
2972
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:122
2973
  #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:452
2974
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:835
2975
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:925
2976
  msgid "BIC/SWIFT"
2977
  msgstr "BIC/SWIFT"
2978
 
2979
  #: includes/api/class-wc-gzd-rest-orders-controller.php:175
2980
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:260
2981
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:296
2982
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:351
2983
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:352
2984
  msgid "Parcel Shop"
2985
  msgstr "Shop/Packstation"
2986
 
3203
  #: includes/class-wc-gzd-customer-helper.php:108
3204
  #: includes/class-wc-gzd-customer-helper.php:116
3205
  #: includes/class-wc-gzd-revocation.php:41
3206
+ #: includes/wc-gzd-core-functions.php:323
3207
  msgid "Mr."
3208
  msgstr "Herr"
3209
 
3214
  #: includes/class-wc-gzd-customer-helper.php:108
3215
  #: includes/class-wc-gzd-customer-helper.php:116
3216
  #: includes/class-wc-gzd-revocation.php:42
3217
+ #: includes/wc-gzd-core-functions.php:323
3218
+ #: includes/wc-gzd-core-functions.php:332
3219
  msgid "Ms."
3220
  msgstr "Frau"
3221
 
3237
 
3238
  #: includes/class-wc-gzd-customer-helper.php:94
3239
  #: includes/class-wc-gzd-customer-helper.php:188
3240
+ #: includes/class-wc-gzd-customer-helper.php:268
3241
  msgid ""
3242
  "Please activate your account through clicking on the activation link "
3243
  "received via email."
3256
  "Bitte erstellen Sie ein Kundenkonto oder loggen Sie sich ein, bevor Sie zur "
3257
  "Kasse gehen"
3258
 
3259
+ #: includes/class-wc-gzd-customer-helper.php:291
3260
  msgid ""
3261
  "This activation code has expired. We have sent you a new activation code via "
3262
  "e-mail."
3265
  "Code per E-Mail geschickt."
3266
 
3267
  # @ woocommerce-germanized
3268
+ #: includes/class-wc-gzd-customer-helper.php:293
3269
  msgid "Sorry, but this activation code cannot be found."
3270
  msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
3271
 
3272
  # @ woocommerce-germanized
3273
+ #: includes/class-wc-gzd-customer-helper.php:297
3274
  msgid "Thank you. You have successfully activated your account."
3275
  msgstr "Vielen Dank. Ihr Benutzerkonto wurde erfolgreich aktiviert."
3276
 
3277
+ #: includes/class-wc-gzd-customer-helper.php:409
3278
  msgid "Expired activation key"
3279
  msgstr "Abgelaufener Aktivierungscode"
3280
 
3281
+ #: includes/class-wc-gzd-customer-helper.php:414
3282
  msgid "Invalid activation key"
3283
  msgstr "Aktivierungscode ungültig"
3284
 
3285
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:201
3286
  msgid "DHL Parcel Shop?"
3287
  msgstr "DHL Paketshop/Packstation?"
3288
 
3289
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:204
3290
  msgid "Select whether delivery to parcel shop should be enabled."
3291
  msgstr ""
3292
  "Wählen Sie aus ob die Lieferung an DHL Paketshops bzw. Packstationen "
3293
  "aktiviert werden soll."
3294
 
3295
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:212
3296
  msgid ""
3297
  "In case delivery to parcel shop is enabled please fill in the corresponding "
3298
  "DHL post number."
3300
  "Wenn die Lieferung an eine DHL Packstation aktiviert wurde, tragen Sie bitte "
3301
  "die PostNummer ein."
3302
 
3303
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:317
3304
  msgid "Your PostNumber should contain numbers only"
3305
  msgstr "Ihre PostNummer sollte nur aus Zahlen bestehen."
3306
 
3307
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:323
3308
+ #: includes/class-wc-gzd-dhl-parcel-shops.php:358
3309
  #, php-format
3310
  msgid "Parcel Shop Delivery is only supported in: %s."
3311
  msgstr ""
3453
  msgstr "Danke, dass Sie ein Konto bei %s erstellt haben."
3454
 
3455
  # @ woocommerce-germanized
3456
+ #: includes/class-wc-gzd-emails.php:715
3457
  msgctxt "revocation-form"
3458
  msgid "Forward your Revocation online"
3459
  msgstr "Widerruf online erklären"
3693
 
3694
  # @ woocommerce-germanized
3695
  #: includes/class-wc-gzd-legal-checkbox-manager.php:173
3696
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:751
3697
  msgid "I hereby agree to the {link}direct debit mandate{/link}."
3698
  msgstr "Hiermit erteile ich das {link}SEPA Lastschriftmandat{/link}."
3699
 
3836
  # @ woocommerce-germanized
3837
  #: includes/class-wc-gzd-payment-gateways.php:98
3838
  #: includes/wc-gzd-order-functions.php:20
3839
+ #: includes/wc-gzd-template-functions.php:454
3840
  #, php-format
3841
  msgid "Plus %s forwarding fee (charged by the transport agent)"
3842
  msgstr "zzgl. %s Übermittlungsentgelt (direkt an den Zusteller)"
4058
  msgid "Visible during checkout"
4059
  msgstr "Im Checkout anzeigen"
4060
 
4061
+ #: includes/class-wc-gzd-product-grouped.php:227
4062
+ #: includes/class-wc-gzd-product-grouped.php:232
4063
  #: includes/class-wc-gzd-product-variable.php:132
4064
  #: includes/class-wc-gzd-product-variable.php:137
4065
  #, php-format
4567
  "%s ein."
4568
 
4569
  # @ woocommerce-germanized
4570
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:571
4571
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:593
4572
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:617
4573
  msgid "a single payment"
4574
  msgstr "eine einmalige Zahlung"
4575
 
4576
  # @ woocommerce-germanized
4577
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:651
4578
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:93
4579
  msgid "Enable/Disable"
4580
  msgstr "Aktivieren/Deaktivieren"
4581
 
4582
  # @ woocommerce-germanized
4583
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:653
4584
  msgid "Enable Direct Debit Payment"
4585
  msgstr "Bezahlung per Lastschrift aktivieren"
4586
 
4587
  # @ woocommerce-germanized
4588
  # @ woocommerce
4589
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:657
4590
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:99
4591
  msgctxt "gateway"
4592
  msgid "Title"
4593
  msgstr "Bezeichnung"
4594
 
4595
  # @ woocommerce-germanized
4596
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:659
4597
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:101
4598
  msgid "This controls the title which the user sees during checkout."
4599
  msgstr ""
4600
  "Beschreibungstext, den Benutzer bei der Auswahl dieser Zahlungsart sehen."
4601
 
4602
  # @ woocommerce-germanized
4603
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:666
4604
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:108
4605
  msgid "Payment method description that the customer will see on your checkout."
4606
  msgstr "Beschreibung der Zahlungsart, die Kunden auf ihrer Website sehen."
4607
 
4608
  # @ woocommerce-germanized
4609
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:667
4610
  msgid "The order amount will be debited directly from your bank account."
4611
  msgstr ""
4612
  "Der Gesamtbestellbetrag wird per SEPA-Lastschrift direkt von Ihrem Konto "
4613
  "abgebucht."
4614
 
4615
  # @ woocommerce-germanized
4616
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:671
4617
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:113
4618
  msgid "Instructions"
4619
  msgstr "Anweisungen"
4620
 
4621
  # @ woocommerce-germanized
4622
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:673
4623
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:115
4624
  msgid "Instructions that will be added to the thank you page and emails."
4625
  msgstr "Anweisung, die zur „Danke“-Seite und zu E-Mails hinzugefügt werden."
4626
 
4627
  # @ woocommerce-germanized
4628
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:678
4629
  msgid "Debtee"
4630
  msgstr "Gläubiger Informationen"
4631
 
4632
  # @ woocommerce-germanized
4633
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:680
4634
  msgid "Insert your company information."
4635
  msgstr "Fügen Sie hier die Informationen zu ihrem Unternehmen ein."
4636
 
4637
  # @ woocommerce-germanized
4638
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:682
4639
  msgid "Company Inc, John Doe Street, New York"
4640
  msgstr "Musterfirma GmbH, Musterstraße 12, 12203 Musterstadt"
4641
 
4642
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:688
4643
  msgid "Insert the bank account holder name."
4644
  msgstr "Fügen Sie hier den Namen des Kontoinhabers ein."
4645
 
4646
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:690
4647
  msgid "Company Inc"
4648
  msgstr "Muster GmbH"
4649
 
4650
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:696
4651
  msgid "Insert the bank account IBAN."
4652
  msgstr "Fügen Sie hier den IBAN ihres Kontos ein."
4653
 
4654
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:701
4655
  msgid "BIC"
4656
  msgstr "BIC"
4657
 
4658
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:703
4659
  msgid "Insert the bank account BIC."
4660
  msgstr "Fügen Sie hier den BIC ihres Kontos ein."
4661
 
4662
  # @ woocommerce-germanized
4663
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:708
4664
  msgid "Debtee identification number"
4665
  msgstr "Identifikationsnummer"
4666
 
4667
  # @ woocommerce-germanized
4668
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:710
4669
  #, php-format
4670
  msgid ""
4671
  "Insert your debtee indentification number. More information can be found <a "
4675
  "Weitere Informationen zu dieser Nummer erhalten Sie <a href=\"%s\">hier</a>."
4676
 
4677
  # @ woocommerce-germanized
4678
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:714
4679
  msgid "Generate Mandate ID"
4680
  msgstr "Mandat-Referenz generieren"
4681
 
4682
  # @ woocommerce-germanized
4683
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:716
4684
  msgid "Automatically generate Mandate ID."
4685
  msgstr "Mandat-Referenznummer automatisch generieren."
4686
 
4687
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:717
4688
  msgid ""
4689
  "Automatically generate Mandate ID after order completion (based on Order ID)."
4690
  msgstr ""
4692
  "basierend auf der Bestellnummer generieren."
4693
 
4694
  # @ woocommerce-germanized
4695
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:721
4696
  msgid "XML Pain Format"
4697
  msgstr "XML Pain Format"
4698
 
4699
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:723
4700
  msgid ""
4701
  "You may adjust the XML Export Pain Schema to your banks needs. Some banks "
4702
  "may require pain.001.003.03."
4705
  "Einige Banken benötigen z.B. pain.001.003.03."
4706
 
4707
  # @ woocommerce-germanized
4708
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:727
4709
  msgid "Mandate ID Format"
4710
  msgstr "Mandat-Referenz Format"
4711
 
4712
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:729
4713
  msgid ""
4714
  "You may extend the Mandate ID format by adding a prefix and/or suffix. Use "
4715
  "{id} as placeholder to insert the automatically generated ID."
4719
  "einzufügen."
4720
 
4721
  # @ woocommerce-germanized
4722
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:733
4723
  msgid "Mandate Text"
4724
  msgstr "Lastschriftmandat"
4725
 
4726
  # @ woocommerce-germanized
4727
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:735
4728
  msgid ""
4729
  "This text will be populated with live order/checkout data. Will be used as "
4730
  "preview direct debit mandate and as email template text."
4735
  "Verfügung gestellt."
4736
 
4737
  # @ woocommerce-germanized
4738
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:741
4739
  msgid "Checkbox"
4740
  msgstr "Checkbox"
4741
 
4742
  # @ woocommerce-germanized
4743
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:742
4744
  msgid "Enable \"agree to SEPA mandate\" checkbox"
4745
  msgstr "Aktivieren Sie die Checkbox zur Bestätigung des Lastschriftmandates."
4746
 
4747
  # @ woocommerce-germanized
4748
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:744
4749
  msgid "Enable a checkbox linking to a SEPA direct debit mandate preview."
4750
  msgstr ""
4751
  "Aktivieren Sie eine Checkbox, die zu einer Vorschau des Lastschrift-Mandats "
4752
  "führt."
4753
 
4754
  # @ woocommerce-germanized
4755
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:748
4756
  msgid "Checkbox label"
4757
  msgstr "Checkbox Text"
4758
 
4759
  # @ woocommerce-germanized
4760
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:750
4761
  msgid ""
4762
  "Customize the checkbox label. Use {link}link name{/link} to insert the "
4763
  "preview link."
4765
  "Passt den Checkbox Text an. Verwenden Sie {link}SEPA Lastschriftmandat{/"
4766
  "link} um auf die Vorschau zu verlinken."
4767
 
4768
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:755
4769
  msgid "Enable pre-notification"
4770
  msgstr "Vorankündigung aktivieren"
4771
 
4772
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:756
4773
  msgid "Insert pre-notification text within the order confirmation email."
4774
  msgstr ""
4775
  "Fügt einen Standard-Text zur Vorankündigung des SEPA-Einzugs in die "
4776
  "Bestellbestätigung ein."
4777
 
4778
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:758
4779
  msgid ""
4780
  "This option inserts a standard text containing a pre-notification for the "
4781
  "customer."
4784
  "die Bestellbestätigung ein. In der Ankündigung wird u.a. ein konkreter "
4785
  "Fälligkeitstermin genannt."
4786
 
4787
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:762
4788
  msgid "Debit days"
4789
  msgstr "Fälligkeitstage"
4790
 
4791
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:764
4792
  msgid ""
4793
  "This option is used to calculate the debit date and is added to the order "
4794
  "date."
4798
  "hier eingestellten Anzahl Tage."
4799
 
4800
  # @ woocommerce-germanized
4801
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:768
4802
  msgid "Mask IBAN"
4803
  msgstr "IBAN maskieren"
4804
 
4805
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:769
4806
  msgid "Mask the IBAN within emails."
4807
  msgstr "IBAN in E-Mails maskieren."
4808
 
4809
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:771
4810
  msgid ""
4811
  "This will lead to masked IBANs within emails (replaced by *). All but last 4 "
4812
  "digits will be masked."
4814
  "Der IBAN wird in E-Mails (abgesehen von den letzten 4 Stellen) mit * "
4815
  "maskiert."
4816
 
4817
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:780
4818
  msgid "Remember"
4819
  msgstr "Bankdaten merken\t"
4820
 
4821
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:781
4822
  msgid "Remember account data for returning customers."
4823
  msgstr "Bankverbindung für registrierte Kunden speichern."
4824
 
4825
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:783
4826
  msgid "Save account data as user meta if user has/creates a customer account."
4827
  msgstr ""
4828
  "Speichert die Bankverbindung für registrierte Kunden in der user_meta "
4830
  "eigenständig aus."
4831
 
4832
  # @ woocommerce-germanized
4833
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:866
4834
  msgid "Please insert your SEPA account data."
4835
  msgstr "Bitte fügen Sie Ihre SEPA Kontoinformationen ein."
4836
 
4837
  # @ woocommerce-germanized
4838
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:875
4839
  msgid "Your IBAN seems to be invalid."
4840
  msgstr "Ihr IBAN scheint nicht gültig zu sein."
4841
 
4842
  # @ woocommerce-germanized
4843
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:877
4844
  msgid "Your IBAN's country code doesn’t match with your billing country."
4845
  msgstr "Der Ländercode des IBANs stimmt nicht mit dem Rechnungsland überein."
4846
 
4847
  # @ woocommerce-germanized
4848
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:882
4849
  msgid "Your BIC seems to be invalid."
4850
  msgstr "Ihr BIC/SWIFT scheint nicht gültig zu sein."
4851
 
4852
  # @ woocommerce-germanized
4853
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:926
4854
  msgid "is invalid"
4855
  msgstr "ist ungültig"
4856
 
4857
  # @ woocommerce-germanized
4858
+ #: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:963
4859
  msgid "Awaiting Direct Debit Payment"
4860
  msgstr "Zahlung per Lastschrift ausstehend"
4861
 
4919
  # @ woocommerce-germanized
4920
  # @ woocommerce
4921
  #: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:64
4922
+ #: woocommerce-germanized.php:662
4923
  msgid "Settings"
4924
  msgstr "Einstellungen"
4925
 
6031
  msgstr "Anrede"
6032
 
6033
  # @ woocommerce-germanized
6034
+ #: includes/wc-gzd-core-functions.php:182
6035
  msgid "Data Security"
6036
  msgstr "Datenschutzbelehrung"
6037
 
6038
  # @ woocommerce-germanized
6039
+ #: includes/wc-gzd-template-functions.php:217
6040
  #: templates/checkout/edit-data-notice.php:16
6041
  msgid "Edit Order"
6042
  msgstr "Bestellung bearbeiten"
6043
 
6044
  # @ woocommerce-germanized
6045
+ #: includes/wc-gzd-template-functions.php:228
6046
  msgid "Choose a Payment Gateway"
6047
  msgstr "Zahlungsart auswählen"
6048
 
6049
  # @ woocommerce
6050
+ #: includes/wc-gzd-template-functions.php:376
6051
  msgid "Place order"
6052
  msgstr "Jetzt kaufen"
6053
 
6277
  msgid "cancel review reminder"
6278
  msgstr "von der Bewertungserinnerung abmelden"
6279
 
6280
+ #: woocommerce-germanized.php:769
6281
  msgid "Pease wait while we are trying to redirect you to the payment provider."
6282
  msgstr "Einen Moment - wir versuchen Sie zum Zahlungsanbieter weiterzuleiten."
6283
 
includes/abstracts/abstract-wc-gzd-compatibility-woocommerce-role-based-pricing.php CHANGED
@@ -8,84 +8,94 @@
8
  */
9
  abstract class WC_GZD_Compatibility_Woocommerce_Role_Based_Pricing extends WC_GZD_Compatibility {
10
 
11
- protected function hooks() {
12
- // Add filter to price output
13
- add_filter( 'woocommerce_get_price_html', array( $this, 'set_unit_price_product_filter' ), 200, 2 );
14
-
15
- // Filter seems to be removed due to low priority
16
- remove_filter( 'woocommerce_cart_item_price', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'cart_product_unit_price' ) );
17
- remove_filter( 'woocommerce_cart_item_subtotal', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'cart_subtotal_unit_price' ) );
18
-
19
- // Readd filter with higher priority
20
- add_filter( 'woocommerce_cart_item_price', 'wc_gzd_cart_product_unit_price', 500, 3 );
21
- add_filter( 'woocommerce_cart_item_subtotal', 'wc_gzd_cart_product_unit_price', 500, 3 );
22
-
23
- // Filters to recalculate unit price during cart/checkout
24
- add_action( 'woocommerce_before_mini_cart', array( $this, 'set_unit_price_filter' ), 10 );
25
- add_action( 'woocommerce_before_cart', array( $this, 'set_unit_price_filter' ), 10 );
26
- add_action( 'woocommerce_before_checkout_form', array( $this, 'set_unit_price_filter' ), 10 );
27
- add_action( 'woocommerce_gzd_review_order_before_cart_contents', array( $this, 'set_unit_price_filter' ), 10 );
28
-
29
- // Recalculate unit price before adding order item meta
30
- add_filter( 'woocommerce_gzd_order_item_unit_price', array( $this, 'unit_price_order_item' ), 10, 4 );
31
-
32
- // Support variable products
33
- add_filter( 'woocommerce_gzd_get_variation_unit_prices_hash', array( $this, 'variable_unit_prices_hash' ), 10, 1 );
34
- }
35
-
36
- public function load() {
37
- $this->hooks();
38
- }
39
-
40
- public function set_unit_price_product_filter( $html, $product ) {
41
- $this->set_unit_price_filter();
42
- return $html;
43
- }
44
-
45
- public function unit_price_order_item( $price, $gzd_product, $item, $order ) {
46
- $product_price = $order->get_item_subtotal( $item, true );
47
-
48
- $gzd_product->recalculate_unit_price( array(
49
- 'regular_price' => $product_price,
50
- 'price' => $product_price,
51
- ) );
52
-
53
- return $gzd_product->get_unit_html( false );
54
- }
55
-
56
- public function set_unit_price_filter() {
57
- add_action( 'woocommerce_gzd_before_get_unit_price', array( $this, 'calculate_unit_price' ), 10, 1 );
58
- // Adjust variable from-to unit prices
59
- add_action( 'woocommerce_gzd_before_get_variable_variation_unit_price', array( $this, 'calculate_unit_price' ), 10, 1 );
60
- }
61
-
62
- public function calculate_unit_price( $product ) {
63
- $product->recalculate_unit_price();
64
- }
65
-
66
- public function variable_unit_prices_hash( $price_hash ) {
67
- // Get a key based on role, since all rules use roles.
68
- $session_id = null;
69
-
70
- $roles = array();
71
- if ( is_user_logged_in() ) {
72
- $user = new WP_User( get_current_user_id() );
73
- if ( ! empty( $user->roles ) && is_array( $user->roles ) ) {
74
- foreach ( $user->roles as $role ) {
75
- $roles[ $role ] = $role;
76
- }
77
- }
78
- }
79
-
80
- if ( ! empty( $roles ) ) {
81
- $session_id = implode( '', $roles );
82
- } else {
83
- $session_id = 'norole';
84
- }
85
-
86
- $price_hash[] = $session_id;
87
-
88
- return $price_hash;
89
- }
 
 
 
 
 
 
 
 
 
 
90
 
91
  }
8
  */
9
  abstract class WC_GZD_Compatibility_Woocommerce_Role_Based_Pricing extends WC_GZD_Compatibility {
10
 
11
+ protected function hooks() {
12
+ // Add filter to price output
13
+ add_filter( 'woocommerce_get_price_html', array( $this, 'set_unit_price_product_filter' ), 200, 2 );
14
+
15
+ // Filters to recalculate unit price during cart/checkout
16
+ add_action( 'woocommerce_before_mini_cart', array( $this, 'set_unit_price_filter' ), 10 );
17
+ add_action( 'woocommerce_before_cart', array( $this, 'set_unit_price_filter' ), 10 );
18
+ add_action( 'woocommerce_before_checkout_form', array( $this, 'set_unit_price_filter' ), 10 );
19
+ add_action( 'woocommerce_gzd_review_order_before_cart_contents', array( $this, 'set_unit_price_filter' ), 10 );
20
+
21
+ // Recalculate unit price before adding order item meta
22
+ add_filter( 'woocommerce_gzd_order_item_unit_price', array( $this, 'unit_price_order_item' ), 10, 4 );
23
+
24
+ // Support variable products
25
+ add_filter( 'woocommerce_gzd_get_variation_unit_prices_hash', array( $this, 'variable_unit_prices_hash' ), 10, 1 );
26
+
27
+ $this->adjust_cart_hooks();
28
+
29
+ /**
30
+ * Make sure to re-adjust cart hooks after mini cart content - otherwise duplicate entries show up as
31
+ * Germanized adds hooks on `woocommerce_before_mini_cart_contents`.
32
+ */
33
+ add_action( 'woocommerce_before_mini_cart_contents', array( $this, 'adjust_cart_hooks' ), 40 );
34
+ }
35
+
36
+ public function adjust_cart_hooks() {
37
+ // Filter seems to be removed due to low priority
38
+ remove_filter( 'woocommerce_cart_item_price', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'cart_product_unit_price' ) );
39
+ remove_filter( 'woocommerce_cart_item_subtotal', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'cart_subtotal_unit_price' ) );
40
+
41
+ // Readd filter with higher priority
42
+ add_filter( 'woocommerce_cart_item_price', 'wc_gzd_cart_product_unit_price', 500, 3 );
43
+ add_filter( 'woocommerce_cart_item_subtotal', 'wc_gzd_cart_product_unit_price', 500, 3 );
44
+ }
45
+
46
+ public function load() {
47
+ $this->hooks();
48
+ }
49
+
50
+ public function set_unit_price_product_filter( $html, $product ) {
51
+ $this->set_unit_price_filter();
52
+ return $html;
53
+ }
54
+
55
+ public function unit_price_order_item( $price, $gzd_product, $item, $order ) {
56
+ $product_price = $order->get_item_subtotal( $item, true );
57
+
58
+ $gzd_product->recalculate_unit_price( array(
59
+ 'regular_price' => $product_price,
60
+ 'price' => $product_price,
61
+ ) );
62
+
63
+ return $gzd_product->get_unit_html( false );
64
+ }
65
+
66
+ public function set_unit_price_filter() {
67
+ add_action( 'woocommerce_gzd_before_get_unit_price', array( $this, 'calculate_unit_price' ), 10, 1 );
68
+ // Adjust variable from-to unit prices
69
+ add_action( 'woocommerce_gzd_before_get_variable_variation_unit_price', array( $this, 'calculate_unit_price' ), 10, 1 );
70
+ }
71
+
72
+ public function calculate_unit_price( $product ) {
73
+ $product->recalculate_unit_price();
74
+ }
75
+
76
+ public function variable_unit_prices_hash( $price_hash ) {
77
+ // Get a key based on role, since all rules use roles.
78
+ $session_id = null;
79
+
80
+ $roles = array();
81
+ if ( is_user_logged_in() ) {
82
+ $user = new WP_User( get_current_user_id() );
83
+ if ( ! empty( $user->roles ) && is_array( $user->roles ) ) {
84
+ foreach ( $user->roles as $role ) {
85
+ $roles[ $role ] = $role;
86
+ }
87
+ }
88
+ }
89
+
90
+ if ( ! empty( $roles ) ) {
91
+ $session_id = implode( '', $roles );
92
+ } else {
93
+ $session_id = 'norole';
94
+ }
95
+
96
+ $price_hash[] = $session_id;
97
+
98
+ return $price_hash;
99
+ }
100
 
101
  }
includes/abstracts/abstract-wc-gzd-product.php CHANGED
@@ -139,6 +139,15 @@ class WC_GZD_Product {
139
  $this->unit_price_sale = $prices['sale'];
140
  $this->unit_price = $prices['unit'];
141
 
 
 
 
 
 
 
 
 
 
142
  do_action( 'woocommerce_gzd_recalculated_unit_price', $this );
143
  }
144
 
@@ -148,6 +157,14 @@ class WC_GZD_Product {
148
  * @return boolean|string
149
  */
150
  public function get_mini_desc() {
 
 
 
 
 
 
 
 
151
  $mini_desc = apply_filters( 'woocommerce_gzd_product_cart_description', $this->mini_desc, $this );
152
 
153
  if ( $mini_desc && ! empty( $mini_desc ) ) {
@@ -228,6 +245,13 @@ class WC_GZD_Product {
228
  foreach ( $attribute_values as $attribute_value ) {
229
  $value_name = esc_html( $attribute_value->name );
230
 
 
 
 
 
 
 
 
231
  if ( apply_filters( 'woocommerce_gzd_product_attribute_checkout_clickable', false ) && $attribute_taxonomy->attribute_public ) {
232
  $values[] = '<a href="' . esc_url( get_term_link( $attribute_value->term_id, $attribute->get_name() ) ) . '" rel="tag">' . $value_name . '</a>';
233
  } else {
@@ -255,6 +279,14 @@ class WC_GZD_Product {
255
  }
256
  }
257
 
 
 
 
 
 
 
 
 
258
  return apply_filters( 'woocommerce_gzd_product_checkout_attributes', $item_data, $this->child );
259
  }
260
 
@@ -280,6 +312,14 @@ class WC_GZD_Product {
280
  * @return boolean
281
  */
282
  public function is_virtual_vat_exception() {
 
 
 
 
 
 
 
 
283
  return apply_filters( 'woocommerce_gzd_product_virtual_vat_exception', ( ( get_option( 'woocommerce_gzd_enable_virtual_vat' ) === 'yes' ) && ( $this->is_downloadable() || $this->is_virtual() ) ? true : false ), $this );
284
  }
285
 
@@ -311,12 +351,23 @@ class WC_GZD_Product {
311
  $new_price_sale = $match_sale[0];
312
  $new_price_suffix = ( empty( $match_suffix ) ? '' : ' ' . $match_suffix[0] );
313
 
314
- if ( ! empty( $sale_label ) && isset( $match_regular[1] ) )
315
  $new_price_regular = '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span> ' . $match_regular[0];
 
316
 
317
- if ( ! empty( $sale_regular_label ) && isset( $match_sale[1] ) )
318
  $new_price_sale = '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' . $match_sale[0];
 
319
 
 
 
 
 
 
 
 
 
 
320
  return apply_filters( 'woocommerce_gzd_product_sale_price_with_labels_html', $new_price_regular . ' ' . $new_price_sale . $new_price_suffix, $org_price_html, $this );
321
  }
322
 
@@ -327,6 +378,16 @@ class WC_GZD_Product {
327
 
328
  $price = ( ! empty( $sale_label ) ? '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span>' : '' ) . ' <del>' . ( ( is_numeric( $from ) ) ? wc_price( $from ) : $from ) . '</del> ' . ( ! empty( $sale_regular_label ) ? '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' : '' ) . '<ins>' . ( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) . '</ins>';
329
 
 
 
 
 
 
 
 
 
 
 
330
  return apply_filters( 'woocommerce_germanized_get_price_html_from_to', $price, $from, $to, $this );
331
  }
332
 
@@ -364,7 +425,17 @@ class WC_GZD_Product {
364
  }
365
  }
366
  }
367
-
 
 
 
 
 
 
 
 
 
 
368
  return apply_filters( 'woocommerce_gzd_product_tax_info', $tax_notice, $this );
369
  }
370
 
@@ -387,7 +458,26 @@ class WC_GZD_Product {
387
  * @return string
388
  */
389
  public function get_unit_base() {
390
- return ( $this->unit_base ) ? ( $this->unit_base != apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 ) ? '<span class="unit-base">' . $this->unit_base . '</span>' . apply_filters( 'wc_gzd_unit_price_base_seperator', ' ' ) : '' ) . '<span class="unit">' . $this->get_unit() . '</span>' : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  }
392
 
393
  public function get_unit_base_raw() {
@@ -471,6 +561,15 @@ class WC_GZD_Product {
471
  * @return string the regular price
472
  */
473
  public function get_unit_regular_price() {
 
 
 
 
 
 
 
 
 
474
  return apply_filters( 'woocommerce_gzd_get_unit_regular_price', $this->unit_price_regular, $this );
475
  }
476
 
@@ -480,6 +579,15 @@ class WC_GZD_Product {
480
  * @return string the sale price
481
  */
482
  public function get_unit_sale_price() {
 
 
 
 
 
 
 
 
 
483
  return apply_filters( 'woocommerce_gzd_get_unit_sale_price', $this->unit_price_sale, $this );
484
  }
485
 
@@ -489,6 +597,15 @@ class WC_GZD_Product {
489
  * @return string the sale price
490
  */
491
  public function get_unit_price_raw() {
 
 
 
 
 
 
 
 
 
492
  return apply_filters( 'woocommerce_gzd_get_unit_price_raw', $this->unit_price, $this );
493
  }
494
 
@@ -500,6 +617,17 @@ class WC_GZD_Product {
500
  * @return string formatted unit price
501
  */
502
  public function get_unit_price( $qty = 1, $price = '' ) {
 
 
 
 
 
 
 
 
 
 
 
503
  do_action( 'woocommerce_gzd_before_get_unit_price', $this, $price, $qty );
504
 
505
  $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
@@ -516,6 +644,17 @@ class WC_GZD_Product {
516
  */
517
  public function get_unit_price_including_tax( $qty = 1, $price = '' ) {
518
  $price = ( $price == '' ) ? $this->get_unit_price_raw() : $price;
 
 
 
 
 
 
 
 
 
 
 
519
  return apply_filters( 'woocommerce_gzd_unit_price_including_tax', ( $price == '' ) ? '' : wc_gzd_get_price_including_tax( $this->child, array( 'price' => $price, 'qty' => $qty ) ), $price, $qty, $this );
520
  }
521
 
@@ -528,6 +667,17 @@ class WC_GZD_Product {
528
  */
529
  public function get_unit_price_excluding_tax( $qty = 1, $price = '' ) {
530
  $price = ( $price == '' ) ? $this->get_unit_price_raw() : $price;
 
 
 
 
 
 
 
 
 
 
 
531
  return apply_filters( 'woocommerce_gzd_unit_price_excluding_tax', ( $price == '' ) ? '' : wc_gzd_get_price_excluding_tax( $this->child, array( 'price' => $price, 'qty' => $qty ) ), $price, $qty, $this );
532
  }
533
 
@@ -537,6 +687,15 @@ class WC_GZD_Product {
537
  * @return boolean
538
  */
539
  public function is_on_unit_sale() {
 
 
 
 
 
 
 
 
 
540
  return apply_filters( 'woocommerce_gzd_product_is_on_unit_sale', ( $this->get_unit_sale_price() !== $this->get_unit_regular_price() && $this->get_unit_sale_price() == $this->get_unit_price_raw() ), $this );
541
  }
542
 
@@ -547,13 +706,40 @@ class WC_GZD_Product {
547
  */
548
  public function get_unit_html( $show_sale = true ) {
549
 
550
- if ( apply_filters( 'woocommerce_gzd_hide_unit_text', false, $this ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  return apply_filters( 'woocommerce_germanized_disabled_unit_text', '', $this );
 
552
 
553
  $html = '';
554
 
555
  if ( $this->has_unit() ) {
556
 
 
 
 
 
 
 
 
 
 
557
  do_action( 'woocommerce_gzd_before_get_unit_price_html', $this );
558
 
559
  $display_price = $this->get_unit_price();
@@ -566,19 +752,35 @@ class WC_GZD_Product {
566
 
567
  if ( strpos( $text, '{price}' ) !== false ) {
568
  $replacements = array(
 
 
 
 
 
 
 
569
  '{price}' => $price_html . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
570
  );
571
  } else {
572
  $replacements = array(
573
  '{base_price}' => $price_html,
574
  '{unit}' => '<span class="unit">' . $this->get_unit() . '</span>',
 
575
  '{base}' => ( $this->unit_base != apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 ) ? '<span class="unit-base">' . $this->unit_base . '</span>' : '' )
576
  );
577
  }
578
 
579
  $html = wc_gzd_replace_label_shortcodes( $text, $replacements );
580
  }
581
-
 
 
 
 
 
 
 
 
582
  return apply_filters( 'woocommerce_gzd_unit_price_html', $html, $this );
583
  }
584
 
@@ -603,7 +805,24 @@ class WC_GZD_Product {
603
  */
604
  public function get_product_units_html() {
605
 
 
 
 
 
 
 
 
 
606
  if ( apply_filters( 'woocommerce_gzd_hide_product_units_text', false, $this ) ) {
 
 
 
 
 
 
 
 
 
607
  return apply_filters( 'woocommerce_germanized_disabled_product_units_text', '', $this );
608
  }
609
 
@@ -620,8 +839,15 @@ class WC_GZD_Product {
620
  $html = wc_gzd_replace_label_shortcodes( $text, $replacements );
621
  }
622
 
 
 
 
 
 
 
 
 
623
  return apply_filters( 'woocommerce_gzd_product_units_html', $html, $this );
624
-
625
  }
626
 
627
  /**
@@ -677,14 +903,39 @@ class WC_GZD_Product {
677
  */
678
  public function get_delivery_time_html() {
679
  $html = '';
680
-
 
 
 
 
 
 
 
 
681
  if ( apply_filters( 'woocommerce_germanized_hide_delivery_time_text', false, $this ) ) {
 
 
 
 
 
 
 
 
 
682
  return apply_filters( 'woocommerce_germanized_disabled_delivery_time_text', '', $this );
683
  }
684
 
685
  if ( $this->get_delivery_time_term() ) {
686
  $html = $this->get_delivery_time_term()->name;
687
  } else {
 
 
 
 
 
 
 
 
688
  $html = apply_filters( 'woocommerce_germanized_empty_delivery_time_text', '', $this );
689
  }
690
 
@@ -693,6 +944,16 @@ class WC_GZD_Product {
693
  '{delivery_time}' => $html,
694
  );
695
 
 
 
 
 
 
 
 
 
 
 
696
  $html = apply_filters( 'woocommerce_germanized_delivery_time_html',
697
  wc_gzd_replace_label_shortcodes( get_option( 'woocommerce_gzd_delivery_time_text' ), $replacements ),
698
  get_option( 'woocommerce_gzd_delivery_time_text' ),
@@ -705,8 +966,28 @@ class WC_GZD_Product {
705
 
706
  // Hide delivery time if product is not in stock
707
  if ( 'yes' === get_option( 'woocommerce_gzd_delivery_time_disable_not_in_stock' ) && ! $this->is_in_stock() ) {
 
 
 
 
 
 
 
 
 
 
708
  $html = apply_filters( 'woocommerce_germanized_delivery_time_out_of_stock_html', '', $this, $html );
709
  } elseif ( 'yes' === get_option( 'woocommerce_gzd_delivery_time_disable_backorder' ) && $this->is_on_backorder() ) {
 
 
 
 
 
 
 
 
 
 
710
  $html = apply_filters( 'woocommerce_germanized_delivery_time_backorder_html', '', $this, $html );
711
  }
712
 
@@ -714,6 +995,15 @@ class WC_GZD_Product {
714
  }
715
 
716
  public function has_free_shipping() {
 
 
 
 
 
 
 
 
 
717
  return ( apply_filters( 'woocommerce_germanized_product_has_free_shipping', ( $this->free_shipping === 'yes' ? true : false ), $this ) );
718
  }
719
 
@@ -723,9 +1013,27 @@ class WC_GZD_Product {
723
  * @return string
724
  */
725
  public function get_shipping_costs_html() {
726
-
727
- if ( apply_filters( 'woocommerce_germanized_hide_shipping_costs_text', false, $this ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
728
  return apply_filters( 'woocommerce_germanized_disabled_shipping_text', '', $this );
 
729
 
730
  return wc_gzd_get_shipping_costs_text( $this );
731
  }
139
  $this->unit_price_sale = $prices['sale'];
140
  $this->unit_price = $prices['unit'];
141
 
142
+ /**
143
+ * Recalculated unit price.
144
+ *
145
+ * Executes whenever the unit price is recalculated.
146
+ *
147
+ * @since 1.9.1
148
+ *
149
+ * @param WC_GZD_Product $product The product object.
150
+ */
151
  do_action( 'woocommerce_gzd_recalculated_unit_price', $this );
152
  }
153
 
157
  * @return boolean|string
158
  */
159
  public function get_mini_desc() {
160
+ /**
161
+ * Filter that allows adjusting a product's mini cart description.
162
+ *
163
+ * @since 1.0.0
164
+ *
165
+ * @param string $html The cart description.
166
+ * @param WC_GZD_Product $product The product object.
167
+ */
168
  $mini_desc = apply_filters( 'woocommerce_gzd_product_cart_description', $this->mini_desc, $this );
169
 
170
  if ( $mini_desc && ! empty( $mini_desc ) ) {
245
  foreach ( $attribute_values as $attribute_value ) {
246
  $value_name = esc_html( $attribute_value->name );
247
 
248
+ /**
249
+ * Filter that might allow making checkout attributes clickable.
250
+ *
251
+ * @since 2.0.0
252
+ *
253
+ * @param bool $enable Set to `true` to enable clickable checkout attributes.
254
+ */
255
  if ( apply_filters( 'woocommerce_gzd_product_attribute_checkout_clickable', false ) && $attribute_taxonomy->attribute_public ) {
256
  $values[] = '<a href="' . esc_url( get_term_link( $attribute_value->term_id, $attribute->get_name() ) ) . '" rel="tag">' . $value_name . '</a>';
257
  } else {
279
  }
280
  }
281
 
282
+ /**
283
+ * Filter product attributes visible during checkout.
284
+ *
285
+ * @since 2.2.9
286
+ *
287
+ * @param array $item_data The attribute data.
288
+ * @param WC_Product $product The product object.
289
+ */
290
  return apply_filters( 'woocommerce_gzd_product_checkout_attributes', $item_data, $this->child );
291
  }
292
 
312
  * @return boolean
313
  */
314
  public function is_virtual_vat_exception() {
315
+ /**
316
+ * Filter that allows marking a product as virtual vat exception.
317
+ *
318
+ * @since 1.8.5
319
+ *
320
+ * @param bool $is_exception Whether it is a exception or not.
321
+ * @param WC_GZD_Product $product The product object.
322
+ */
323
  return apply_filters( 'woocommerce_gzd_product_virtual_vat_exception', ( ( get_option( 'woocommerce_gzd_enable_virtual_vat' ) === 'yes' ) && ( $this->is_downloadable() || $this->is_virtual() ) ? true : false ), $this );
324
  }
325
 
351
  $new_price_sale = $match_sale[0];
352
  $new_price_suffix = ( empty( $match_suffix ) ? '' : ' ' . $match_suffix[0] );
353
 
354
+ if ( ! empty( $sale_label ) && isset( $match_regular[1] ) ) {
355
  $new_price_regular = '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span> ' . $match_regular[0];
356
+ }
357
 
358
+ if ( ! empty( $sale_regular_label ) && isset( $match_sale[1] ) ) {
359
  $new_price_sale = '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' . $match_sale[0];
360
+ }
361
 
362
+ /**
363
+ * Filters the product sale price containing price labels.
364
+ *
365
+ * @since 1.8.5
366
+ *
367
+ * @param string $html The new price containing labels.
368
+ * @param string $old_price The old price.
369
+ * @param WC_GZD_Product $product The product object.
370
+ */
371
  return apply_filters( 'woocommerce_gzd_product_sale_price_with_labels_html', $new_price_regular . ' ' . $new_price_sale . $new_price_suffix, $org_price_html, $this );
372
  }
373
 
378
 
379
  $price = ( ! empty( $sale_label ) ? '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span>' : '' ) . ' <del>' . ( ( is_numeric( $from ) ) ? wc_price( $from ) : $from ) . '</del> ' . ( ! empty( $sale_regular_label ) ? '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' : '' ) . '<ins>' . ( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) . '</ins>';
380
 
381
+ /**
382
+ * Filter to adjust the HTML price range for unit prices.
383
+ *
384
+ * @since 1.0.0
385
+ *
386
+ * @param string $price The HTML price range.
387
+ * @param string $from The from price.
388
+ * @param string $to The to price.
389
+ * @param WC_GZD_Product $product The product object.
390
+ */
391
  return apply_filters( 'woocommerce_germanized_get_price_html_from_to', $price, $from, $to, $this );
392
  }
393
 
425
  }
426
  }
427
  }
428
+
429
+ /**
430
+ * Filter to adjust the product tax notice.
431
+ *
432
+ * This filter allows you to easily change the tax notice on a per product basis.
433
+ *
434
+ * @since 1.0.0
435
+ *
436
+ * @param string $tax_notice The tax notice.
437
+ * @param WC_GZD_Product $product The product object.
438
+ */
439
  return apply_filters( 'woocommerce_gzd_product_tax_info', $tax_notice, $this );
440
  }
441
 
458
  * @return string
459
  */
460
  public function get_unit_base() {
461
+ /**
462
+ * Filter that allows changing the amount which is used to determine whether
463
+ * the base for the unit price should be skipped or not. Defaults to 1.
464
+ *
465
+ * @since 1.0.0
466
+ *
467
+ * @param int $amount The amount.
468
+ */
469
+ $hide_amount = apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 );
470
+
471
+ /**
472
+ * Filter to adjust the unit price base separator.
473
+ *
474
+ * @since 1.0.0
475
+ *
476
+ * @param string $separator The separator.
477
+ */
478
+ $separator = apply_filters( 'wc_gzd_unit_price_base_seperator', ' ' );
479
+
480
+ return ( $this->unit_base ) ? ( $this->unit_base != $hide_amount ? '<span class="unit-base">' . $this->unit_base . '</span>' . $separator : '' ) . '<span class="unit">' . $this->get_unit() . '</span>' : '';
481
  }
482
 
483
  public function get_unit_base_raw() {
561
  * @return string the regular price
562
  */
563
  public function get_unit_regular_price() {
564
+
565
+ /**
566
+ * Filter to adjust a product's regular unit price.
567
+ *
568
+ * @since 1.0.0
569
+ *
570
+ * @param string $price The regular unit price.
571
+ * @param WC_GZD_Product $product The product object.
572
+ */
573
  return apply_filters( 'woocommerce_gzd_get_unit_regular_price', $this->unit_price_regular, $this );
574
  }
575
 
579
  * @return string the sale price
580
  */
581
  public function get_unit_sale_price() {
582
+
583
+ /**
584
+ * Filter to adjust a product's sale unit price.
585
+ *
586
+ * @since 1.0.0
587
+ *
588
+ * @param string $price The sale unit price.
589
+ * @param WC_GZD_Product $product The product object.
590
+ */
591
  return apply_filters( 'woocommerce_gzd_get_unit_sale_price', $this->unit_price_sale, $this );
592
  }
593
 
597
  * @return string the sale price
598
  */
599
  public function get_unit_price_raw() {
600
+
601
+ /**
602
+ * Filter to adjust a product's raw unit price.
603
+ *
604
+ * @since 1.0.0
605
+ *
606
+ * @param string $price The raw unit price.
607
+ * @param WC_GZD_Product $product The product object.
608
+ */
609
  return apply_filters( 'woocommerce_gzd_get_unit_price_raw', $this->unit_price, $this );
610
  }
611
 
617
  * @return string formatted unit price
618
  */
619
  public function get_unit_price( $qty = 1, $price = '' ) {
620
+ /**
621
+ * Before retrieving unit price.
622
+ *
623
+ * Fires before the product unit price is retrieved.
624
+ *
625
+ * @since 1.0.0
626
+ *
627
+ * @param WC_GZD_Product $this The product object.
628
+ * @param string $price Optionally pass the price.
629
+ * @param int $qty The product quantity.
630
+ */
631
  do_action( 'woocommerce_gzd_before_get_unit_price', $this, $price, $qty );
632
 
633
  $tax_display_mode = get_option( 'woocommerce_tax_display_shop' );
644
  */
645
  public function get_unit_price_including_tax( $qty = 1, $price = '' ) {
646
  $price = ( $price == '' ) ? $this->get_unit_price_raw() : $price;
647
+
648
+ /**
649
+ * Filter to adjust the unit price including tax.
650
+ *
651
+ * @since 1.0.0
652
+ *
653
+ * @param string $unit_price The calculated unit price.
654
+ * @param string $price The price passed.
655
+ * @param int $qty The quantity.
656
+ * @param WC_GZD_Product $product The product object.
657
+ */
658
  return apply_filters( 'woocommerce_gzd_unit_price_including_tax', ( $price == '' ) ? '' : wc_gzd_get_price_including_tax( $this->child, array( 'price' => $price, 'qty' => $qty ) ), $price, $qty, $this );
659
  }
660
 
667
  */
668
  public function get_unit_price_excluding_tax( $qty = 1, $price = '' ) {
669
  $price = ( $price == '' ) ? $this->get_unit_price_raw() : $price;
670
+
671
+ /**
672
+ * Filter to adjust the unit price excluding tax.
673
+ *
674
+ * @since 1.0.0
675
+ *
676
+ * @param string $unit_price The calculated unit price.
677
+ * @param string $price The price passed.
678
+ * @param int $qty The quantity.
679
+ * @param WC_GZD_Product $product The product object.
680
+ */
681
  return apply_filters( 'woocommerce_gzd_unit_price_excluding_tax', ( $price == '' ) ? '' : wc_gzd_get_price_excluding_tax( $this->child, array( 'price' => $price, 'qty' => $qty ) ), $price, $qty, $this );
682
  }
683
 
687
  * @return boolean
688
  */
689
  public function is_on_unit_sale() {
690
+
691
+ /**
692
+ * Filter to decide whether a product is on unit sale or not.
693
+ *
694
+ * @since 1.0.0
695
+ *
696
+ * @param bool $on_sale Whether the product is on sale or not.
697
+ * @param WC_GZD_Product $product The product object.
698
+ */
699
  return apply_filters( 'woocommerce_gzd_product_is_on_unit_sale', ( $this->get_unit_sale_price() !== $this->get_unit_regular_price() && $this->get_unit_sale_price() == $this->get_unit_price_raw() ), $this );
700
  }
701
 
706
  */
707
  public function get_unit_html( $show_sale = true ) {
708
 
709
+ /**
710
+ * Filter that allows disabling the unit price output for a certain product.
711
+ *
712
+ * @since 1.0.0
713
+ *
714
+ * @param bool $hide Whether to hide the output or not.
715
+ * @param WC_GZD_Product $product The product object.
716
+ */
717
+ if ( apply_filters( 'woocommerce_gzd_hide_unit_text', false, $this ) ) {
718
+
719
+ /**
720
+ * Filter to adjust the output of a disabled product unit price.
721
+ *
722
+ * @since 1.0.0
723
+ *
724
+ * @param string $output The output.
725
+ * @param WC_GZD_Product $product The product object.
726
+ */
727
  return apply_filters( 'woocommerce_germanized_disabled_unit_text', '', $this );
728
+ }
729
 
730
  $html = '';
731
 
732
  if ( $this->has_unit() ) {
733
 
734
+ /**
735
+ * Before retrieving unit price HTML.
736
+ *
737
+ * Fires before the HTML output for the unit price is generated.
738
+ *
739
+ * @since 1.0.0
740
+ *
741
+ * @param WC_GZD_Product $this The product object.
742
+ */
743
  do_action( 'woocommerce_gzd_before_get_unit_price_html', $this );
744
 
745
  $display_price = $this->get_unit_price();
752
 
753
  if ( strpos( $text, '{price}' ) !== false ) {
754
  $replacements = array(
755
+ /**
756
+ * Filter to adjust the unit price separator.
757
+ *
758
+ * @since 1.0.0
759
+ *
760
+ * @param string $separator The separator.
761
+ */
762
  '{price}' => $price_html . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
763
  );
764
  } else {
765
  $replacements = array(
766
  '{base_price}' => $price_html,
767
  '{unit}' => '<span class="unit">' . $this->get_unit() . '</span>',
768
+ /** This filter is documented in includes/abstracts/abstract-wc-gzd-product.php */
769
  '{base}' => ( $this->unit_base != apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 ) ? '<span class="unit-base">' . $this->unit_base . '</span>' : '' )
770
  );
771
  }
772
 
773
  $html = wc_gzd_replace_label_shortcodes( $text, $replacements );
774
  }
775
+
776
+ /**
777
+ * Filter to adjust the product's unit price HTML output.
778
+ *
779
+ * @since 1.0.0
780
+ *
781
+ * @param string $html The unit price as HTML.
782
+ * @param WC_GZD_Product $product The product object.
783
+ */
784
  return apply_filters( 'woocommerce_gzd_unit_price_html', $html, $this );
785
  }
786
 
805
  */
806
  public function get_product_units_html() {
807
 
808
+ /**
809
+ * Filter that allows disabling product units output for a specific product.
810
+ *
811
+ * @since 1.0.0
812
+ *
813
+ * @param bool $disable Whether to disable or not.
814
+ * @param WC_GZD_Product $product The product object.
815
+ */
816
  if ( apply_filters( 'woocommerce_gzd_hide_product_units_text', false, $this ) ) {
817
+
818
+ /**
819
+ * Filter that allows adjusting the disabled product units output.
820
+ *
821
+ * @since 1.0.0
822
+ *
823
+ * @param string $notice The output.
824
+ * @param WC_GZD_Product $product The product object.
825
+ */
826
  return apply_filters( 'woocommerce_germanized_disabled_product_units_text', '', $this );
827
  }
828
 
839
  $html = wc_gzd_replace_label_shortcodes( $text, $replacements );
840
  }
841
 
842
+ /**
843
+ * Filter to adjust the product units HTML output.
844
+ *
845
+ * @since 1.0.0
846
+ *
847
+ * @param string $html The HTML output.
848
+ * @param WC_GZD_Product $product The product object.
849
+ */
850
  return apply_filters( 'woocommerce_gzd_product_units_html', $html, $this );
 
851
  }
852
 
853
  /**
903
  */
904
  public function get_delivery_time_html() {
905
  $html = '';
906
+
907
+ /**
908
+ * Filter that allows hiding the delivery time for a specific product.
909
+ *
910
+ * @since 1.0.0
911
+ *
912
+ * @param bool $hide Whether to hide delivery time or not.
913
+ * @param WC_GZD_Product $product The product object.
914
+ */
915
  if ( apply_filters( 'woocommerce_germanized_hide_delivery_time_text', false, $this ) ) {
916
+
917
+ /**
918
+ * Filter to adjust disabled product delivery time output.
919
+ *
920
+ * @since 1.0.0
921
+ *
922
+ * @param string $output The output.
923
+ * @param WC_GZD_Product $product The product object.
924
+ */
925
  return apply_filters( 'woocommerce_germanized_disabled_delivery_time_text', '', $this );
926
  }
927
 
928
  if ( $this->get_delivery_time_term() ) {
929
  $html = $this->get_delivery_time_term()->name;
930
  } else {
931
+ /**
932
+ * Filter to adjust empty delivery time text.
933
+ *
934
+ * @since 1.0.0
935
+ *
936
+ * @param string $text The delivery time text.
937
+ * @param WC_GZD_Product $product The product object.
938
+ */
939
  $html = apply_filters( 'woocommerce_germanized_empty_delivery_time_text', '', $this );
940
  }
941
 
944
  '{delivery_time}' => $html,
945
  );
946
 
947
+ /**
948
+ * Filter to adjust product delivery time HTML.
949
+ *
950
+ * @since 1.0.0
951
+ *
952
+ * @param string $html The notice.
953
+ * @param string $option The placeholder option.
954
+ * @param string $html_org The HTML before replacement.
955
+ * @param WC_GZD_Product $product The product object.
956
+ */
957
  $html = apply_filters( 'woocommerce_germanized_delivery_time_html',
958
  wc_gzd_replace_label_shortcodes( get_option( 'woocommerce_gzd_delivery_time_text' ), $replacements ),
959
  get_option( 'woocommerce_gzd_delivery_time_text' ),
966
 
967
  // Hide delivery time if product is not in stock
968
  if ( 'yes' === get_option( 'woocommerce_gzd_delivery_time_disable_not_in_stock' ) && ! $this->is_in_stock() ) {
969
+
970
+ /**
971
+ * Filter to adjust product delivery time in case of a product is out of stock.
972
+ *
973
+ * @since 2.0.0
974
+ *
975
+ * @param string $output The new delivery time text.
976
+ * @param WC_GZD_Product $product The product object.
977
+ * @param string $html The original HTML output.
978
+ */
979
  $html = apply_filters( 'woocommerce_germanized_delivery_time_out_of_stock_html', '', $this, $html );
980
  } elseif ( 'yes' === get_option( 'woocommerce_gzd_delivery_time_disable_backorder' ) && $this->is_on_backorder() ) {
981
+
982
+ /**
983
+ * Filter to adjust product delivery time in case of a product is on backorder.
984
+ *
985
+ * @since 2.0.0
986
+ *
987
+ * @param string $output The new delivery time text.
988
+ * @param WC_GZD_Product $product The product object.
989
+ * @param string $html The original HTML output.
990
+ */
991
  $html = apply_filters( 'woocommerce_germanized_delivery_time_backorder_html', '', $this, $html );
992
  }
993
 
995
  }
996
 
997
  public function has_free_shipping() {
998
+
999
+ /**
1000
+ * Filter that allows adjusting whether a product has free shipping option or not.
1001
+ *
1002
+ * @since 1.0.0
1003
+ *
1004
+ * @param bool $has_free_shipping Has free shipping or not.
1005
+ * @param WC_GZD_Product $product The product object.
1006
+ */
1007
  return ( apply_filters( 'woocommerce_germanized_product_has_free_shipping', ( $this->free_shipping === 'yes' ? true : false ), $this ) );
1008
  }
1009
 
1013
  * @return string
1014
  */
1015
  public function get_shipping_costs_html() {
1016
+
1017
+ /**
1018
+ * Filter to optionally disable shipping costs info for a certain product.
1019
+ *
1020
+ * @since 1.0.0
1021
+ *
1022
+ * @param bool $disable Whether to disable the shipping costs notice or not.
1023
+ * @param WC_GZD_Product $product The product object.
1024
+ */
1025
+ if ( apply_filters( 'woocommerce_germanized_hide_shipping_costs_text', false, $this ) ) {
1026
+
1027
+ /**
1028
+ * Filter to adjust a product's disabled shipping costs notice.
1029
+ *
1030
+ * @since 1.0.0
1031
+ *
1032
+ * @param string $output The output.
1033
+ * @param WC_GZD_Product $product The product object.
1034
+ */
1035
  return apply_filters( 'woocommerce_germanized_disabled_shipping_text', '', $this );
1036
+ }
1037
 
1038
  return wc_gzd_get_shipping_costs_text( $this );
1039
  }
includes/abstracts/abstract-wc-gzd-taxonomy.php CHANGED
@@ -32,21 +32,48 @@ class WC_GZD_Taxonomy {
32
 
33
  public function get_term_object( $key, $by = 'slug' ) {
34
 
35
- do_action( 'woocommerce_gzd_get_term', $key, $by, $this->taxonomy );
36
 
37
- $term = get_term_by( $by, $key, $this->taxonomy );
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- if ( ! $term || is_wp_error( $term ) )
 
 
40
  $term = false;
 
41
 
42
- do_action( 'woocommerce_gzd_after_get_term', $key, $by, $this->taxonomy );
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  return $term;
45
  }
46
 
47
  public function get_term( $key, $by = 'slug' ) {
48
- if ( $term = $this->get_term_object( $key, $by ) )
49
  return $term->name;
 
 
50
  return false;
51
  }
52
 
@@ -60,12 +87,16 @@ class WC_GZD_Taxonomy {
60
  * @return mixed units as array
61
  */
62
  public function get_terms() {
63
- $list = array();
64
  $terms = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
 
65
  if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
66
- foreach ( $terms as $term )
 
67
  $list[ $term->slug ] = $term->name;
 
68
  }
 
69
  return $list;
70
  }
71
  }
32
 
33
  public function get_term_object( $key, $by = 'slug' ) {
34
 
35
+ $taxonomy = $this->taxonomy;
36
 
37
+ /**
38
+ * Before retrieving a certain term.
39
+ *
40
+ * Executes before retrieving a certain term (e.g. a delivery time).
41
+ *
42
+ * @since 1.0.0
43
+ *
44
+ * @param string $key The identifier e.g. term slug.
45
+ * @param string $by Indicates how to identify the term e.g. by slug.
46
+ * @param string $taxonomy The taxonomy linked to the term e.g. delivery_time.
47
+ */
48
+ do_action( 'woocommerce_gzd_get_term', $key, $by, $taxonomy );
49
 
50
+ $term = get_term_by( $by, $key, $taxonomy );
51
+
52
+ if ( ! $term || is_wp_error( $term ) ) {
53
  $term = false;
54
+ }
55
 
56
+ /**
57
+ * After retrieving a certain term.
58
+ *
59
+ * Executes after retrieving a certain term (e.g. a delivery time).
60
+ *
61
+ * @since 1.0.0
62
+ *
63
+ * @param string $key The identifier e.g. term slug.
64
+ * @param string $by Indicates how to identify the term e.g. by slug.
65
+ * @param string $taxonomy The taxonomy linked to the term e.g. delivery_time.
66
+ */
67
+ do_action( 'woocommerce_gzd_after_get_term', $key, $by, $taxonomy );
68
 
69
  return $term;
70
  }
71
 
72
  public function get_term( $key, $by = 'slug' ) {
73
+ if ( $term = $this->get_term_object( $key, $by ) ) {
74
  return $term->name;
75
+ }
76
+
77
  return false;
78
  }
79
 
87
  * @return mixed units as array
88
  */
89
  public function get_terms() {
90
+ $list = array();
91
  $terms = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
92
+
93
  if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
94
+
95
+ foreach ( $terms as $term ) {
96
  $list[ $term->slug ] = $term->name;
97
+ }
98
  }
99
+
100
  return $list;
101
  }
102
  }
includes/admin/class-wc-gzd-admin-legal-checkboxes.php CHANGED
@@ -189,6 +189,15 @@ class WC_GZD_Admin_Legal_Checkboxes {
189
  $manager->do_register_action();
190
 
191
  $checkbox = $manager->get_checkbox( $checkbox_id );
 
 
 
 
 
 
 
 
 
192
  $checkbox = apply_filters( 'woocommerce_gzd_admin_legal_checkbox', $checkbox, $checkbox_id );
193
 
194
  if ( ! empty( $_POST['save'] ) ) { // WPCS: input var ok, sanitization ok.
@@ -197,11 +206,29 @@ class WC_GZD_Admin_Legal_Checkboxes {
197
  echo '<div class="updated error"><p>' . esc_html__( 'Edit failed. Please try again.', 'woocommerce-germanized' ) . '</p></div>';
198
  }
199
 
 
 
 
 
 
 
 
 
 
200
  do_action( 'woocommerce_gzd_before_save_legal_checkbox', $checkbox );
201
 
202
  if ( $checkbox ) {
203
  $checkbox->save_fields();
204
 
 
 
 
 
 
 
 
 
 
205
  do_action( 'woocommerce_gzd_after_save_legal_checkbox', $checkbox );
206
  }
207
  }
@@ -215,6 +242,13 @@ class WC_GZD_Admin_Legal_Checkboxes {
215
 
216
  protected function screen() {
217
 
 
 
 
 
 
 
 
218
  do_action( 'woocommerce_gzd_before_admin_legal_checkboxes' );
219
 
220
  $manager = WC_GZD_Legal_Checkbox_Manager::instance();
189
  $manager->do_register_action();
190
 
191
  $checkbox = $manager->get_checkbox( $checkbox_id );
192
+
193
+ /**
194
+ * Adjust the checkbox within admin edit view.
195
+ *
196
+ * @since 2.0.0
197
+ *
198
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
199
+ * @param int $checkbox_id The checkbox id.
200
+ */
201
  $checkbox = apply_filters( 'woocommerce_gzd_admin_legal_checkbox', $checkbox, $checkbox_id );
202
 
203
  if ( ! empty( $_POST['save'] ) ) { // WPCS: input var ok, sanitization ok.
206
  echo '<div class="updated error"><p>' . esc_html__( 'Edit failed. Please try again.', 'woocommerce-germanized' ) . '</p></div>';
207
  }
208
 
209
+ /**
210
+ * Before saving a legal checkbox.
211
+ *
212
+ * This hook fires before a certain legal checkbox saves it's settings.
213
+ *
214
+ * @since 2.0.0
215
+ *
216
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox to be saved.
217
+ */
218
  do_action( 'woocommerce_gzd_before_save_legal_checkbox', $checkbox );
219
 
220
  if ( $checkbox ) {
221
  $checkbox->save_fields();
222
 
223
+ /**
224
+ * After saving a legal checkbox
225
+ *
226
+ * This hook fires after a certain legal checkbox saves it's settings.
227
+ *
228
+ * @since 2.0.0
229
+ *
230
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox containing the new settings.
231
+ */
232
  do_action( 'woocommerce_gzd_after_save_legal_checkbox', $checkbox );
233
  }
234
  }
242
 
243
  protected function screen() {
244
 
245
+ /**
246
+ * Before outputting admin checkboxes.
247
+ *
248
+ * This hook fires before legal checkboxes admin list view is being output.
249
+ *
250
+ * @since 2.0.0
251
+ */
252
  do_action( 'woocommerce_gzd_before_admin_legal_checkboxes' );
253
 
254
  $manager = WC_GZD_Legal_Checkbox_Manager::instance();
includes/admin/class-wc-gzd-admin-notices.php CHANGED
@@ -55,6 +55,13 @@ class WC_GZD_Admin_Notices {
55
  $enabled = false;
56
  }
57
 
 
 
 
 
 
 
 
58
  return apply_filters( 'woocommerce_gzd_enable_notices', $enabled );
59
  }
60
 
55
  $enabled = false;
56
  }
57
 
58
+ /**
59
+ * Filter to enable or disable admin notices in WP-Admin.
60
+ *
61
+ * @since 1.8.5
62
+ *
63
+ * @param bool $enabled Whether notices are enabled or disabled.
64
+ */
65
  return apply_filters( 'woocommerce_gzd_enable_notices', $enabled );
66
  }
67
 
includes/admin/class-wc-gzd-admin-order.php CHANGED
@@ -94,6 +94,16 @@ class WC_GZD_Admin_Order {
94
  }
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
97
  if ( apply_filters( 'woocommerce_gzd_order_item_not_supporting_tax_share', $no_shipping, $item, $key, $type ) ) {
98
  continue;
99
  }
94
  }
95
  }
96
 
97
+ /**
98
+ * Filter to disable tax share calculation for a certain order item.
99
+ *
100
+ * @since 2.3.0
101
+ *
102
+ * @param bool $no_shipping Set to false to disable tax share calculation for this item.
103
+ * @param WC_Order_Item $item The order item.
104
+ * @param string $key The item key.
105
+ * @param string $type The tax share type e.g. shipping or fees.
106
+ */
107
  if ( apply_filters( 'woocommerce_gzd_order_item_not_supporting_tax_share', $no_shipping, $item, $key, $type ) ) {
108
  continue;
109
  }
includes/admin/class-wc-gzd-admin-status.php CHANGED
@@ -27,6 +27,13 @@ class WC_GZD_Admin_Status extends WC_Admin_Status {
27
  }
28
 
29
  public static function status_default( $status ) {
 
 
 
 
 
 
 
30
  do_action( 'woocommerce_gzd_status_' . $status );
31
  }
32
 
27
  }
28
 
29
  public static function status_default( $status ) {
30
+ /**
31
+ * Admin status screen.
32
+ *
33
+ * Executes for a default status page.
34
+ *
35
+ * @since 1.0.0
36
+ */
37
  do_action( 'woocommerce_gzd_status_' . $status );
38
  }
39
 
includes/admin/class-wc-gzd-admin.php CHANGED
@@ -70,6 +70,7 @@ class WC_GZD_Admin {
70
 
71
  add_filter( 'woocommerce_order_actions', array( $this, 'order_actions' ), 10, 1 );
72
  add_action( 'woocommerce_order_action_order_confirmation', array( $this, 'resend_order_confirmation' ), 10, 1 );
 
73
 
74
  add_filter( 'pre_update_option_wp_page_for_privacy_policy', array( $this, 'pre_update_wp_privacy_option_page' ), 10, 2 );
75
  add_filter( 'pre_update_option_woocommerce_data_security_page_id', array( $this, 'pre_update_gzd_privacy_option_page' ), 10, 2 );
@@ -126,6 +127,15 @@ class WC_GZD_Admin {
126
  }
127
 
128
  public function pre_update_gzd_privacy_option_page( $new_value, $old_value ) {
 
 
 
 
 
 
 
 
 
129
  if ( apply_filters( 'woocommerce_gzd_sync_wp_privacy_page', true ) ) {
130
  remove_filter( 'pre_update_option_wp_page_for_privacy_policy', array( $this, 'pre_update_wp_privacy_option_page' ), 10 );
131
  update_option( 'wp_page_for_privacy_policy', $new_value );
@@ -141,6 +151,8 @@ class WC_GZD_Admin {
141
  * @param $old_value
142
  */
143
  public function pre_update_wp_privacy_option_page( $new_value, $old_value ) {
 
 
144
  if ( apply_filters( 'woocommerce_gzd_sync_wp_privacy_page', true ) ) {
145
  remove_filter( 'pre_update_option_woocommerce_data_security_page_id', array( $this, 'pre_update_gzd_privacy_option_page' ), 10 );
146
  update_option( 'woocommerce_data_security_page_id', $new_value );
@@ -149,26 +161,50 @@ class WC_GZD_Admin {
149
  return $new_value;
150
  }
151
 
152
- public function resend_order_confirmation( $order ) {
 
 
 
 
 
 
 
 
 
153
 
 
154
  // Send the customer invoice email.
155
  WC()->payment_gateways();
156
  WC()->shipping();
157
 
158
- $mail = WC_germanized()->emails->get_email_instance_by_id( 'customer_processing_order' );
 
159
 
160
  if ( $mail ) {
161
  $mail->trigger( $order );
162
 
163
  // Note the event.
164
  $order->add_order_note( __( 'Order confirmation manually sent to customer.', 'woocommerce-germanized' ), false, true );
165
- do_action( 'woocommerce_gzd_after_resend_order_confirmation_email', $order, 'customer_processing_order' );
 
 
 
 
 
 
 
 
 
 
 
166
  }
167
  }
168
 
169
  public function order_actions( $actions ) {
170
- $actions[ 'order_confirmation' ] = __( 'Resend order confirmation', 'woocommerce-germanized' );
171
- return $actions;
 
 
172
  }
173
 
174
  public function status_tab() {
@@ -241,6 +277,13 @@ class WC_GZD_Admin {
241
  }
242
 
243
  if ( $section === 'trusted_shops' ) {
 
 
 
 
 
 
 
244
  do_action( 'woocommerce_gzd_load_trusted_shops_script' );
245
  }
246
 
@@ -261,10 +304,29 @@ class WC_GZD_Admin {
261
  wp_add_inline_style( 'woocommerce-gzd-admin', '#tagsdiv-product_delivery_time, #tagsdiv-product_unit, #tagsdiv-product_price_label {display: none}' );
262
  }
263
 
 
 
 
 
 
 
 
 
 
 
 
264
  do_action( 'woocommerce_gzd_admin_assets', $this, $admin_script_path, $suffix );
265
  }
266
 
267
  public function localize_printed_scripts() {
 
 
 
 
 
 
 
 
268
  $localized_scripts = apply_filters( 'woocommerce_gzd_admin_localized_scripts', array() );
269
 
270
  foreach( $localized_scripts as $handle => $data ) {
@@ -341,12 +403,15 @@ class WC_GZD_Admin {
341
 
342
  } elseif ( current_user_can( 'manage_woocommerce' ) && isset( $_GET[ 'tour' ] ) && isset( $_GET[ 'enable' ] ) && isset( $_GET[ '_wpnonce' ] ) && check_admin_referer( 'wc-gzd-tour-enable' ) ) {
343
 
 
 
 
344
  $setting_sections = array_merge( array(
345
  'general' => '',
346
  'display' => '',
347
  'checkboxes' => '',
348
  'email' => ''
349
- ), apply_filters( 'woocommerce_gzd_settings_sections', array() ) );
350
 
351
  delete_option( 'woocommerce_gzd_hide_tour' );
352
 
@@ -411,6 +476,13 @@ class WC_GZD_Admin {
411
  // Reinstall options
412
  WC_GZD_Install::create_options();
413
 
 
 
 
 
 
 
 
414
  do_action( 'woocommerce_gzd_deleted_text_options' );
415
 
416
  // Redirect to check for updates
@@ -423,6 +495,13 @@ class WC_GZD_Admin {
423
 
424
  wc_gzd_get_dependencies()->delete_cached_plugin_header_data();
425
 
 
 
 
 
 
 
 
426
  do_action( 'woocommerce_gzd_deleted_cached_plugin_header_data' );
427
  }
428
  }
70
 
71
  add_filter( 'woocommerce_order_actions', array( $this, 'order_actions' ), 10, 1 );
72
  add_action( 'woocommerce_order_action_order_confirmation', array( $this, 'resend_order_confirmation' ), 10, 1 );
73
+ add_action( 'woocommerce_order_action_paid_for_order_notification', array( $this, 'send_paid_for_order_notification' ), 10, 1 );
74
 
75
  add_filter( 'pre_update_option_wp_page_for_privacy_policy', array( $this, 'pre_update_wp_privacy_option_page' ), 10, 2 );
76
  add_filter( 'pre_update_option_woocommerce_data_security_page_id', array( $this, 'pre_update_gzd_privacy_option_page' ), 10, 2 );
127
  }
128
 
129
  public function pre_update_gzd_privacy_option_page( $new_value, $old_value ) {
130
+
131
+ /**
132
+ * Filter to disable syncing WP privacy page option with Germanized
133
+ * privacy page option.
134
+ *
135
+ * @since 2.0.0
136
+ *
137
+ * @param bool $enabled Set to false to disable syncing.
138
+ */
139
  if ( apply_filters( 'woocommerce_gzd_sync_wp_privacy_page', true ) ) {
140
  remove_filter( 'pre_update_option_wp_page_for_privacy_policy', array( $this, 'pre_update_wp_privacy_option_page' ), 10 );
141
  update_option( 'wp_page_for_privacy_policy', $new_value );
151
  * @param $old_value
152
  */
153
  public function pre_update_wp_privacy_option_page( $new_value, $old_value ) {
154
+
155
+ /** This filter is documented in includes/admin/class-wc-gzd-admin.php */
156
  if ( apply_filters( 'woocommerce_gzd_sync_wp_privacy_page', true ) ) {
157
  remove_filter( 'pre_update_option_woocommerce_data_security_page_id', array( $this, 'pre_update_gzd_privacy_option_page' ), 10 );
158
  update_option( 'woocommerce_data_security_page_id', $new_value );
161
  return $new_value;
162
  }
163
 
164
+ public function send_paid_for_order_notification( $order ) {
165
+ $mail = WC_germanized()->emails->get_email_instance_by_id( 'customer_paid_for_order' );
166
+
167
+ if ( $mail ) {
168
+ $mail->trigger( $order );
169
+
170
+ // Note the event.
171
+ $order->add_order_note( __( 'Paid for order notification manually sent to customer.', 'woocommerce-germanized' ), false, true );
172
+ }
173
+ }
174
 
175
+ public function resend_order_confirmation( $order ) {
176
  // Send the customer invoice email.
177
  WC()->payment_gateways();
178
  WC()->shipping();
179
 
180
+ $mail_id = 'customer_processing_order';
181
+ $mail = WC_germanized()->emails->get_email_instance_by_id( $mail_id );
182
 
183
  if ( $mail ) {
184
  $mail->trigger( $order );
185
 
186
  // Note the event.
187
  $order->add_order_note( __( 'Order confirmation manually sent to customer.', 'woocommerce-germanized' ), false, true );
188
+
189
+ /**
190
+ * Admin manual resend order confirmation email.
191
+ *
192
+ * This hook fires after a manual resend of the order confirmation email has been triggered.
193
+ *
194
+ * @since 1.0.0
195
+ *
196
+ * @param WC_Order $order The order for which the confirmation email is sent.
197
+ * @param string $mail_id The email id (customer_processing_order).
198
+ */
199
+ do_action( 'woocommerce_gzd_after_resend_order_confirmation_email', $order, $mail_id );
200
  }
201
  }
202
 
203
  public function order_actions( $actions ) {
204
+ $actions['order_confirmation'] = __( 'Resend order confirmation', 'woocommerce-germanized' );
205
+ $actions['paid_for_order_notification'] = __( 'Send paid for order notification', 'woocommerce-germanized' );
206
+
207
+ return $actions;
208
  }
209
 
210
  public function status_tab() {
277
  }
278
 
279
  if ( $section === 'trusted_shops' ) {
280
+ /**
281
+ * Action to load Trusted Shops specific admin assets.
282
+ *
283
+ * This hook is used to load Trusted Shops assets within admin settings page.
284
+ *
285
+ * @since 1.6.3
286
+ */
287
  do_action( 'woocommerce_gzd_load_trusted_shops_script' );
288
  }
289
 
304
  wp_add_inline_style( 'woocommerce-gzd-admin', '#tagsdiv-product_delivery_time, #tagsdiv-product_unit, #tagsdiv-product_price_label {display: none}' );
305
  }
306
 
307
+ /**
308
+ * After admin assets.
309
+ *
310
+ * This hook fires after Germanized has loaded and enqueued it's admin assets.
311
+ *
312
+ * @since 1.0.0
313
+ *
314
+ * @param WC_GZD_Admin $this The admin class.
315
+ * @param string $admin_script_path The absolute URL to the plugins admin js scripts.
316
+ * @param string $suffix The assets suffix e.g. .min in non-debugging-mode.
317
+ */
318
  do_action( 'woocommerce_gzd_admin_assets', $this, $admin_script_path, $suffix );
319
  }
320
 
321
  public function localize_printed_scripts() {
322
+
323
+ /**
324
+ * Filter to localize certain admin scripts.
325
+ *
326
+ * @since 1.0.0
327
+ *
328
+ * @param array $scripts Array containing handle => data.
329
+ */
330
  $localized_scripts = apply_filters( 'woocommerce_gzd_admin_localized_scripts', array() );
331
 
332
  foreach( $localized_scripts as $handle => $data ) {
403
 
404
  } elseif ( current_user_can( 'manage_woocommerce' ) && isset( $_GET[ 'tour' ] ) && isset( $_GET[ 'enable' ] ) && isset( $_GET[ '_wpnonce' ] ) && check_admin_referer( 'wc-gzd-tour-enable' ) ) {
405
 
406
+ /** This filter is documented in includes/admin/settings/class-wc-gzd-settings-germanized.php */
407
+ $additional_sections = apply_filters( 'woocommerce_gzd_settings_sections', array() );
408
+
409
  $setting_sections = array_merge( array(
410
  'general' => '',
411
  'display' => '',
412
  'checkboxes' => '',
413
  'email' => ''
414
+ ), $additional_sections );
415
 
416
  delete_option( 'woocommerce_gzd_hide_tour' );
417
 
476
  // Reinstall options
477
  WC_GZD_Install::create_options();
478
 
479
+ /**
480
+ * After text options deletion.
481
+ *
482
+ * This hook fires after Germanized has deleted and re-installed it's text options.
483
+ *
484
+ * @since 1.6.0
485
+ */
486
  do_action( 'woocommerce_gzd_deleted_text_options' );
487
 
488
  // Redirect to check for updates
495
 
496
  wc_gzd_get_dependencies()->delete_cached_plugin_header_data();
497
 
498
+ /**
499
+ * After plugin header cache deletion.
500
+ *
501
+ * This hook fires after the dependency script has deleted it's cached plugin header data.
502
+ *
503
+ * @since 1.6.0
504
+ */
505
  do_action( 'woocommerce_gzd_deleted_cached_plugin_header_data' );
506
  }
507
  }
includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php CHANGED
@@ -96,21 +96,28 @@ class WC_Germanized_Meta_Box_Product_Data {
96
  // Update unit price based on whether the product is on sale or not
97
  if ( wc_gzd_get_gzd_product( $product )->has_unit() ) {
98
 
99
- // Let pro version filter prices
 
 
 
 
 
 
 
100
  $data = apply_filters( 'woocommerce_gzd_save_display_unit_price_data', array(
101
  '_unit_price_regular' => wc_gzd_get_gzd_product( $product )->get_unit_regular_price(),
102
  '_unit_price_sale' => wc_gzd_get_gzd_product( $product )->get_unit_sale_price(),
103
  ), $product );
104
 
105
  // Make sure we update automatically calculated prices
106
- update_post_meta( $product->get_id(), '_unit_price_regular', $data[ '_unit_price_regular' ] );
107
- update_post_meta( $product->get_id(), '_unit_price_sale', $data[ '_unit_price_sale' ] );
108
 
109
  // Lets update the display price
110
  if ( $product->is_on_sale() ) {
111
- update_post_meta( $product->get_id(), '_unit_price', $data[ '_unit_price_sale' ] );
112
  } else {
113
- update_post_meta( $product->get_id(), '_unit_price', $data[ '_unit_price_regular' ] );
114
  }
115
  }
116
  }
@@ -410,6 +417,14 @@ class WC_Germanized_Meta_Box_Product_Data {
410
  $data = array_replace_recursive( static::get_default_product_data( $product ), $data );
411
  }
412
 
 
 
 
 
 
 
 
 
413
  $data = apply_filters( 'woocommerce_gzd_product_saveable_data', $data, $product );
414
 
415
  $data = wp_parse_args( $data, array(
96
  // Update unit price based on whether the product is on sale or not
97
  if ( wc_gzd_get_gzd_product( $product )->has_unit() ) {
98
 
99
+ /**
100
+ * Filter to adjust unit price data before saving a product.
101
+ *
102
+ * @since 1.8.5
103
+ *
104
+ * @param array $data The unit price data.
105
+ * @param WC_Product $product The product object.
106
+ */
107
  $data = apply_filters( 'woocommerce_gzd_save_display_unit_price_data', array(
108
  '_unit_price_regular' => wc_gzd_get_gzd_product( $product )->get_unit_regular_price(),
109
  '_unit_price_sale' => wc_gzd_get_gzd_product( $product )->get_unit_sale_price(),
110
  ), $product );
111
 
112
  // Make sure we update automatically calculated prices
113
+ update_post_meta( $product->get_id(), '_unit_price_regular', $data['_unit_price_regular'] );
114
+ update_post_meta( $product->get_id(), '_unit_price_sale', $data['_unit_price_sale'] );
115
 
116
  // Lets update the display price
117
  if ( $product->is_on_sale() ) {
118
+ update_post_meta( $product->get_id(), '_unit_price', $data['_unit_price_sale'] );
119
  } else {
120
+ update_post_meta( $product->get_id(), '_unit_price', $data['_unit_price_regular'] );
121
  }
122
  }
123
  }
417
  $data = array_replace_recursive( static::get_default_product_data( $product ), $data );
418
  }
419
 
420
+ /**
421
+ * Filter that allows adjusting Germanized product data before saving.
422
+ *
423
+ * @since 1.8.5
424
+ *
425
+ * @param array $data Product data to be saved.
426
+ * @param WC_Product $product The product object.
427
+ */
428
  $data = apply_filters( 'woocommerce_gzd_product_saveable_data', $data, $product );
429
 
430
  $data = wp_parse_args( $data, array(
includes/admin/settings/class-wc-gzd-settings-germanized.php CHANGED
@@ -61,6 +61,13 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
61
 
62
  public function maybe_adjust_data_privacy_settings( $settings ) {
63
 
 
 
 
 
 
 
 
64
  if ( apply_filters( 'woocommerce_gzd_disable_wc_privacy_policy_options', true ) ) {
65
  $url = admin_url( 'admin.php?page=wc-settings&tab=germanized' );
66
  $delete = array(
@@ -115,6 +122,13 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
115
  * Gets setting sections
116
  */
117
  public function get_sections() {
 
 
 
 
 
 
 
118
  $sections = apply_filters( 'woocommerce_gzd_settings_sections', array(
119
  '' => __( 'General Options', 'woocommerce-germanized' ),
120
  'display' => __( 'Display Options', 'woocommerce-germanized' ),
@@ -450,6 +464,15 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
450
  'default' => __( 'Delivery time: {delivery_time}', 'woocommerce-germanized' ),
451
  ),
452
 
 
 
 
 
 
 
 
 
 
453
  array( 'type' => 'sectionend', 'id' => 'delivery_times_options' ),
454
 
455
  array( 'title' => __( 'Sale Price Labels', 'woocommerce-germanized' ), 'type' => 'title', 'desc' => '', 'id' => 'sale_price_labels_options' ),
@@ -629,8 +652,16 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
629
 
630
  ); // End general settings
631
 
 
 
 
 
 
 
 
 
 
632
  return apply_filters( 'woocommerce_germanized_settings', $settings );
633
-
634
  }
635
 
636
  public function get_email_settings() {
@@ -685,6 +716,15 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
685
 
686
  $settings = array_merge( $settings, $email_settings );
687
 
 
 
 
 
 
 
 
 
 
688
  $settings = array_merge( $settings, apply_filters( 'woocommerce_gzd_email_visibility_settings', array(
689
 
690
  array( 'type' => 'sectionend', 'id' => 'email_options' ),
@@ -760,8 +800,16 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
760
 
761
  ) );
762
 
 
 
 
 
 
 
 
 
 
763
  return apply_filters( 'woocommerce_germanized_settings_email', $settings );
764
-
765
  }
766
 
767
  public function get_display_settings() {
@@ -808,15 +856,6 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
808
  'css' => 'min-width:300px;',
809
  ),
810
 
811
- array(
812
- 'title' => __( 'Digital Delivery Time Text', 'woocommerce-germanized' ),
813
- 'id' => 'woocommerce_gzd_display_digital_delivery_time_text',
814
- 'default' => '',
815
- 'type' => 'text',
816
- 'desc_tip' => __( 'Enter a text which will be shown as digital delivery time text (replacement for default digital time on digital products).', 'woocommerce-germanized' ),
817
- 'css' => 'min-width:300px;',
818
- ),
819
-
820
  array(
821
  'title' => __( 'Notice Footer', 'woocommerce-germanized' ),
822
  'desc' => __( 'Show a global VAT notice within footer', 'woocommerce-germanized' ),
@@ -1316,8 +1355,16 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
1316
 
1317
  );
1318
 
 
 
 
 
 
 
 
 
 
1319
  return apply_filters( 'woocommerce_germanized_settings_display', $settings );
1320
-
1321
  }
1322
 
1323
  public function output() {
@@ -1329,18 +1376,69 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
1329
  if ( $this->get_sections() ) {
1330
  foreach ( $this->get_sections() as $section => $name ) {
1331
  if ( $section === $current_section ) {
 
 
 
 
 
 
 
 
1332
  $settings = apply_filters( 'woocommerce_gzd_get_settings_' . $section, $this->get_settings() );
 
 
 
 
 
 
 
 
1333
  $settings = apply_filters( 'woocommerce_gzd_get_settings_filter', $settings );
1334
 
 
 
 
 
 
 
 
1335
  $sidebar = apply_filters( 'woocommerce_gzd_get_sidebar_' . $section, $sidebar );
1336
  }
1337
  }
1338
  }
1339
 
 
 
 
 
 
 
 
 
 
 
1340
  do_action( 'woocommerce_gzd_before_section_output', $current_section );
1341
 
 
 
 
 
 
 
 
 
1342
  if ( apply_filters( 'woocommerce_gzd_settings_section_include_path', true, $current_section ) ) {
1343
- $path = apply_filters( 'woocommerce_gzd_settings_section_html_path', WC_GERMANIZED_ABSPATH . 'includes/admin/views/html-settings-section.php', $current_section );
 
 
 
 
 
 
 
 
 
 
1344
  include_once( $path );
1345
  }
1346
  }
@@ -1364,19 +1462,55 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
1364
  if ( $this->get_sections() ) {
1365
  foreach ( $this->get_sections() as $section => $name ) {
1366
  if ( $section == $current_section ) {
 
 
 
 
 
 
 
 
1367
  $settings = apply_filters( 'woocommerce_gzd_get_settings_' . $section, $this->get_settings() );
1368
  }
1369
  }
1370
  }
1371
 
1372
- if ( empty( $settings ) )
1373
  return;
 
1374
 
 
 
 
 
 
 
 
 
 
 
1375
  do_action( 'woocommerce_gzd_before_save_section_' . $current_section, $settings );
1376
 
1377
- if ( apply_filters( 'wc_germanized_show_settings_' . $current_section, true ) )
 
 
 
 
 
 
1378
  WC_Admin_Settings::save_fields( $settings );
 
1379
 
 
 
 
 
 
 
 
 
 
 
1380
  do_action( 'woocommerce_gzd_after_save_section_' . $current_section, $settings );
1381
  }
1382
 
61
 
62
  public function maybe_adjust_data_privacy_settings( $settings ) {
63
 
64
+ /**
65
+ * Filter that allows you to turn off disabling default WooCommerce privacy notice.
66
+ *
67
+ * @since 1.9.10
68
+ *
69
+ * @param bool $enable Set to false to re-enable Woo privacy notice.
70
+ */
71
  if ( apply_filters( 'woocommerce_gzd_disable_wc_privacy_policy_options', true ) ) {
72
  $url = admin_url( 'admin.php?page=wc-settings&tab=germanized' );
73
  $delete = array(
122
  * Gets setting sections
123
  */
124
  public function get_sections() {
125
+ /**
126
+ * Filter available admin setting sections.
127
+ *
128
+ * @since 1.0.0
129
+ *
130
+ * @param array $sections Key => value array containing section keys and titles.
131
+ */
132
  $sections = apply_filters( 'woocommerce_gzd_settings_sections', array(
133
  '' => __( 'General Options', 'woocommerce-germanized' ),
134
  'display' => __( 'Display Options', 'woocommerce-germanized' ),
464
  'default' => __( 'Delivery time: {delivery_time}', 'woocommerce-germanized' ),
465
  ),
466
 
467
+ array(
468
+ 'title' => __( 'Digital Delivery Time Text', 'woocommerce-germanized' ),
469
+ 'id' => 'woocommerce_gzd_display_digital_delivery_time_text',
470
+ 'default' => '',
471
+ 'type' => 'text',
472
+ 'desc_tip' => __( 'Enter a text which will be shown as digital delivery time text (replacement for default digital time on digital products).', 'woocommerce-germanized' ),
473
+ 'css' => 'min-width:300px;',
474
+ ),
475
+
476
  array( 'type' => 'sectionend', 'id' => 'delivery_times_options' ),
477
 
478
  array( 'title' => __( 'Sale Price Labels', 'woocommerce-germanized' ), 'type' => 'title', 'desc' => '', 'id' => 'sale_price_labels_options' ),
652
 
653
  ); // End general settings
654
 
655
+ /**
656
+ * Filter admin general settings.
657
+ *
658
+ * This filter allows filtering available general settings.
659
+ *
660
+ * @since 1.0.0
661
+ *
662
+ * @param array $settings Array containing the settings.
663
+ */
664
  return apply_filters( 'woocommerce_germanized_settings', $settings );
 
665
  }
666
 
667
  public function get_email_settings() {
716
 
717
  $settings = array_merge( $settings, $email_settings );
718
 
719
+ /**
720
+ * Filter email visibility settings.
721
+ *
722
+ * This filter allows filtering available email visibility settings.
723
+ *
724
+ * @since 1.0.0
725
+ *
726
+ * @param array $settings Array containing the settings.
727
+ */
728
  $settings = array_merge( $settings, apply_filters( 'woocommerce_gzd_email_visibility_settings', array(
729
 
730
  array( 'type' => 'sectionend', 'id' => 'email_options' ),
800
 
801
  ) );
802
 
803
+ /**
804
+ * Filter admin email settings.
805
+ *
806
+ * This filter allows filtering available email settings.
807
+ *
808
+ * @since 1.0.0
809
+ *
810
+ * @param array $settings Array containing the settings.
811
+ */
812
  return apply_filters( 'woocommerce_germanized_settings_email', $settings );
 
813
  }
814
 
815
  public function get_display_settings() {
856
  'css' => 'min-width:300px;',
857
  ),
858
 
 
 
 
 
 
 
 
 
 
859
  array(
860
  'title' => __( 'Notice Footer', 'woocommerce-germanized' ),
861
  'desc' => __( 'Show a global VAT notice within footer', 'woocommerce-germanized' ),
1355
 
1356
  );
1357
 
1358
+ /**
1359
+ * Filter admin display settings.
1360
+ *
1361
+ * This filter allows filtering available display settings.
1362
+ *
1363
+ * @since 1.0.0
1364
+ *
1365
+ * @param array $settings Array containing the settings.
1366
+ */
1367
  return apply_filters( 'woocommerce_germanized_settings_display', $settings );
 
1368
  }
1369
 
1370
  public function output() {
1376
  if ( $this->get_sections() ) {
1377
  foreach ( $this->get_sections() as $section => $name ) {
1378
  if ( $section === $current_section ) {
1379
+
1380
+ /**
1381
+ * Filter settings for a certain `$section`.
1382
+ *
1383
+ * @since 1.0.0
1384
+ *
1385
+ * @param array $settings Array containing settings.
1386
+ */
1387
  $settings = apply_filters( 'woocommerce_gzd_get_settings_' . $section, $this->get_settings() );
1388
+
1389
+ /**
1390
+ * Filter settings.
1391
+ *
1392
+ * @since 1.0.0
1393
+ *
1394
+ * @param array $settings Array containing settings.
1395
+ */
1396
  $settings = apply_filters( 'woocommerce_gzd_get_settings_filter', $settings );
1397
 
1398
+ /**
1399
+ * Filter current sidebar for a certain `$section`.
1400
+ *
1401
+ * @since 1.0.0
1402
+ *
1403
+ * @param string $sidebar The sidebar name.
1404
+ */
1405
  $sidebar = apply_filters( 'woocommerce_gzd_get_sidebar_' . $section, $sidebar );
1406
  }
1407
  }
1408
  }
1409
 
1410
+ /**
1411
+ * Fires before a specific setting tab (section) outputs.
1412
+ *
1413
+ * This hook fires before a certain setting tab (e.g. display settings) outputs it's content.
1414
+ * You may insert data right before the output of the tab through this hook.
1415
+ *
1416
+ * @since 1.0.0
1417
+ *
1418
+ * @param string $current_section the name of the current tab (section).
1419
+ */
1420
  do_action( 'woocommerce_gzd_before_section_output', $current_section );
1421
 
1422
+ /**
1423
+ * Filter to stop including settings section for a certain section.
1424
+ *
1425
+ * @since 1.0.0
1426
+ *
1427
+ * @param bool $stop Set to false to disable including settings section.
1428
+ * @param string $current_section The current section e.g. display.
1429
+ */
1430
  if ( apply_filters( 'woocommerce_gzd_settings_section_include_path', true, $current_section ) ) {
1431
+
1432
+ /**
1433
+ * Filter the view path for a certain setting section.
1434
+ *
1435
+ * @since 1.0.0
1436
+ *
1437
+ * @param string $path Path to the admin section view template.
1438
+ * @param string $current_section The current section.
1439
+ */
1440
+ $path = apply_filters( 'woocommerce_gzd_settings_section_html_path', WC_GERMANIZED_ABSPATH . 'includes/admin/views/html-settings-section.php', $current_section );
1441
+
1442
  include_once( $path );
1443
  }
1444
  }
1462
  if ( $this->get_sections() ) {
1463
  foreach ( $this->get_sections() as $section => $name ) {
1464
  if ( $section == $current_section ) {
1465
+
1466
+ /**
1467
+ * Filter available settings for a certain `$section` before saving.
1468
+ *
1469
+ * @since 1.0.0
1470
+ *
1471
+ * @param array $settings Array containing settings.
1472
+ */
1473
  $settings = apply_filters( 'woocommerce_gzd_get_settings_' . $section, $this->get_settings() );
1474
  }
1475
  }
1476
  }
1477
 
1478
+ if ( empty( $settings ) ) {
1479
  return;
1480
+ }
1481
 
1482
+ /**
1483
+ * Before saving settings section.
1484
+ *
1485
+ * This hook fires right before a certain section (tab) will save it's settings.
1486
+ * `$current_section` contains the name of the tab (e.g. display or email).
1487
+ *
1488
+ * @since 1.0.0
1489
+ *
1490
+ * @param array $settings Array containing the settings of the current section.
1491
+ */
1492
  do_action( 'woocommerce_gzd_before_save_section_' . $current_section, $settings );
1493
 
1494
+ /**
1495
+ * Filter to disable showing/saving fields for a certain section.
1496
+ * `$current_section` contains the section key e.g. display.
1497
+ *
1498
+ * @param bool $enabled Set to false to disable.
1499
+ */
1500
+ if ( apply_filters( 'wc_germanized_show_settings_' . $current_section, true ) ) {
1501
  WC_Admin_Settings::save_fields( $settings );
1502
+ }
1503
 
1504
+ /**
1505
+ * After saving settings section.
1506
+ *
1507
+ * This hook fires right after a certain section (tab) saves it's settings.
1508
+ * `$current_section` contains the name of the tab (e.g. display or email).
1509
+ *
1510
+ * @since 1.0.0
1511
+ *
1512
+ * @param array $settings Array containing the settings of the current section.
1513
+ */
1514
  do_action( 'woocommerce_gzd_after_save_section_' . $current_section, $settings );
1515
  }
1516
 
includes/admin/views/html-admin-page-checkbox.php CHANGED
@@ -4,6 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
 
 
7
  ?>
8
 
9
  <h2>
@@ -12,11 +13,35 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  </h2>
13
 
14
  <div class="wc-gzd-admin-settings wc-gzd-admin-settings-checkboxes">
15
- <?php do_action( "woocommerce_gzd_settings_section_before_checkbox_options_{$checkbox->get_id()}", $checkbox ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  <?php $checkbox->admin_options(); ?>
18
 
19
- <?php do_action( "woocommerce_gzd_settings_section_after_checkbox_options_{$checkbox->get_id()}", $checkbox ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
20
  </div>
21
 
22
  <?php if ( ! WC_germanized()->is_pro() ) : ?>
4
  exit;
5
  }
6
 
7
+ $checkbox_id = $checkbox->get_id()
8
  ?>
9
 
10
  <h2>
13
  </h2>
14
 
15
  <div class="wc-gzd-admin-settings wc-gzd-admin-settings-checkboxes">
16
+ <?php
17
+
18
+ /**
19
+ * Before output admin checkbox settings.
20
+ *
21
+ * Fires before a checkbox admin settings screen is rendered.
22
+ *
23
+ * @since 2.0.0
24
+ *
25
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
26
+ */
27
+ do_action( "woocommerce_gzd_settings_section_before_checkbox_options_{$checkbox_id}", $checkbox );
28
+ ?>
29
 
30
  <?php $checkbox->admin_options(); ?>
31
 
32
+ <?php
33
+
34
+ /**
35
+ * After output admin checkbox settings.
36
+ *
37
+ * Fires after a checkbox admin settings screen is rendered.
38
+ *
39
+ * @since 2.0.0
40
+ *
41
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
42
+ */
43
+ do_action( "woocommerce_gzd_settings_section_after_checkbox_options_{$checkbox_id}", $checkbox );
44
+ ?>
45
  </div>
46
 
47
  <?php if ( ! WC_germanized()->is_pro() ) : ?>
includes/admin/views/html-admin-page-checkboxes.php CHANGED
@@ -2,11 +2,18 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
 
 
 
 
 
 
 
5
  ?>
6
 
7
  <h2 class="wc-gzd-legal-checkboxes-heading">
8
  <?php _e( 'Checkboxes', 'woocommerce-germanized' ); ?>
9
- <a href="<?php echo apply_filters( 'woocommerce_gzd_admin_new_legal_checkbox_link', 'https://vendidero.de/woocommerce-germanized' ); ?>" class="page-title-action wc-gzd-disabled-button" target="<?php echo ( ! WC_germanized()->is_pro() ? '_blank' : '_self' ); ?>"><?php esc_html_e( 'Add checkbox', 'woocommerce-germanized' ); ?> <?php echo ( ! WC_germanized()->is_pro() ? '<span class="wc-gzd-premium-section-tab">pro</span>' : '' ); ?></a>
10
  </h2>
11
  <p><?php echo __( 'Legal checkboxes are being used to ask the customer for a certain permission or action (e.g. to accept terms & conditions) before the checkout or another form may be completed.', 'woocommerce-germanized' ); ?></p>
12
  <table class="wc-gzd-legal-checkboxes widefat">
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
+
6
+ /**
7
+ * {@internal Missing Summary}
8
+ *
9
+ * @since 2.0.0
10
+ */
11
+ $new_checkbox_link = apply_filters( 'woocommerce_gzd_admin_new_legal_checkbox_link', 'https://vendidero.de/woocommerce-germanized' );
12
  ?>
13
 
14
  <h2 class="wc-gzd-legal-checkboxes-heading">
15
  <?php _e( 'Checkboxes', 'woocommerce-germanized' ); ?>
16
+ <a href="<?php echo $new_checkbox_link; ?>" class="page-title-action wc-gzd-disabled-button" target="<?php echo ( ! WC_germanized()->is_pro() ? '_blank' : '_self' ); ?>"><?php esc_html_e( 'Add checkbox', 'woocommerce-germanized' ); ?> <?php echo ( ! WC_germanized()->is_pro() ? '<span class="wc-gzd-premium-section-tab">pro</span>' : '' ); ?></a>
17
  </h2>
18
  <p><?php echo __( 'Legal checkboxes are being used to ask the customer for a certain permission or action (e.g. to accept terms & conditions) before the checkout or another form may be completed.', 'woocommerce-germanized' ); ?></p>
19
  <table class="wc-gzd-legal-checkboxes widefat">
includes/admin/views/html-page-status-germanized.php CHANGED
@@ -56,7 +56,17 @@ if ( ! defined( 'ABSPATH' ) )
56
  <td class="help">&nbsp;</td>
57
  <td><?php echo 'yes' === get_option( 'woocommerce_gzd_display_checkout_fallback' ) ? '<mark class="yes">'.'&#10004;'.'</mark>' : '<mark class="no">'.'&ndash;'.'</mark>'; ?></td>
58
  </tr>
59
- <?php do_action( 'woocommerce_gzd_status_after_germanized' ); ?>
 
 
 
 
 
 
 
 
 
 
60
  </tbody>
61
  </table>
62
 
@@ -131,7 +141,17 @@ if ( ! defined( 'ABSPATH' ) )
131
  <td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr( __( 'Checks whether all WooCommerce tax relevant tables have been added.', 'woocommerce-germanized' ) ) . '">[?]</a>'; ?></td>
132
  <td><?php echo WC_GZD_Admin_Status::tax_tables_exist() ? '<mark class="yes">'.'&#10004;'.'</mark>' : '<mark class="no">'.'&ndash;'.'</mark>' . ' [' .sprintf( __( 'Missing: %s', 'woocommerce-germanized' ), implode( ', ', WC_GZD_Admin_Status::get_missing_tax_tables() ) ) . ']'; ?></td>
133
  </tr>
134
- <?php do_action( 'woocommerce_gzd_status_after_vat' ); ?>
 
 
 
 
 
 
 
 
 
 
135
  </tbody>
136
  </table>
137
 
@@ -151,7 +171,16 @@ if ( ! defined( 'ABSPATH' ) )
151
  </tr>
152
 
153
  <?php endforeach; ?>
154
- <?php do_action( 'woocommerce_gzd_status_after_legal_pages' ); ?>
 
 
 
 
 
 
 
 
 
155
  </tbody>
156
  </table>
157
 
@@ -182,7 +211,16 @@ if ( ! defined( 'ABSPATH' ) )
182
 
183
  <?php endforeach; ?>
184
 
185
- <?php do_action( 'woocommerce_gzd_status_after_compatibility' ); ?>
 
 
 
 
 
 
 
 
 
186
  </tbody>
187
  </table>
188
 
@@ -223,7 +261,16 @@ if ( ! defined( 'ABSPATH' ) )
223
  <td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr( __( 'Germanized might ask you to leave a review or notices you of using a possibly unsupported theme. If you want to disable these notices, check this option.', 'woocommerce-germanized' ) ) . '">[?]</a>'; ?></td>
224
  <td><a href="<?php echo wp_nonce_url( add_query_arg( array( 'check-notices' => true ) ), 'wc-gzd-notices' ); ?>" class="button button-secondary"><?php echo 'yes' === get_option( 'woocommerce_gzd_disable_notices' ) ? __( 'Enable notices', 'woocommerce-germanized' ) : __( 'Disable notices', 'woocommerce-germanized' ); ?></a></td>
225
  </tr>
226
- <?php do_action( 'woocommerce_gzd_status_after_tools' ); ?>
 
 
 
 
 
 
 
 
 
227
  </tbody>
228
  </table>
229
 
@@ -236,6 +283,13 @@ if ( ! defined( 'ABSPATH' ) )
236
  <tbody>
237
  <?php
238
 
 
 
 
 
 
 
 
239
  $template_paths = apply_filters( 'woocommerce_gzd_template_overrides_scan_paths', array( 'WooCommerce Germanized' => WC_germanized()->plugin_path() . '/templates/' ) );
240
  $scanned_files = array();
241
  $found_files = array();
@@ -268,7 +322,16 @@ if ( ! defined( 'ABSPATH' ) )
268
 
269
  if ( $theme_file ) {
270
 
271
- $core_version = WC_Admin_Status::get_file_version( apply_filters( 'woocommerce_gzd_template_overrides_scan_plugin_dir', WC()->plugin_path() . '/templates/' . $file, $plugin_name, $file ) );
 
 
 
 
 
 
 
 
 
272
  $theme_version = WC_Admin_Status::get_file_version( $theme_file );
273
 
274
  if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
@@ -306,13 +369,23 @@ if ( ! defined( 'ABSPATH' ) )
306
  if ( true === $outdated_templates ) {
307
  ?>
308
  <tr>
 
309
  <td>&nbsp;</td>
310
  <td><a href="http://speakinginbytes.com/2014/02/woocommerce-2-1-outdated-templates/" target="_blank"><?php _e( 'Learn how to update outdated templates', 'woocommerce-germanized' ) ?></a></td>
311
  </tr>
312
  <?php
313
  }
314
  ?>
315
- <?php do_action( 'woocommerce_gzd_status_after_templates' ); ?>
 
 
 
 
 
 
 
 
 
316
  </tbody>
317
  </table>
318
 
56
  <td class="help">&nbsp;</td>
57
  <td><?php echo 'yes' === get_option( 'woocommerce_gzd_display_checkout_fallback' ) ? '<mark class="yes">'.'&#10004;'.'</mark>' : '<mark class="no">'.'&ndash;'.'</mark>'; ?></td>
58
  </tr>
59
+ <?php
60
+
61
+ /**
62
+ * After Germanized status page output.
63
+ *
64
+ * Fires after Germanized has rendered it's status page.
65
+ *
66
+ * @since 1.0.0
67
+ */
68
+ do_action( 'woocommerce_gzd_status_after_germanized' );
69
+ ?>
70
  </tbody>
71
  </table>
72
 
141
  <td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr( __( 'Checks whether all WooCommerce tax relevant tables have been added.', 'woocommerce-germanized' ) ) . '">[?]</a>'; ?></td>
142
  <td><?php echo WC_GZD_Admin_Status::tax_tables_exist() ? '<mark class="yes">'.'&#10004;'.'</mark>' : '<mark class="no">'.'&ndash;'.'</mark>' . ' [' .sprintf( __( 'Missing: %s', 'woocommerce-germanized' ), implode( ', ', WC_GZD_Admin_Status::get_missing_tax_tables() ) ) . ']'; ?></td>
143
  </tr>
144
+ <?php
145
+
146
+ /**
147
+ * After VAT status.
148
+ *
149
+ * Fires after Germanized has rendered the VAT status section.
150
+ *
151
+ * @since 1.0.0
152
+ */
153
+ do_action( 'woocommerce_gzd_status_after_vat' );
154
+ ?>
155
  </tbody>
156
  </table>
157
 
171
  </tr>
172
 
173
  <?php endforeach; ?>
174
+ <?php
175
+ /**
176
+ * After legal pages section.
177
+ *
178
+ * Fires after the legal pages section within the Germanized status page.
179
+ *
180
+ * @since 1.0.0
181
+ */
182
+ do_action( 'woocommerce_gzd_status_after_legal_pages' );
183
+ ?>
184
  </tbody>
185
  </table>
186
 
211
 
212
  <?php endforeach; ?>
213
 
214
+ <?php
215
+ /**
216
+ * After compatibility section.
217
+ *
218
+ * Fires after the compatibility section within the Germanized status page.
219
+ *
220
+ * @since 1.0.0
221
+ */
222
+ do_action( 'woocommerce_gzd_status_after_compatibility' );
223
+ ?>
224
  </tbody>
225
  </table>
226
 
261
  <td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr( __( 'Germanized might ask you to leave a review or notices you of using a possibly unsupported theme. If you want to disable these notices, check this option.', 'woocommerce-germanized' ) ) . '">[?]</a>'; ?></td>
262
  <td><a href="<?php echo wp_nonce_url( add_query_arg( array( 'check-notices' => true ) ), 'wc-gzd-notices' ); ?>" class="button button-secondary"><?php echo 'yes' === get_option( 'woocommerce_gzd_disable_notices' ) ? __( 'Enable notices', 'woocommerce-germanized' ) : __( 'Disable notices', 'woocommerce-germanized' ); ?></a></td>
263
  </tr>
264
+ <?php
265
+ /**
266
+ * After tools section.
267
+ *
268
+ * Fires after the tools section within the Germanized status page.
269
+ *
270
+ * @since 1.0.0
271
+ */
272
+ do_action( 'woocommerce_gzd_status_after_tools' );
273
+ ?>
274
  </tbody>
275
  </table>
276
 
283
  <tbody>
284
  <?php
285
 
286
+ /**
287
+ * Filters Germanized template override scan paths.
288
+ *
289
+ * @since 1.0.0
290
+ *
291
+ * @param array $path The path data.
292
+ */
293
  $template_paths = apply_filters( 'woocommerce_gzd_template_overrides_scan_paths', array( 'WooCommerce Germanized' => WC_germanized()->plugin_path() . '/templates/' ) );
294
  $scanned_files = array();
295
  $found_files = array();
322
 
323
  if ( $theme_file ) {
324
 
325
+ /**
326
+ * Filter to adjust the core template plugin path.
327
+ *
328
+ * @since 1.0.0
329
+ *
330
+ * @param string $path The template file core path.
331
+ * @param string $name The template name.
332
+ * @param string $file The template file.
333
+ */
334
+ $core_version = WC_Admin_Status::get_file_version( apply_filters( 'woocommerce_gzd_template_overrides_scan_plugin_dir', WC_germanized()->plugin_path() . '/templates/' . $file, $plugin_name, $file ) );
335
  $theme_version = WC_Admin_Status::get_file_version( $theme_file );
336
 
337
  if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
369
  if ( true === $outdated_templates ) {
370
  ?>
371
  <tr>
372
+ <td></td>
373
  <td>&nbsp;</td>
374
  <td><a href="http://speakinginbytes.com/2014/02/woocommerce-2-1-outdated-templates/" target="_blank"><?php _e( 'Learn how to update outdated templates', 'woocommerce-germanized' ) ?></a></td>
375
  </tr>
376
  <?php
377
  }
378
  ?>
379
+ <?php
380
+ /**
381
+ * After templates section.
382
+ *
383
+ * Fires after the templates section within the Germanized status page.
384
+ *
385
+ * @since 1.0.0
386
+ */
387
+ do_action( 'woocommerce_gzd_status_after_templates' );
388
+ ?>
389
  </tbody>
390
  </table>
391
 
includes/admin/views/html-settings-section.php CHANGED
@@ -6,14 +6,49 @@
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit; // Exit if accessed directly
8
  }
 
 
 
 
 
 
 
 
 
 
 
9
  ?>
10
 
11
- <div class="wc-gzd-admin-settings wc-gzd-admin-settings-<?php echo sanitize_title( $current_section ); ?> <?php echo apply_filters( 'woocommerce_gzd_settings_wrapper_' . $current_section, '' ); ?>">
12
- <?php do_action( 'wc_germanized_settings_section_before_' . sanitize_title( $current_section ) ); ?>
13
- <?php if ( apply_filters( 'wc_germanized_show_settings_' . sanitize_title( $current_section ), true ) ) : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <?php WC_Admin_Settings::output_fields( $settings ); ?>
15
  <?php endif; ?>
16
- <?php do_action( 'wc_germanized_settings_section_after_' . sanitize_title( $current_section ) ); ?>
 
 
 
 
 
 
 
 
 
 
 
17
  </div>
18
 
19
  <?php echo $sidebar; ?>
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit; // Exit if accessed directly
8
  }
9
+
10
+ $section_key = sanitize_title( $current_section );
11
+ /**
12
+ * Filter to adjust the div class for `$current_section` within the Germanized
13
+ * admin settings screen.
14
+ *
15
+ * @since 1.0.0
16
+ *
17
+ * @param string $classname The class name.
18
+ */
19
+ $settings_wrapper = apply_filters( 'woocommerce_gzd_settings_wrapper_' . $current_section, '' );
20
  ?>
21
 
22
+ <div class="wc-gzd-admin-settings wc-gzd-admin-settings-<?php echo $section_key; ?> <?php echo esc_attr( $settings_wrapper ); ?>">
23
+ <?php
24
+ /**
25
+ * Before admin section output.
26
+ *
27
+ * Executes right before setting output for a specific admin setting section.
28
+ * `$section_key` equals the current section e.g. display or email.
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ do_action( 'wc_germanized_settings_section_before_' . $section_key );
33
+ ?>
34
+
35
+ <?php
36
+ /** This filter is documented in includes/admin/settings/class-wc-gzd-settings-germanized.php */
37
+ if ( apply_filters( 'wc_germanized_show_settings_' . $section_key, true ) ) : ?>
38
  <?php WC_Admin_Settings::output_fields( $settings ); ?>
39
  <?php endif; ?>
40
+
41
+ <?php
42
+ /**
43
+ * After admin section output.
44
+ *
45
+ * Executes right after setting output for a specific admin setting section.
46
+ * `$section_key` equals the current section e.g. display or email.
47
+ *
48
+ * @since 1.0.0
49
+ */
50
+ do_action( 'wc_germanized_settings_section_after_' . $section_key );
51
+ ?>
52
  </div>
53
 
54
  <?php echo $sidebar; ?>
includes/api/class-wc-gzd-rest-api.php CHANGED
@@ -46,7 +46,14 @@ class WC_GZD_REST_API {
46
  }
47
 
48
  public function register_rest_routes() {
49
-
 
 
 
 
 
 
 
50
  $controllers = apply_filters( 'woocommerce_gzd_rest_controller', array(
51
  'WC_GZD_REST_Product_Delivery_Times_V1_Controller',
52
  'WC_GZD_REST_Product_Delivery_Times_Controller',
46
  }
47
 
48
  public function register_rest_routes() {
49
+
50
+ /**
51
+ * Filter to add new REST controller to Germanized.
52
+ *
53
+ * @since 1.8.5
54
+ *
55
+ * @param array $controllers The controller classes.
56
+ */
57
  $controllers = apply_filters( 'woocommerce_gzd_rest_controller', array(
58
  'WC_GZD_REST_Product_Delivery_Times_V1_Controller',
59
  'WC_GZD_REST_Product_Delivery_Times_Controller',
includes/api/class-wc-gzd-rest-products-controller.php CHANGED
@@ -347,8 +347,16 @@ class WC_GZD_REST_Products_Controller {
347
 
348
  $response->set_data( array_merge( $response->data, $this->get_product_data( $product ) ) );
349
 
 
 
 
 
 
 
 
 
 
350
  return apply_filters( 'woocommerce_gzd_rest_prepare_product', $response, $product, $request );
351
-
352
  }
353
 
354
  public function insert_update_v3( $product, $request, $inserted ) {
347
 
348
  $response->set_data( array_merge( $response->data, $this->get_product_data( $product ) ) );
349
 
350
+ /**
351
+ * Filter to adjust the REST response after preparing the product.
352
+ *
353
+ * @since 1.8.5
354
+ *
355
+ * @param WP_REST_Response $response The response.
356
+ * @param WC_Product $product The product object.
357
+ * @param WP_REST_Request $request The request object.
358
+ */
359
  return apply_filters( 'woocommerce_gzd_rest_prepare_product', $response, $product, $request );
 
360
  }
361
 
362
  public function insert_update_v3( $product, $request, $inserted ) {
includes/api/v1/class-wc-gzd-rest-product-delivery-times-controller.php CHANGED
@@ -53,15 +53,6 @@ class WC_GZD_REST_Product_Delivery_Times_V1_Controller extends WC_REST_Terms_Con
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
56
- /**
57
- * Filter a term item returned from the API.
58
- *
59
- * Allows modification of the term data right before it is returned.
60
- *
61
- * @param \WP_REST_Response $response The response object.
62
- * @param object $item The original term object.
63
- * @param \WP_REST_Request $request Request used to generate the response.
64
- */
65
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
66
  }
67
 
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
 
 
 
 
 
 
 
 
 
56
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
57
  }
58
 
includes/api/v1/class-wc-gzd-rest-product-price-labels-controller.php CHANGED
@@ -53,15 +53,6 @@ class WC_GZD_REST_Product_Price_Labels_V1_Controller extends WC_REST_Terms_Contr
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
56
- /**
57
- * Filter a term item returned from the API.
58
- *
59
- * Allows modification of the term data right before it is returned.
60
- *
61
- * @param \WP_REST_Response $response The response object.
62
- * @param object $item The original term object.
63
- * @param \WP_REST_Request $request Request used to generate the response.
64
- */
65
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
66
  }
67
 
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
 
 
 
 
 
 
 
 
 
56
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
57
  }
58
 
includes/api/v1/class-wc-gzd-rest-product-units-controller.php CHANGED
@@ -53,15 +53,6 @@ class WC_GZD_REST_Product_Units_V1_Controller extends WC_REST_Terms_Controller {
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
56
- /**
57
- * Filter a term item returned from the API.
58
- *
59
- * Allows modification of the term data right before it is returned.
60
- *
61
- * @param \WP_REST_Response $response The response object.
62
- * @param object $item The original term object.
63
- * @param \WP_REST_Request $request Request used to generate the response.
64
- */
65
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
66
  }
67
 
53
 
54
  $response->add_links( $this->prepare_links( $item, $request ) );
55
 
 
 
 
 
 
 
 
 
 
56
  return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
57
  }
58
 
includes/class-wc-gzd-ajax.php CHANGED
@@ -80,12 +80,19 @@ class WC_GZD_AJAX {
80
  continue;
81
  }
82
 
83
- $checkbox_data = array_intersect_key(
84
- $data, apply_filters( 'woocommerce_gzd_legal_checkboxes_option_keys', array(
85
- 'id' => '',
86
- 'priority' => 1,
87
- ) )
88
- );
 
 
 
 
 
 
 
89
 
90
  if ( ! isset( $options[ $id ] ) || ! is_array( $options[ $id ] ) ) {
91
  $options[ $id ] = array();
80
  continue;
81
  }
82
 
83
+ /**
84
+ * Filters legal checkbox default option keys.
85
+ *
86
+ * @since 2.0.0
87
+ *
88
+ * @param array $args Option keys.
89
+ */
90
+ $keys = apply_filters( 'woocommerce_gzd_legal_checkboxes_option_keys', array(
91
+ 'id' => '',
92
+ 'priority' => 1,
93
+ ) );
94
+
95
+ $checkbox_data = array_intersect_key( $data, $keys );
96
 
97
  if ( ! isset( $options[ $id ] ) || ! is_array( $options[ $id ] ) ) {
98
  $options[ $id ] = array();
includes/class-wc-gzd-cache-helper.php CHANGED
@@ -30,6 +30,16 @@ class WC_GZD_Cache_Helper {
30
  call_user_func( 'w3tc_' . $type . 'cache_flush' );
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
33
  do_action( 'woocommerce_gzd_maybe_flush_cache', $type, $cache_args );
34
  }
35
  }
30
  call_user_func( 'w3tc_' . $type . 'cache_flush' );
31
  }
32
 
33
+ /**
34
+ * Flush cache action.
35
+ *
36
+ * Trigger the flush cache action to indicate that Germanized wants to flush the cache.
37
+ *
38
+ * @since 1.0.0
39
+ *
40
+ * @param string $type Cache type e.g. db.
41
+ * @param array $cache_args Additional arguments.
42
+ */
43
  do_action( 'woocommerce_gzd_maybe_flush_cache', $type, $cache_args );
44
  }
45
  }
includes/class-wc-gzd-checkout.php CHANGED
@@ -153,11 +153,32 @@ class WC_GZD_Checkout {
153
 
154
  update_post_meta( $order_id, '_parcel_delivery_opted_in', $selected ? 'yes' : 'no' );
155
 
 
 
 
 
 
 
 
 
 
 
156
  do_action( 'woocommerce_gzd_parcel_delivery_order_opted_in', $order_id, $selected );
157
  }
158
  }
159
 
160
  public function set_payment_url_to_force_payment( $url, $order ) {
 
 
 
 
 
 
 
 
 
 
 
161
  if ( strpos( $url, 'pay_for_order' ) !== false && apply_filters( 'woocommerce_gzd_enable_force_pay_order', true, $order ) ) {
162
  $url = add_query_arg( array( 'force_pay_order' => true ), $url );
163
  }
@@ -184,9 +205,11 @@ class WC_GZD_Checkout {
184
  // Check if gateway is available - otherwise don't force redirect - would lead to errors in pay_action
185
  $gateways = WC()->payment_gateways->get_available_payment_gateways();
186
 
187
- if ( ! isset( $gateways[ wc_gzd_get_crud_data( $order, 'payment_method' ) ] ) )
188
  return;
 
189
 
 
190
  if ( apply_filters( 'woocommerce_gzd_enable_force_pay_order', true, $order ) ) {
191
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_force_pay_script' ), 20 );
192
  add_action( 'woocommerce_after_pay_action', array( $this, 'maybe_disable_force_pay_script' ), 20 );
@@ -293,9 +316,39 @@ class WC_GZD_Checkout {
293
  $enabled = false;
294
  }
295
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  if ( apply_filters( 'woocommerce_gzd_show_order_pay_now_button', $enabled, $order_id ) ) {
297
  $url = $order->get_checkout_payment_url();
298
 
 
 
 
 
 
 
 
 
 
 
299
  if ( apply_filters( 'woocommerce_gzd_add_force_pay_order_parameter', true, $order_id ) ) {
300
  $url = add_query_arg( array( 'force_pay_order' => true ), $url );
301
  }
@@ -362,6 +415,17 @@ class WC_GZD_Checkout {
362
  if ( $search && isset( $matches[1] ) ) {
363
  $order_id = absint( $matches[1] );
364
  $order = wc_get_order( $order_id );
 
 
 
 
 
 
 
 
 
 
 
365
  $return = apply_filters( 'woocommerce_gzd_attempt_order_cancellation_url', add_query_arg( array( 'retry' => true ), $order->get_checkout_order_received_url(), $order ) );
366
  }
367
 
@@ -369,12 +433,12 @@ class WC_GZD_Checkout {
369
  }
370
 
371
  public function init_fields() {
372
- if ( get_option( 'woocommerce_gzd_checkout_address_field' ) == 'yes' ) {
373
  $this->custom_fields['title'] = array(
374
  'type' => 'select',
375
  'required' => false,
376
  'label' => __( 'Title', 'woocommerce-germanized' ),
377
- 'options' => apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) ),
378
  'before' => 'first_name',
379
  'group' => array( 'billing', 'shipping' ),
380
  'priority' => 0,
@@ -383,7 +447,7 @@ class WC_GZD_Checkout {
383
  $this->custom_fields_admin['title'] = array(
384
  'before' => 'first_name',
385
  'type' => 'select',
386
- 'options' => apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) ),
387
  'label' => __( 'Title', 'woocommerce-germanized' ),
388
  'show' => false,
389
  'priority' => 0,
@@ -399,19 +463,38 @@ class WC_GZD_Checkout {
399
  );
400
  }
401
 
 
 
 
 
 
 
 
 
 
 
402
  $this->custom_fields_admin = apply_filters( 'woocommerce_gzd_custom_checkout_admin_fields', $this->custom_fields_admin, $this );
 
 
 
 
 
 
 
 
 
 
 
403
  $this->custom_fields = apply_filters( 'woocommerce_gzd_custom_checkout_fields', $this->custom_fields, $this );
404
  }
405
 
406
  public function set_title_field_mapping_editors( $val ) {
 
 
407
 
408
- $values = array(
409
- __( 'Mr.', 'woocommerce-germanized' ) => 1,
410
- __( 'Ms.', 'woocommerce-germanized' ) => 2,
411
- );
412
-
413
- if ( isset( $values[ $val ] ) )
414
  return $values[ $val ];
 
415
 
416
  return $val;
417
  }
@@ -423,11 +506,13 @@ class WC_GZD_Checkout {
423
  */
424
  public function do_fee_tax_calculation( $cart ) {
425
 
426
- if ( 'yes' !== get_option( 'woocommerce_gzd_fee_tax' ) )
427
  return;
 
428
 
429
- if ( ! method_exists( $cart, 'set_fee_taxes' ) )
430
  return;
 
431
 
432
  $calculate_taxes = wc_tax_enabled() && ! WC()->customer->is_vat_exempt();
433
 
@@ -607,11 +692,33 @@ class WC_GZD_Checkout {
607
  $product = $item->get_product();
608
  $gzd_product = wc_gzd_get_gzd_product( $product );
609
 
 
 
 
 
 
 
 
 
 
 
 
610
  do_action( 'woocommerce_gzd_add_order_item_meta', $item, $order, $gzd_product );
611
 
612
  $item = wc_gzd_set_crud_meta_data( $item, '_units', $gzd_product->get_product_units_html() );
613
  $item = wc_gzd_set_crud_meta_data( $item, '_delivery_time', $gzd_product->get_delivery_time_html() );
614
  $item = wc_gzd_set_crud_meta_data( $item, '_item_desc', $gzd_product->get_mini_desc() );
 
 
 
 
 
 
 
 
 
 
 
615
  $item = wc_gzd_set_crud_meta_data( $item, '_unit_price', apply_filters( 'woocommerce_gzd_order_item_unit_price', $gzd_product->get_unit_html( false ), $gzd_product, $item, $order ) );
616
  }
617
  }
@@ -766,6 +873,15 @@ class WC_GZD_Checkout {
766
  }
767
 
768
  if ( ! empty( $val ) ) {
 
 
 
 
 
 
 
 
 
769
  update_post_meta( $order_id, '_' . $group . '_' . $key, apply_filters( 'woocommerce_gzd_custom_' . $key . '_field_value', sanitize_text_field( $val ) ) );
770
  }
771
  }
153
 
154
  update_post_meta( $order_id, '_parcel_delivery_opted_in', $selected ? 'yes' : 'no' );
155
 
156
+ /**
157
+ * Parcel delivery notification.
158
+ *
159
+ * Execute whenever the parcel delivery notification data is stored for a certain order.
160
+ *
161
+ * @since 1.7.2
162
+ *
163
+ * @param int $order_id The order id.
164
+ * @param bool $selected True if the checkbox was checked. False otherwise.
165
+ */
166
  do_action( 'woocommerce_gzd_parcel_delivery_order_opted_in', $order_id, $selected );
167
  }
168
  }
169
 
170
  public function set_payment_url_to_force_payment( $url, $order ) {
171
+
172
+ /**
173
+ * Filter to optionally disable forced pay order redirection.
174
+ * If forced pay order is enabled Germanized auto submits the pay order form with the
175
+ * previously selected payment method to allow redirecting the customer to the payment provider.
176
+ *
177
+ * @since 1.9.10
178
+ *
179
+ * @param bool $enable Set to `false` to disable forced redirection.
180
+ * @param WC_Order $order The order instance.
181
+ */
182
  if ( strpos( $url, 'pay_for_order' ) !== false && apply_filters( 'woocommerce_gzd_enable_force_pay_order', true, $order ) ) {
183
  $url = add_query_arg( array( 'force_pay_order' => true ), $url );
184
  }
205
  // Check if gateway is available - otherwise don't force redirect - would lead to errors in pay_action
206
  $gateways = WC()->payment_gateways->get_available_payment_gateways();
207
 
208
+ if ( ! isset( $gateways[ wc_gzd_get_crud_data( $order, 'payment_method' ) ] ) ) {
209
  return;
210
+ }
211
 
212
+ /** This filter is documented in includes/class-wc-gzd-checkout.php */
213
  if ( apply_filters( 'woocommerce_gzd_enable_force_pay_order', true, $order ) ) {
214
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_force_pay_script' ), 20 );
215
  add_action( 'woocommerce_after_pay_action', array( $this, 'maybe_disable_force_pay_script' ), 20 );
316
  $enabled = false;
317
  }
318
 
319
+ /**
320
+ * Filters whether to show the pay now button for a certain order.
321
+ *
322
+ * ```php
323
+ * function ex_show_order_button( $show, $order_id ) {
324
+ * if ( $order = wc_get_order( $order_id ) {
325
+ * // Check the order and decide whether to enable or disable button
326
+ * return false;
327
+ * }
328
+ *
329
+ * return $show;
330
+ * }
331
+ * add_filter( 'woocommerce_gzd_show_order_pay_now_button', 'ex_show_order_button', 10, 2 );
332
+ * ```
333
+ *
334
+ * @since 1.9.10
335
+ *
336
+ * @param bool $enabled Whether to enable the button or not.
337
+ * @param int $order_id The order id.
338
+ */
339
  if ( apply_filters( 'woocommerce_gzd_show_order_pay_now_button', $enabled, $order_id ) ) {
340
  $url = $order->get_checkout_payment_url();
341
 
342
+ /**
343
+ * Filter whether to add the `force_pay_order` parameter to the URL to allow
344
+ * automatically redirecting the customer to the chosen payment provider after
345
+ * clicking the link.
346
+ *
347
+ * @since 1.9.10
348
+ *
349
+ * @param bool $enable Set to `false` to disable.
350
+ * @param int $order_id The order id.
351
+ */
352
  if ( apply_filters( 'woocommerce_gzd_add_force_pay_order_parameter', true, $order_id ) ) {
353
  $url = add_query_arg( array( 'force_pay_order' => true ), $url );
354
  }
415
  if ( $search && isset( $matches[1] ) ) {
416
  $order_id = absint( $matches[1] );
417
  $order = wc_get_order( $order_id );
418
+
419
+ /**
420
+ * Filter the order cancellation URL replacement when customer
421
+ * order cancellation was disabled in the Germanized settings.
422
+ * Defaults to the order-received page.
423
+ *
424
+ * @since 1.0.0
425
+ *
426
+ * @param string $url The return url.
427
+ * @param WC_Order $order The order object.
428
+ */
429
  $return = apply_filters( 'woocommerce_gzd_attempt_order_cancellation_url', add_query_arg( array( 'retry' => true ), $order->get_checkout_order_received_url(), $order ) );
430
  }
431
 
433
  }
434
 
435
  public function init_fields() {
436
+ if ( 'yes' === get_option( 'woocommerce_gzd_checkout_address_field' ) ) {
437
  $this->custom_fields['title'] = array(
438
  'type' => 'select',
439
  'required' => false,
440
  'label' => __( 'Title', 'woocommerce-germanized' ),
441
+ 'options' => wc_gzd_get_customer_title_options(),
442
  'before' => 'first_name',
443
  'group' => array( 'billing', 'shipping' ),
444
  'priority' => 0,
447
  $this->custom_fields_admin['title'] = array(
448
  'before' => 'first_name',
449
  'type' => 'select',
450
+ 'options' => wc_gzd_get_customer_title_options(),
451
  'label' => __( 'Title', 'woocommerce-germanized' ),
452
  'show' => false,
453
  'priority' => 0,
463
  );
464
  }
465
 
466
+ /**
467
+ * Filter to adjust custom checkout-related admin fields.
468
+ *
469
+ * This filter may be used to output certain checkout fields within admin order screen.
470
+ *
471
+ * @since 1.0.0
472
+ *
473
+ * @param array $custom_fields Array of fields.
474
+ * @param WC_GZD_Checkout $checkout The checkout instance.
475
+ */
476
  $this->custom_fields_admin = apply_filters( 'woocommerce_gzd_custom_checkout_admin_fields', $this->custom_fields_admin, $this );
477
+
478
+ /**
479
+ * Filter to adjust custom checkout-related frontend fields.
480
+ *
481
+ * This filter may be used to output certain checkout fields within the checkout.
482
+ *
483
+ * @since 1.0.0
484
+ *
485
+ * @param array $custom_fields Array of fields.
486
+ * @param WC_GZD_Checkout $checkout The checkout instance.
487
+ */
488
  $this->custom_fields = apply_filters( 'woocommerce_gzd_custom_checkout_fields', $this->custom_fields, $this );
489
  }
490
 
491
  public function set_title_field_mapping_editors( $val ) {
492
+ $titles = array_flip( wc_gzd_get_customer_title_options() );
493
+ $values = $titles;
494
 
495
+ if ( isset( $values[ $val ] ) ) {
 
 
 
 
 
496
  return $values[ $val ];
497
+ }
498
 
499
  return $val;
500
  }
506
  */
507
  public function do_fee_tax_calculation( $cart ) {
508
 
509
+ if ( 'yes' !== get_option( 'woocommerce_gzd_fee_tax' ) ) {
510
  return;
511
+ }
512
 
513
+ if ( ! method_exists( $cart, 'set_fee_taxes' ) ) {
514
  return;
515
+ }
516
 
517
  $calculate_taxes = wc_tax_enabled() && ! WC()->customer->is_vat_exempt();
518
 
692
  $product = $item->get_product();
693
  $gzd_product = wc_gzd_get_gzd_product( $product );
694
 
695
+ /**
696
+ * Add order item meta.
697
+ *
698
+ * Fires when Germanized adds order item meta.
699
+ *
700
+ * @since 1.8.9
701
+ *
702
+ * @param WC_Order_Item $item The order item.
703
+ * @param WC_Order $order The order.
704
+ * @param WC_GZD_Product $gzd_product The product object.
705
+ */
706
  do_action( 'woocommerce_gzd_add_order_item_meta', $item, $order, $gzd_product );
707
 
708
  $item = wc_gzd_set_crud_meta_data( $item, '_units', $gzd_product->get_product_units_html() );
709
  $item = wc_gzd_set_crud_meta_data( $item, '_delivery_time', $gzd_product->get_delivery_time_html() );
710
  $item = wc_gzd_set_crud_meta_data( $item, '_item_desc', $gzd_product->get_mini_desc() );
711
+
712
+ /**
713
+ * Filter that allow adjusting the order item unit price.
714
+ *
715
+ * @since 1.8.9
716
+ *
717
+ * @param string $price The unit price HTML.
718
+ * @param WC_GZD_Product $gzd_product The product instance.
719
+ * @param WC_Order_Item $item The order item instance.
720
+ * @param WC_Order $order The order instance.
721
+ */
722
  $item = wc_gzd_set_crud_meta_data( $item, '_unit_price', apply_filters( 'woocommerce_gzd_order_item_unit_price', $gzd_product->get_unit_html( false ), $gzd_product, $item, $order ) );
723
  }
724
  }
873
  }
874
 
875
  if ( ! empty( $val ) ) {
876
+
877
+ /**
878
+ * Filter the value for a custom checkout field before saving.
879
+ * `$key` corresponds to the field id e.g. title.
880
+ *
881
+ * @since 1.0.0
882
+ *
883
+ * @param mixed $value The field value.
884
+ */
885
  update_post_meta( $order_id, '_' . $group . '_' . $key, apply_filters( 'woocommerce_gzd_custom_' . $key . '_field_value', sanitize_text_field( $val ) ) );
886
  }
887
  }
includes/class-wc-gzd-customer-helper.php CHANGED
@@ -102,18 +102,18 @@ class WC_GZD_Customer_Helper {
102
  if ( get_option( 'woocommerce_gzd_checkout_address_field' ) !== 'yes' )
103
  return $fields;
104
 
105
- $fields[ 'billing' ][ 'fields' ][ 'billing_title' ] = array(
106
  'label' => __( 'Title', 'woocommerce-germanized' ),
107
  'type' => 'select',
108
- 'options' => apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) ),
109
  'description' => '',
110
  'class' => '',
111
  );
112
 
113
- $fields[ 'shipping' ][ 'fields' ][ 'shipping_title' ] = array(
114
  'label' => __( 'Title', 'woocommerce-germanized' ),
115
  'type' => 'select',
116
- 'options' => apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) ),
117
  'description' => '',
118
  'class' => '',
119
  );
@@ -147,6 +147,15 @@ class WC_GZD_Customer_Helper {
147
  public function login_redirect( $redirect, $user ) {
148
 
149
  if ( WC()->session->get( 'login_redirect' ) && 'checkout' === WC()->session->get( 'login_redirect' ) ) {
 
 
 
 
 
 
 
 
 
150
  return apply_filters( 'woocommerce_gzd_customer_activation_checkout_redirect', wc_gzd_get_page_permalink( 'checkout' ) );
151
  }
152
 
@@ -173,7 +182,7 @@ class WC_GZD_Customer_Helper {
173
  if ( is_checkout() && ( ! is_user_logged_in() || ( $this->enable_double_opt_in_for_user() && ! wc_gzd_is_customer_activated() ) ) ) {
174
 
175
  WC()->session->set( 'login_redirect', 'checkout' );
176
- wp_safe_redirect( wc_gzd_get_page_permalink( 'myaccount' ) );
177
  exit;
178
 
179
  } elseif ( is_checkout() ) {
@@ -203,6 +212,7 @@ class WC_GZD_Customer_Helper {
203
 
204
  // Redirect to checkout
205
  unset( WC()->session->login_redirect );
 
206
  wp_safe_redirect( apply_filters( 'woocommerce_gzd_customer_activation_checkout_redirect', wc_gzd_get_page_permalink( 'checkout' ) ) );
207
  exit;
208
 
@@ -210,8 +220,18 @@ class WC_GZD_Customer_Helper {
210
  }
211
  }
212
 
213
- protected function registration_redirect() {
214
- return apply_filters( 'woocommerce_gzd_customer_registration_redirect', add_query_arg( array( 'account' => 'activate' ), wc_gzd_get_page_permalink( 'myaccount' ) ) );
 
 
 
 
 
 
 
 
 
 
215
  }
216
 
217
  public function disable_registration_auto_login( $result, $user_id ) {
@@ -222,7 +242,7 @@ class WC_GZD_Customer_Helper {
222
 
223
  // Has not been activated yet
224
  if ( $this->enable_double_opt_in_for_user( $user_id ) && ! wc_gzd_is_customer_activated( $user_id ) ) {
225
- wp_redirect( wp_validate_redirect( $this->registration_redirect() ) ); //phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
226
  exit;
227
  }
228
 
@@ -230,6 +250,23 @@ class WC_GZD_Customer_Helper {
230
  }
231
 
232
  public function get_double_opt_in_user_roles() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  return apply_filters( 'woocommerce_gzd_customer_double_opt_in_supported_user_roles', array( 'customer' ) );
234
  }
235
 
@@ -247,9 +284,9 @@ class WC_GZD_Customer_Helper {
247
  return false;
248
  }
249
 
250
- $supported_roles = $this->get_double_opt_in_user_roles();
251
  $supports_double_opt_in = false;
252
- $user_roles = ( isset( $user->roles ) ? (array) $user->roles : array() );
253
 
254
  foreach( $user_roles as $role ) {
255
  if ( in_array( $role, $supported_roles ) ) {
@@ -258,6 +295,14 @@ class WC_GZD_Customer_Helper {
258
  }
259
  }
260
 
 
 
 
 
 
 
 
 
261
  return apply_filters( 'woocommerce_gzd_customer_supports_double_opt_in', $supports_double_opt_in, $user );
262
  }
263
 
@@ -286,6 +331,13 @@ class WC_GZD_Customer_Helper {
286
  $url = remove_query_arg( 'activate', $url );
287
  $url = remove_query_arg( 'suffix', $url );
288
 
 
 
 
 
 
 
 
289
  wp_safe_redirect( apply_filters( 'woocommerce_gzd_double_opt_in_successful_redirect', $url ) );
290
  } elseif ( is_wp_error( $result ) && 'expired_key' === $result->get_error_code() ) {
291
  wc_add_notice( __( 'This activation code has expired. We have sent you a new activation code via e-mail.', 'woocommerce-germanized' ), 'error' );
@@ -331,6 +383,16 @@ class WC_GZD_Customer_Helper {
331
 
332
  if ( ! empty( $user_query->results ) ) {
333
  foreach ( $user_query->results as $user ) {
 
 
 
 
 
 
 
 
 
 
334
  if ( apply_filters( 'woocommerce_gzd_delete_unactivated_customer', true, $user ) ) {
335
  require_once( ABSPATH . 'wp-admin/includes/user.php' );
336
  wp_delete_user( $user->ID );
@@ -348,6 +410,15 @@ class WC_GZD_Customer_Helper {
348
  public function customer_account_activate( $activation_code, $login = false ) {
349
  $roles = array_map( 'ucfirst', $this->get_double_opt_in_user_roles() );
350
 
 
 
 
 
 
 
 
 
 
351
  $user_query = new WP_User_Query( apply_filters( 'woocommerce_gzd_customer_account_activation_query', array(
352
  'role__in' => $roles,
353
  'number' => 1,
@@ -363,7 +434,7 @@ class WC_GZD_Customer_Helper {
363
  /**
364
  * Filters the expiration time of customer activation keys.
365
  *
366
- * @since 4.3.0
367
  *
368
  * @param int $expiration The expiration time in seconds.
369
  */
@@ -382,27 +453,68 @@ class WC_GZD_Customer_Helper {
382
 
383
  if ( $expiration_time && time() < $expiration_time ) {
384
 
 
 
 
 
 
 
 
 
 
 
385
  do_action( 'woocommerce_gzd_customer_opted_in', $user );
386
  delete_user_meta( $user->ID, '_woocommerce_activation' );
387
 
388
  WC()->mailer()->customer_new_account( $user->ID );
389
 
390
- if ( apply_filters( 'woocommerce_gzd_user_activation_auto_login', $login, $user ) && ! is_user_logged_in() )
 
 
 
 
 
 
 
 
391
  wc_set_customer_auth_cookie( $user->ID );
392
-
 
 
 
 
 
 
 
 
 
 
 
393
  do_action( 'woocommerce_gzd_customer_opt_in_finished', $user );
394
 
395
  return true;
396
  } else {
397
 
 
 
 
 
 
 
 
 
 
 
398
  do_action( 'woocommerce_gzd_customer_activation_expired', $user );
 
399
  delete_user_meta( $user->ID, '_woocommerce_activation' );
400
  $activation_code = $this->get_customer_activation_meta( $user->ID, true );
401
 
402
  $user_activation_url = $this->get_customer_activation_url( $activation_code );
403
 
404
- if ( $email = WC_germanized()->emails->get_email_instance_by_id( 'customer_new_account_activation' ) )
405
  $email->trigger( $user->ID, $activation_code, $user_activation_url );
 
406
 
407
  return new WP_Error( 'expired_key', __( 'Expired activation key', 'woocommerce-germanized' ) );
408
  }
@@ -446,7 +558,14 @@ class WC_GZD_Customer_Helper {
446
  }
447
 
448
  public function get_customer_activation_url( $key ) {
449
- // Append another GET-Parameter to avoid email clients from stripping points as last chars within our actication code.
 
 
 
 
 
 
 
450
  return apply_filters( 'woocommerce_gzd_customer_activation_url', add_query_arg( array( 'activate' => $key, 'suffix' => 'yes' ), wc_gzd_get_page_permalink( 'myaccount' ) ) );
451
  }
452
 
102
  if ( get_option( 'woocommerce_gzd_checkout_address_field' ) !== 'yes' )
103
  return $fields;
104
 
105
+ $fields['billing']['fields']['billing_title'] = array(
106
  'label' => __( 'Title', 'woocommerce-germanized' ),
107
  'type' => 'select',
108
+ 'options' => wc_gzd_get_customer_title_options(),
109
  'description' => '',
110
  'class' => '',
111
  );
112
 
113
+ $fields['shipping']['fields']['shipping_title'] = array(
114
  'label' => __( 'Title', 'woocommerce-germanized' ),
115
  'type' => 'select',
116
+ 'options' => wc_gzd_get_customer_title_options(),
117
  'description' => '',
118
  'class' => '',
119
  );
147
  public function login_redirect( $redirect, $user ) {
148
 
149
  if ( WC()->session->get( 'login_redirect' ) && 'checkout' === WC()->session->get( 'login_redirect' ) ) {
150
+
151
+ /**
152
+ * Filter URL to redirect customers to after a successfull opt-in which
153
+ * was related to a checkout request (e.g. customer was redirected to the register page before checkout).
154
+ *
155
+ * @since 1.0.0
156
+ *
157
+ * @param string $url The redirect URL.
158
+ */
159
  return apply_filters( 'woocommerce_gzd_customer_activation_checkout_redirect', wc_gzd_get_page_permalink( 'checkout' ) );
160
  }
161
 
182
  if ( is_checkout() && ( ! is_user_logged_in() || ( $this->enable_double_opt_in_for_user() && ! wc_gzd_is_customer_activated() ) ) ) {
183
 
184
  WC()->session->set( 'login_redirect', 'checkout' );
185
+ wp_safe_redirect( $this->registration_redirect() );
186
  exit;
187
 
188
  } elseif ( is_checkout() ) {
212
 
213
  // Redirect to checkout
214
  unset( WC()->session->login_redirect );
215
+ /** This filter is documented in includes/class-wc-gzd-customer-helper.php */
216
  wp_safe_redirect( apply_filters( 'woocommerce_gzd_customer_activation_checkout_redirect', wc_gzd_get_page_permalink( 'checkout' ) ) );
217
  exit;
218
 
220
  }
221
  }
222
 
223
+ protected function registration_redirect( $query_args = array() ) {
224
+
225
+ /**
226
+ * Filter URL which serves as redirection if a customer has not yet activated it's account and
227
+ * wants to access checkout.
228
+ *
229
+ * @since 1.0.0
230
+ *
231
+ * @param string $url The redirection URL.
232
+ * @param array[string] $query_args Arguments passed to the URL.
233
+ */
234
+ return apply_filters( 'woocommerce_gzd_customer_registration_redirect', add_query_arg( $query_args, wc_gzd_get_page_permalink( 'myaccount' ) ), $query_args );
235
  }
236
 
237
  public function disable_registration_auto_login( $result, $user_id ) {
242
 
243
  // Has not been activated yet
244
  if ( $this->enable_double_opt_in_for_user( $user_id ) && ! wc_gzd_is_customer_activated( $user_id ) ) {
245
+ wp_redirect( wp_validate_redirect( $this->registration_redirect( array( 'account' => 'activate' ) ) ) ); //phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
246
  exit;
247
  }
248
 
250
  }
251
 
252
  public function get_double_opt_in_user_roles() {
253
+
254
+ /**
255
+ * Filters supported DOI user roles. By default only the WooCommerce customer role is supported.
256
+ *
257
+ * ```php
258
+ * function ex_add_doi_roles( $roles ) {
259
+ * $roles[] = 'my_custom_role';
260
+ *
261
+ * return $roles;
262
+ * }
263
+ * add_filter( 'woocommerce_gzd_customer_double_opt_in_supported_user_roles', 'ex_add_doi_roles', 10, 1 );
264
+ * ```
265
+ *
266
+ * @since 1.0.0
267
+ *
268
+ * @param array $roles Array of roles to be supported.
269
+ */
270
  return apply_filters( 'woocommerce_gzd_customer_double_opt_in_supported_user_roles', array( 'customer' ) );
271
  }
272
 
284
  return false;
285
  }
286
 
287
+ $supported_roles = $this->get_double_opt_in_user_roles();
288
  $supports_double_opt_in = false;
289
+ $user_roles = ( isset( $user->roles ) ? (array) $user->roles : array() );
290
 
291
  foreach( $user_roles as $role ) {
292
  if ( in_array( $role, $supported_roles ) ) {
295
  }
296
  }
297
 
298
+ /**
299
+ * Filter whether the DOI is supported for a certain user.
300
+ *
301
+ * @since 1.0.0
302
+ *
303
+ * @param bool $supports_double_opt_in Whether the user is supported or not.
304
+ * @param WP_User $user The user instance.
305
+ */
306
  return apply_filters( 'woocommerce_gzd_customer_supports_double_opt_in', $supports_double_opt_in, $user );
307
  }
308
 
331
  $url = remove_query_arg( 'activate', $url );
332
  $url = remove_query_arg( 'suffix', $url );
333
 
334
+ /**
335
+ * Filters the URL after a successful DOI.
336
+ *
337
+ * @since 1.0.0
338
+ *
339
+ * @param string $url The URL to redirect to.
340
+ */
341
  wp_safe_redirect( apply_filters( 'woocommerce_gzd_double_opt_in_successful_redirect', $url ) );
342
  } elseif ( is_wp_error( $result ) && 'expired_key' === $result->get_error_code() ) {
343
  wc_add_notice( __( 'This activation code has expired. We have sent you a new activation code via e-mail.', 'woocommerce-germanized' ), 'error' );
383
 
384
  if ( ! empty( $user_query->results ) ) {
385
  foreach ( $user_query->results as $user ) {
386
+
387
+ /**
388
+ * Filters whether a certain user which has not yet been activated
389
+ * should be deleted.
390
+ *
391
+ * @since 1.0.0
392
+ *
393
+ * @param bool $delete Whether to delete the unactivated customer or not.
394
+ * @param WP_User $user The user instance.
395
+ */
396
  if ( apply_filters( 'woocommerce_gzd_delete_unactivated_customer', true, $user ) ) {
397
  require_once( ABSPATH . 'wp-admin/includes/user.php' );
398
  wp_delete_user( $user->ID );
410
  public function customer_account_activate( $activation_code, $login = false ) {
411
  $roles = array_map( 'ucfirst', $this->get_double_opt_in_user_roles() );
412
 
413
+ /**
414
+ * Filter to adjust arguments for the customer activation user query.
415
+ *
416
+ * @since 1.0.0
417
+ *
418
+ * @param array $args Arguments being passed to `WP_User_Query`.
419
+ * @param string $activation_code The activation code.
420
+ * @param bool $login Whether the customer should be authenticated after activation or not.
421
+ */
422
  $user_query = new WP_User_Query( apply_filters( 'woocommerce_gzd_customer_account_activation_query', array(
423
  'role__in' => $roles,
424
  'number' => 1,
434
  /**
435
  * Filters the expiration time of customer activation keys.
436
  *
437
+ * @since 1.0.0
438
  *
439
  * @param int $expiration The expiration time in seconds.
440
  */
453
 
454
  if ( $expiration_time && time() < $expiration_time ) {
455
 
456
+ /**
457
+ * Customer has opted-in.
458
+ *
459
+ * Fires whenever a customer has opted-in (DOI).
460
+ * Triggers before the confirmation e-mail has been sent and the user meta has been deleted.
461
+ *
462
+ * @since 2.0.3
463
+ *
464
+ * @param WP_User $user The user instance.
465
+ */
466
  do_action( 'woocommerce_gzd_customer_opted_in', $user );
467
  delete_user_meta( $user->ID, '_woocommerce_activation' );
468
 
469
  WC()->mailer()->customer_new_account( $user->ID );
470
 
471
+ /**
472
+ * Filter to optionally disable automatically authenticate activated customers.
473
+ *
474
+ * @since 1.0.0
475
+ *
476
+ * @param bool $login Whether to authenticate the customer or not.
477
+ * @param WP_User $user The user instance.
478
+ */
479
+ if ( apply_filters( 'woocommerce_gzd_user_activation_auto_login', $login, $user ) && ! is_user_logged_in() ) {
480
  wc_set_customer_auth_cookie( $user->ID );
481
+ }
482
+
483
+ /**
484
+ * Customer opt-in finished.
485
+ *
486
+ * Fires after a customer has been marked as opted-in and received the e-mail confirmation.
487
+ * Customer may already be authenticated at this point.
488
+ *
489
+ * @since 2.0.3
490
+ *
491
+ * @param WP_User $user The user instance.
492
+ */
493
  do_action( 'woocommerce_gzd_customer_opt_in_finished', $user );
494
 
495
  return true;
496
  } else {
497
 
498
+ /**
499
+ * Customer activation code expired.
500
+ *
501
+ * Hook fires whenever a customer tries to acitvate it's account but the activation key
502
+ * has already expired.
503
+ *
504
+ * @since 2.0.3
505
+ *
506
+ * @param WP_User $user The user instance.
507
+ */
508
  do_action( 'woocommerce_gzd_customer_activation_expired', $user );
509
+
510
  delete_user_meta( $user->ID, '_woocommerce_activation' );
511
  $activation_code = $this->get_customer_activation_meta( $user->ID, true );
512
 
513
  $user_activation_url = $this->get_customer_activation_url( $activation_code );
514
 
515
+ if ( $email = WC_germanized()->emails->get_email_instance_by_id( 'customer_new_account_activation' ) ) {
516
  $email->trigger( $user->ID, $activation_code, $user_activation_url );
517
+ }
518
 
519
  return new WP_Error( 'expired_key', __( 'Expired activation key', 'woocommerce-germanized' ) );
520
  }
558
  }
559
 
560
  public function get_customer_activation_url( $key ) {
561
+ /**
562
+ * Filter the customer activation URL.
563
+ * Added a custom suffix to prevent email clients from stripping points as last chars.
564
+ *
565
+ * @since 1.0.0
566
+ *
567
+ * @param string $url The activation URL.
568
+ */
569
  return apply_filters( 'woocommerce_gzd_customer_activation_url', add_query_arg( array( 'activate' => $key, 'suffix' => 'yes' ), wc_gzd_get_page_permalink( 'myaccount' ) ) );
570
  }
571
 
includes/class-wc-gzd-dhl-parcel-shops.php CHANGED
@@ -83,6 +83,14 @@ class WC_GZD_DHL_Parcel_Shops {
83
  }
84
  }
85
 
 
 
 
 
 
 
 
 
86
  if ( apply_filters( 'woocommerce_gzd_dhl_parcel_shops_hide_fields', $hide_fields, $this ) ) {
87
  add_filter( 'woocommerce_checkout_fields', array( $this, 'remove_fields' ), 10, 1 );
88
  }
@@ -193,6 +201,7 @@ class WC_GZD_DHL_Parcel_Shops {
193
  }
194
 
195
  public function maybe_hide_fields() {
 
196
  return apply_filters( 'woocommerce_gzd_dhl_parcel_shops_hide_fields', false, $this );
197
  }
198
 
@@ -347,6 +356,14 @@ class WC_GZD_DHL_Parcel_Shops {
347
  $lang = substr( get_bloginfo( "language" ), 0, 2 );
348
 
349
  if ( wp_script_is( 'wc-gzd-checkout-dhl-parcel-shops' ) ) {
 
 
 
 
 
 
 
 
350
  wp_localize_script( 'wc-gzd-checkout-dhl-parcel-shops', 'wc_gzd_dhl_parcel_shops_params', apply_filters( 'wc_gzd_dhl_parcel_shops_params', array(
351
  'address_field_title' => __( 'Parcel Shop', 'woocommerce-germanized' ),
352
  'address_field_placeholder' => __( 'Parcel Shop', 'woocommerce-germanized' ),
@@ -370,6 +387,14 @@ class WC_GZD_DHL_Parcel_Shops {
370
  if ( 'shipping_parcelshop' === $key ) {
371
  if ( substr( $field, -4 ) === "</p>" ) {
372
  $field = substr( $field, 0, -4 );
 
 
 
 
 
 
 
 
373
  $field .= apply_filters( 'woocommerce_gzd_dhl_parcel_finder_button_html', '<span id="wc-gzd-parcel-shop-finder-button-wrapper"><a class="wc-gzd-parcel-finder-open-button" href="#">' . __( 'Parcel Shop Finder', 'woocommerce-germanized' ) . '</a></span></p><div class="clear"></div>' );
374
  }
375
  }
@@ -378,6 +403,14 @@ class WC_GZD_DHL_Parcel_Shops {
378
  }
379
 
380
  public function get_supported_countries( $as_names = false ) {
 
 
 
 
 
 
 
 
381
  $codes = apply_filters( 'woocommerce_gzd_dhl_parcel_shops_countries', (array) get_option( 'woocommerce_gzd_dhl_parcel_shop_supported_countries', array( 'DE', 'AT' ) ) );
382
 
383
  if ( $as_names ) {
83
  }
84
  }
85
 
86
+ /**
87
+ * Filter that allows hiding DHL parcel shop fields before rendering.
88
+ *
89
+ * @since 1.8.9
90
+ *
91
+ * @param bool $hide_fields Whether to hide the fields or not.
92
+ * @param WC_GZD_DHL_Parcel_Shops $parcel_shop Parcel shop instance.
93
+ */
94
  if ( apply_filters( 'woocommerce_gzd_dhl_parcel_shops_hide_fields', $hide_fields, $this ) ) {
95
  add_filter( 'woocommerce_checkout_fields', array( $this, 'remove_fields' ), 10, 1 );
96
  }
201
  }
202
 
203
  public function maybe_hide_fields() {
204
+ /** This filter is documented in includes/class-wc-gzd-dhl-parcel-shops.php */
205
  return apply_filters( 'woocommerce_gzd_dhl_parcel_shops_hide_fields', false, $this );
206
  }
207
 
356
  $lang = substr( get_bloginfo( "language" ), 0, 2 );
357
 
358
  if ( wp_script_is( 'wc-gzd-checkout-dhl-parcel-shops' ) ) {
359
+
360
+ /**
361
+ * Filter to adjust `wc-gzd-checkout-dhl-parcel-shops` script localization parameters.
362
+ *
363
+ * @since 1.9.5
364
+ *
365
+ * @param array $args Array containing Key => value parameters.
366
+ */
367
  wp_localize_script( 'wc-gzd-checkout-dhl-parcel-shops', 'wc_gzd_dhl_parcel_shops_params', apply_filters( 'wc_gzd_dhl_parcel_shops_params', array(
368
  'address_field_title' => __( 'Parcel Shop', 'woocommerce-germanized' ),
369
  'address_field_placeholder' => __( 'Parcel Shop', 'woocommerce-germanized' ),
387
  if ( 'shipping_parcelshop' === $key ) {
388
  if ( substr( $field, -4 ) === "</p>" ) {
389
  $field = substr( $field, 0, -4 );
390
+
391
+ /**
392
+ * Filter to adjust the DHL parcel shop finder button HTML.
393
+ *
394
+ * @since 1.8.5
395
+ *
396
+ * @param string $html The HTML output.
397
+ */
398
  $field .= apply_filters( 'woocommerce_gzd_dhl_parcel_finder_button_html', '<span id="wc-gzd-parcel-shop-finder-button-wrapper"><a class="wc-gzd-parcel-finder-open-button" href="#">' . __( 'Parcel Shop Finder', 'woocommerce-germanized' ) . '</a></span></p><div class="clear"></div>' );
399
  }
400
  }
403
  }
404
 
405
  public function get_supported_countries( $as_names = false ) {
406
+
407
+ /**
408
+ * Filter to enable DHL parcel shop delivery for certain countries.
409
+ *
410
+ * @since 1.8.5
411
+ *
412
+ * @param array $country_codes Array of country codes which support DHL parcel shop delivery.
413
+ */
414
  $codes = apply_filters( 'woocommerce_gzd_dhl_parcel_shops_countries', (array) get_option( 'woocommerce_gzd_dhl_parcel_shop_supported_countries', array( 'DE', 'AT' ) ) );
415
 
416
  if ( $as_names ) {
includes/class-wc-gzd-ekomi.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  if ( ! defined( 'ABSPATH' ) )
3
  exit;
4
 
@@ -147,6 +150,14 @@ class WC_GZD_Ekomi {
147
  $ekomi_product->setProductName( $this->get_product_name( $product ) );
148
  $ekomi_product->getOther()->addLinks( $this->get_product_link( $product ), 'html' );
149
 
 
 
 
 
 
 
 
 
150
  $result = $this->api->exec( apply_filters( 'woocommerce_gzd_ekomi_product', $ekomi_product, $this ) );
151
 
152
  if ( $result && $result->done ) {
@@ -317,6 +328,16 @@ class WC_GZD_Ekomi {
317
  add_comment_meta( $comment_id, 'rating', esc_attr( absint( $result->rating ) ), true );
318
  add_comment_meta( $comment_id, 'order_id', esc_attr( absint( $result->order_id ) ), true );
319
 
 
 
 
 
 
 
 
 
 
 
320
  do_action( 'woocommerce_gzd_ekomi_review_comment_inserted', $comment_id, $result );
321
  }
322
  }
1
  <?php
2
+
3
+ use Ekomi\Request\PutProduct;
4
+
5
  if ( ! defined( 'ABSPATH' ) )
6
  exit;
7
 
150
  $ekomi_product->setProductName( $this->get_product_name( $product ) );
151
  $ekomi_product->getOther()->addLinks( $this->get_product_link( $product ), 'html' );
152
 
153
+ /**
154
+ * Filter eKomi product.
155
+ *
156
+ * @since 1.0.0
157
+ *
158
+ * @param Ekomi\Request\PutProduct $ekomi_product The eKomi product.
159
+ * @param WC_GZD_Ekomi $ekomi The eKomi instance.
160
+ */
161
  $result = $this->api->exec( apply_filters( 'woocommerce_gzd_ekomi_product', $ekomi_product, $this ) );
162
 
163
  if ( $result && $result->done ) {
328
  add_comment_meta( $comment_id, 'rating', esc_attr( absint( $result->rating ) ), true );
329
  add_comment_meta( $comment_id, 'order_id', esc_attr( absint( $result->order_id ) ), true );
330
 
331
+ /**
332
+ * After inserting eKomi review.
333
+ *
334
+ * Fires after a comment is being added matching a certain eKomi review.
335
+ *
336
+ * @since 1.0.0
337
+ *
338
+ * @param int $comment_id The comment id.
339
+ * @param object $result The result object.
340
+ */
341
  do_action( 'woocommerce_gzd_ekomi_review_comment_inserted', $comment_id, $result );
342
  }
343
  }
includes/class-wc-gzd-emails.php CHANGED
@@ -86,6 +86,13 @@ class WC_GZD_Emails {
86
  public function confirmation_text_option( $object ) {
87
  if ( 'customer_processing_order' === $object->id ) {
88
 
 
 
 
 
 
 
 
89
  $args = apply_filters( 'woocommerce_gzd_admin_email_order_confirmation_text_option', array(
90
  'id' => 'woocommerce_gzd_email_order_confirmation_text',
91
  'label' => __( 'Confirmation text', 'woocommerce-germanized' ),
@@ -154,6 +161,14 @@ class WC_GZD_Emails {
154
 
155
  $title_text = str_replace( array_keys( $title_options ), array_values( $title_options ), $title_text );
156
 
 
 
 
 
 
 
 
 
157
  return apply_filters( 'woocommerce_gzd_email_title', esc_html( $title_text ), $order );
158
  }
159
  }
@@ -164,9 +179,25 @@ class WC_GZD_Emails {
164
 
165
  protected function get_processing_email_text( $order_id ) {
166
  $order = is_numeric( $order_id ) ? wc_get_order( $order_id ) : $order_id;
 
 
 
 
 
 
 
 
167
  $plain = apply_filters( 'woocommerce_gzd_order_confirmation_email_plain_text', get_option( 'woocommerce_gzd_email_order_confirmation_text' ) );
168
 
169
  if ( ! $plain || '' === $plain ) {
 
 
 
 
 
 
 
 
170
  $plain = apply_filters( 'woocommerce_gzd_order_confirmation_email_default_text', __( 'Your order has been received and is now being processed. Your order details are shown below for your reference.', 'woocommerce-germanized' ) );
171
  }
172
 
@@ -180,6 +211,14 @@ class WC_GZD_Emails {
180
  $plain = str_replace( $placeholder, $value, $plain );
181
  }
182
 
 
 
 
 
 
 
 
 
183
  return apply_filters( 'woocommerce_gzd_order_confirmation_email_text', $plain, $order );
184
  }
185
 
@@ -295,6 +334,15 @@ class WC_GZD_Emails {
295
  }
296
 
297
  public function get_gateways_disabling_paid_for_order_mail() {
 
 
 
 
 
 
 
 
 
298
  return apply_filters( 'woocommerce_gzd_disable_gateways_paid_order_email', array( 'cod', 'invoice' ) );
299
  }
300
 
@@ -389,11 +437,27 @@ class WC_GZD_Emails {
389
  $order = wc_get_order( $order );
390
  }
391
 
 
 
 
 
 
 
 
 
392
  if ( ! apply_filters( 'woocommerce_germanized_send_instant_order_confirmation', true, $order ) ) {
393
  return $result;
394
  }
395
 
396
- // This action actually triggers the email sending (or defers it)
 
 
 
 
 
 
 
 
397
  do_action( 'woocommerce_gzd_order_confirmation', $order );
398
 
399
  // Always clear cart after order success
@@ -405,19 +469,54 @@ class WC_GZD_Emails {
405
  }
406
 
407
  public function trigger_order_confirmation_emails( $order ) {
408
- do_action( 'woocommerce_germanized_before_order_confirmation', wc_gzd_get_crud_data( $order, 'id' ) );
409
 
410
- // Send order processing mail
411
- if ( apply_filters( 'woocommerce_germanized_order_email_customer_confirmation_sent', false, wc_gzd_get_crud_data( $order, 'id' ) ) === false && $processing = $this->get_email_instance_by_id( 'customer_processing_order' ) ) {
412
- $processing->trigger( wc_gzd_get_crud_data( $order, 'id' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  }
414
 
415
- // Send admin mail
416
- if ( apply_filters( 'woocommerce_germanized_order_email_admin_confirmation_sent', false, wc_gzd_get_crud_data( $order, 'id' ) ) === false && $new_order = $this->get_email_instance_by_id( 'new_order' ) ) {
417
- $new_order->trigger( wc_gzd_get_crud_data( $order, 'id' ) );
 
 
 
 
 
 
 
418
  }
419
 
420
- do_action( 'woocommerce_germanized_order_confirmation_sent', wc_gzd_get_crud_data( $order, 'id' ) );
 
 
 
 
 
 
 
 
 
421
  }
422
 
423
  public function email_notices( $order, $sent_to_admin, $plain_text ) {
@@ -437,7 +536,7 @@ class WC_GZD_Emails {
437
 
438
  foreach ( $items as $item ) {
439
 
440
- $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item );
441
 
442
  if ( ! $_product ) {
443
  continue;
@@ -459,7 +558,22 @@ class WC_GZD_Emails {
459
 
460
  if ( get_option( 'woocommerce_gzd_differential_taxation_checkout_notices' ) === 'yes' && $is_differential_taxed && apply_filters( 'woocommerce_gzd_show_differential_taxation_in_emails', true, $type ) ) {
461
 
 
 
 
 
 
 
 
462
  $mark = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_mark', '** ' );
 
 
 
 
 
 
 
 
463
  $notice = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_email', $mark . wc_gzd_get_differential_taxation_notice_text() );
464
 
465
  echo wpautop( '<div class="gzd-differential-taxation-notice-email">' . $notice . '</div>' );
@@ -468,10 +582,28 @@ class WC_GZD_Emails {
468
  if ( $this->is_order_confirmation_email( $type->id ) ) {
469
 
470
  if ( $is_downloadable && $text = wc_gzd_get_legal_text_digital_email_notice() ) {
 
 
 
 
 
 
 
 
 
471
  echo wpautop( apply_filters( 'woocommerce_gzd_order_confirmation_digital_notice', '<div class="gzd-digital-notice-text">' . $text . '</div>', $order ) );
472
  }
473
 
474
  if ( $is_service && $text = wc_gzd_get_legal_text_service_email_notice() ) {
 
 
 
 
 
 
 
 
 
475
  echo wpautop( apply_filters( 'woocommerce_gzd_order_confirmation_service_notice', '<div class="gzd-service-notice-text">' . $text . '</div>', $order ) );
476
  }
477
  }
@@ -479,6 +611,15 @@ class WC_GZD_Emails {
479
  }
480
 
481
  public function is_order_confirmation_email( $id ) {
 
 
 
 
 
 
 
 
 
482
  return apply_filters( 'woocommerce_gzd_is_order_confirmation_email', ( 'customer_processing_order' === $id ), $id );
483
  }
484
 
@@ -528,6 +669,17 @@ class WC_GZD_Emails {
528
 
529
  $this->remove_order_email_filters();
530
 
 
 
 
 
 
 
 
 
 
 
 
531
  do_action( 'woocommerce_gzd_before_set_email_cart_item_filters', $this, $current );
532
 
533
  // Add order item name actions
@@ -552,6 +704,16 @@ class WC_GZD_Emails {
552
  add_filter( 'woocommerce_order_formatted_line_subtotal', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'email_product_unit_price' ), 2 );
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
555
  do_action( 'woocommerce_gzd_after_set_email_cart_item_filters', $this, $current );
556
  }
557
 
@@ -609,6 +771,15 @@ class WC_GZD_Emails {
609
  continue;
610
  }
611
 
 
 
 
 
 
 
 
 
 
612
  if ( in_array( $mail->id, get_option( $option_key ) ) && apply_filters( 'woocommerce_gzd_attach_email_footer', true, $mail, $page_option ) ) {
613
  $this->attach_page_content( $option, $mail, $mail->get_email_type() );
614
  }
@@ -620,20 +791,35 @@ class WC_GZD_Emails {
620
  * Add global footer Hooks to Email templates
621
  */
622
  public function add_template_footers() {
623
- $type = $this->get_current_email_object();
624
-
625
- if ( $type ) {
626
- do_action( 'woocommerce_germanized_email_footer_' . $type->id, $type );
 
 
 
 
 
 
 
 
 
 
 
 
 
627
  }
628
  }
629
 
630
  public function get_current_email_object() {
631
 
632
- if ( isset( $GLOBALS[ 'wc_gzd_template_name' ] ) && ! empty( $GLOBALS[ 'wc_gzd_template_name' ] ) ) {
633
 
634
- $object = $this->get_email_instance_by_tpl( $GLOBALS[ 'wc_gzd_template_name' ] );
635
- if ( is_object( $object ) )
 
636
  return $object;
 
637
  }
638
 
639
  return false;
@@ -647,22 +833,38 @@ class WC_GZD_Emails {
647
  */
648
  private function get_email_instance_by_tpl( $tpls = array() ) {
649
 
650
- if ( ! $this->mailer )
651
  $this->set_mailer();
 
652
 
653
  $found_mails = array();
654
- $mails = $this->mailer->get_emails();
655
 
656
  foreach ( $tpls as $tpl ) {
657
 
658
- $tpl = apply_filters( 'woocommerce_germanized_email_template_name', str_replace( array( 'admin-', '-' ), array( '', '_' ), basename( $tpl, '.php' ) ), $tpl );
 
 
 
 
 
 
 
659
 
660
  if ( ! empty( $mails ) ) {
661
-
662
  foreach ( $mails as $mail ) {
663
 
664
  if ( is_object( $mail ) ) {
665
 
 
 
 
 
 
 
 
 
 
666
  if ( apply_filters( 'woocommerce_gzd_email_template_id_comparison', ( $mail->id === $tpl ), $mail->id, $tpl ) ) {
667
  array_push( $found_mails, $mail );
668
  }
@@ -685,8 +887,26 @@ class WC_GZD_Emails {
685
  */
686
  public function attach_page_content( $page_id, $mail, $email_type = 'html' ) {
687
 
 
 
 
 
 
 
 
 
 
 
688
  do_action( 'woocommerce_germanized_attach_email_footer', $page_id, $email_type );
689
 
 
 
 
 
 
 
 
 
690
  $page_id = apply_filters( 'woocommerce_germanized_attach_email_footer_page_id', $page_id, $mail );
691
 
692
  remove_shortcode( 'revocation_form' );
86
  public function confirmation_text_option( $object ) {
87
  if ( 'customer_processing_order' === $object->id ) {
88
 
89
+ /**
90
+ * Filter order confirmation text option field.
91
+ *
92
+ * @since 1.0.0
93
+ *
94
+ * @param array $args Text option arguments.
95
+ */
96
  $args = apply_filters( 'woocommerce_gzd_admin_email_order_confirmation_text_option', array(
97
  'id' => 'woocommerce_gzd_email_order_confirmation_text',
98
  'label' => __( 'Confirmation text', 'woocommerce-germanized' ),
161
 
162
  $title_text = str_replace( array_keys( $title_options ), array_values( $title_options ), $title_text );
163
 
164
+ /**
165
+ * Filter the email title option used to address the customer in emails.
166
+ *
167
+ * @since 2.0.0
168
+ *
169
+ * @param string $title The title.
170
+ * @param WC_Order $order The order object.
171
+ */
172
  return apply_filters( 'woocommerce_gzd_email_title', esc_html( $title_text ), $order );
173
  }
174
  }
179
 
180
  protected function get_processing_email_text( $order_id ) {
181
  $order = is_numeric( $order_id ) ? wc_get_order( $order_id ) : $order_id;
182
+
183
+ /**
184
+ * Filters the plain order confirmation email text.
185
+ *
186
+ * @since 1.0.0
187
+ *
188
+ * @param string $text The plain text.
189
+ */
190
  $plain = apply_filters( 'woocommerce_gzd_order_confirmation_email_plain_text', get_option( 'woocommerce_gzd_email_order_confirmation_text' ) );
191
 
192
  if ( ! $plain || '' === $plain ) {
193
+
194
+ /**
195
+ * Filter the fallback order confirmation email text.
196
+ *
197
+ * @since 1.0.0
198
+ *
199
+ * @param string $text The default text.
200
+ */
201
  $plain = apply_filters( 'woocommerce_gzd_order_confirmation_email_default_text', __( 'Your order has been received and is now being processed. Your order details are shown below for your reference.', 'woocommerce-germanized' ) );
202
  }
203
 
211
  $plain = str_replace( $placeholder, $value, $plain );
212
  }
213
 
214
+ /**
215
+ * Filter the order confirmation introduction text.
216
+ *
217
+ * @since 1.0.0
218
+ *
219
+ * @param string $plain The text.
220
+ * @param WC_Order $order The order object.
221
+ */
222
  return apply_filters( 'woocommerce_gzd_order_confirmation_email_text', $plain, $order );
223
  }
224
 
334
  }
335
 
336
  public function get_gateways_disabling_paid_for_order_mail() {
337
+
338
+ /**
339
+ * Filters disabled gateway for the paid for order notification.
340
+ * By adjusting the filter you may deactivate the paid for order notification for certain gateways.
341
+ *
342
+ * @since 1.0.0
343
+ *
344
+ * @param array $gateways Array of gateway ids.
345
+ */
346
  return apply_filters( 'woocommerce_gzd_disable_gateways_paid_order_email', array( 'cod', 'invoice' ) );
347
  }
348
 
437
  $order = wc_get_order( $order );
438
  }
439
 
440
+ /**
441
+ * Last chance to force disabling the order confirmation for a certain order object.
442
+ *
443
+ * @since 1.0.0
444
+ *
445
+ * @param bool $disable Whether to disable notification or not.
446
+ * @param WC_Order $order The order object.
447
+ */
448
  if ( ! apply_filters( 'woocommerce_germanized_send_instant_order_confirmation', true, $order ) ) {
449
  return $result;
450
  }
451
 
452
+ /**
453
+ * Trigger the order confirmation email.
454
+ *
455
+ * This action triggers the order confirmation email notification.
456
+ *
457
+ * @since 1.9.10
458
+ *
459
+ * @param WC_Order $order The order object.
460
+ */
461
  do_action( 'woocommerce_gzd_order_confirmation', $order );
462
 
463
  // Always clear cart after order success
469
  }
470
 
471
  public function trigger_order_confirmation_emails( $order ) {
 
472
 
473
+ $order_id = wc_gzd_get_crud_data( $order, 'id' );
474
+
475
+ /**
476
+ * Before order confirmation emails.
477
+ *
478
+ * Fires before the order confirmation emails are being triggered (admin and user).
479
+ *
480
+ * @since 1.0.0
481
+ *
482
+ * @param integer $order_id The order id.
483
+ */
484
+ do_action( 'woocommerce_germanized_before_order_confirmation', $order_id );
485
+
486
+ /**
487
+ * Filters whether the order confirmation email has already been sent or not.
488
+ *
489
+ * @since 1.0.0
490
+ *
491
+ * @param bool $sent Whether the email has been sent or not.
492
+ * @param int $order_id The order id.
493
+ */
494
+ if ( apply_filters( 'woocommerce_germanized_order_email_customer_confirmation_sent', false, $order_id ) === false && $processing = $this->get_email_instance_by_id( 'customer_processing_order' ) ) {
495
+ $processing->trigger( $order_id );
496
  }
497
 
498
+ /**
499
+ * Filters whether the order confirmation admin email has already been sent or not.
500
+ *
501
+ * @since 1.0.0
502
+ *
503
+ * @param bool $sent Whether the email has been sent or not.
504
+ * @param int $order_id The order id.
505
+ */
506
+ if ( apply_filters( 'woocommerce_germanized_order_email_admin_confirmation_sent', false, $order_id ) === false && $new_order = $this->get_email_instance_by_id( 'new_order' ) ) {
507
+ $new_order->trigger( $order_id );
508
  }
509
 
510
+ /**
511
+ * After order confirmation emails.
512
+ *
513
+ * Fires after the order confirmation emails are being triggered (admin and user).
514
+ *
515
+ * @since 1.0.0
516
+ *
517
+ * @param integer $order_id The order id.
518
+ */
519
+ do_action( 'woocommerce_germanized_order_confirmation_sent', $order_id );
520
  }
521
 
522
  public function email_notices( $order, $sent_to_admin, $plain_text ) {
536
 
537
  foreach ( $items as $item ) {
538
 
539
+ $_product = wc_gzd_get_order_item_product( $item, $order );
540
 
541
  if ( ! $_product ) {
542
  continue;
558
 
559
  if ( get_option( 'woocommerce_gzd_differential_taxation_checkout_notices' ) === 'yes' && $is_differential_taxed && apply_filters( 'woocommerce_gzd_show_differential_taxation_in_emails', true, $type ) ) {
560
 
561
+ /**
562
+ * Filters the general differential taxation notice mark.
563
+ *
564
+ * @since 1.5.0
565
+ *
566
+ * @param string $notice The notice mark, e.g. `*`.
567
+ */
568
  $mark = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_mark', '** ' );
569
+
570
+ /**
571
+ * Filters the differential taxation notice text for emails.
572
+ *
573
+ * @since 1.5.0
574
+ *
575
+ * @param string $html The notice output.
576
+ */
577
  $notice = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_email', $mark . wc_gzd_get_differential_taxation_notice_text() );
578
 
579
  echo wpautop( '<div class="gzd-differential-taxation-notice-email">' . $notice . '</div>' );
582
  if ( $this->is_order_confirmation_email( $type->id ) ) {
583
 
584
  if ( $is_downloadable && $text = wc_gzd_get_legal_text_digital_email_notice() ) {
585
+
586
+ /**
587
+ * Filters the order confirmation digital notice text.
588
+ *
589
+ * @since 1.0.0
590
+ *
591
+ * @param string $html The notice HTML.
592
+ * @param WC_Order $order The order object.
593
+ */
594
  echo wpautop( apply_filters( 'woocommerce_gzd_order_confirmation_digital_notice', '<div class="gzd-digital-notice-text">' . $text . '</div>', $order ) );
595
  }
596
 
597
  if ( $is_service && $text = wc_gzd_get_legal_text_service_email_notice() ) {
598
+
599
+ /**
600
+ * Filters the order confirmation service notice text.
601
+ *
602
+ * @since 1.0.0
603
+ *
604
+ * @param string $html The notice HTML.
605
+ * @param WC_Order $order The order object.
606
+ */
607
  echo wpautop( apply_filters( 'woocommerce_gzd_order_confirmation_service_notice', '<div class="gzd-service-notice-text">' . $text . '</div>', $order ) );
608
  }
609
  }
611
  }
612
 
613
  public function is_order_confirmation_email( $id ) {
614
+
615
+ /**
616
+ * Filters whether a certain email id equals the order confirmation email.
617
+ *
618
+ * @since 1.0.0
619
+ *
620
+ * @param bool $is_confirmation Whether the `$id` matches the order confirmation or not.
621
+ * @param string $id The email id.
622
+ */
623
  return apply_filters( 'woocommerce_gzd_is_order_confirmation_email', ( 'customer_processing_order' === $id ), $id );
624
  }
625
 
669
 
670
  $this->remove_order_email_filters();
671
 
672
+ /**
673
+ * Before place email cart item filters.
674
+ *
675
+ * This hook fires before Germanized places certain cart item filters to make sure
676
+ * that product-related info (e.g. delivery time, unit price etc.) is shown within email tables.
677
+ *
678
+ * @since 1.9.1
679
+ *
680
+ * @param WC_GZD_Emails $this The email helper class.
681
+ * @param WC_Email $current The current email object.
682
+ */
683
  do_action( 'woocommerce_gzd_before_set_email_cart_item_filters', $this, $current );
684
 
685
  // Add order item name actions
704
  add_filter( 'woocommerce_order_formatted_line_subtotal', 'wc_gzd_cart_product_unit_price', wc_gzd_get_hook_priority( 'email_product_unit_price' ), 2 );
705
  }
706
 
707
+ /**
708
+ * After place email cart item filters.
709
+ *
710
+ * This hook fires after Germanized placed certain cart item filters.
711
+ *
712
+ * @since 1.9.1
713
+ *
714
+ * @param WC_GZD_Emails $this The email helper class.
715
+ * @param WC_Email $current The current email object.
716
+ */
717
  do_action( 'woocommerce_gzd_after_set_email_cart_item_filters', $this, $current );
718
  }
719
 
771
  continue;
772
  }
773
 
774
+ /**
775
+ * Filters whether to attach a certain page to the email footer or not.
776
+ *
777
+ * @since 1.0.0
778
+ *
779
+ * @param bool $attach Whether to attach or not.
780
+ * @param WC_Email $mail The mail instance.
781
+ * @param string $page_option The legal page option identifier e.g. terms.
782
+ */
783
  if ( in_array( $mail->id, get_option( $option_key ) ) && apply_filters( 'woocommerce_gzd_attach_email_footer', true, $mail, $page_option ) ) {
784
  $this->attach_page_content( $option, $mail, $mail->get_email_type() );
785
  }
791
  * Add global footer Hooks to Email templates
792
  */
793
  public function add_template_footers() {
794
+ $email = $this->get_current_email_object();
795
+
796
+ if ( $email ) {
797
+
798
+ $email_id = $email->id;
799
+
800
+ /**
801
+ * Global email footer (after content) hook.
802
+ *
803
+ * This hook serves as entry point for legal attachment texts within emails.
804
+ * `$email_id` contains the actual Woo email template id e.g. "wc_email_new_order".
805
+ *
806
+ * @since 1.0.0
807
+ *
808
+ * @param WC_Email $type The email instance.
809
+ */
810
+ do_action( 'woocommerce_germanized_email_footer_' . $email_id, $email );
811
  }
812
  }
813
 
814
  public function get_current_email_object() {
815
 
816
+ if ( isset( $GLOBALS['wc_gzd_template_name'] ) && ! empty( $GLOBALS['wc_gzd_template_name'] ) ) {
817
 
818
+ $object = $this->get_email_instance_by_tpl( $GLOBALS['wc_gzd_template_name'] );
819
+
820
+ if ( is_object( $object ) ) {
821
  return $object;
822
+ }
823
  }
824
 
825
  return false;
833
  */
834
  private function get_email_instance_by_tpl( $tpls = array() ) {
835
 
836
+ if ( ! $this->mailer ) {
837
  $this->set_mailer();
838
+ }
839
 
840
  $found_mails = array();
841
+ $mails = $this->mailer->get_emails();
842
 
843
  foreach ( $tpls as $tpl ) {
844
 
845
+ /**
846
+ * Filters the email template name for instance comparison.
847
+ *
848
+ * @since 1.0.0
849
+ *
850
+ * @param string $template_name The email template name.
851
+ */
852
+ $tpl = apply_filters( 'woocommerce_germanized_email_template_name', str_replace( array( 'admin-', '-' ), array( '', '_' ), basename( $tpl, '.php' ) ), $tpl );
853
 
854
  if ( ! empty( $mails ) ) {
 
855
  foreach ( $mails as $mail ) {
856
 
857
  if ( is_object( $mail ) ) {
858
 
859
+ /**
860
+ * Filters whether an email template equals email id.
861
+ *
862
+ * @since 1.0.0
863
+ *
864
+ * @param bool $equals Whether template and email id match or not.
865
+ * @param string $email_id The email id.
866
+ * @param string $tpl The template name.
867
+ */
868
  if ( apply_filters( 'woocommerce_gzd_email_template_id_comparison', ( $mail->id === $tpl ), $mail->id, $tpl ) ) {
869
  array_push( $found_mails, $mail );
870
  }
887
  */
888
  public function attach_page_content( $page_id, $mail, $email_type = 'html' ) {
889
 
890
+ /**
891
+ * Attach email footer.
892
+ *
893
+ * Fires before attaching legal page content to certain email templates.
894
+ *
895
+ * @since 1.0.0
896
+ *
897
+ * @param int $page_id The page id related to the legal content.
898
+ * @param string $email_type Equals `html` if HTML output is allowed.
899
+ */
900
  do_action( 'woocommerce_germanized_attach_email_footer', $page_id, $email_type );
901
 
902
+ /**
903
+ * Filters the page id to be attached to the email footer.
904
+ *
905
+ * @since 1.0.0
906
+ *
907
+ * @param int $page_id The page id to be attached.
908
+ * @param WC_Email $mail The email instance.
909
+ */
910
  $page_id = apply_filters( 'woocommerce_germanized_attach_email_footer_page_id', $page_id, $mail );
911
 
912
  remove_shortcode( 'revocation_form' );
includes/class-wc-gzd-hook-priorities.php CHANGED
@@ -146,7 +146,16 @@ class WC_GZD_Hook_Priorities {
146
  */
147
  public function get_hook_priority( $hook, $suppress_filters = false ) {
148
  if ( isset( $this->hooks[ $hook ] ) ) {
149
- return ( ! $suppress_filters ? apply_filters('wc_gzd_frontend_hook_priority', $this->hooks[ $hook ], $hook, $this ) : $this->hooks[ $hook ] );
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
  return false;
146
  */
147
  public function get_hook_priority( $hook, $suppress_filters = false ) {
148
  if ( isset( $this->hooks[ $hook ] ) ) {
149
+ /**
150
+ * Filters frontend hook priority.
151
+ *
152
+ * @since 1.0.0
153
+ *
154
+ * @param int $priority The hook priority.
155
+ * @param string $hook The hook name.
156
+ * @param WC_GZD_Hook_Priorities $hooks The hook priority instance.
157
+ */
158
+ return ( ! $suppress_filters ? apply_filters( 'wc_gzd_frontend_hook_priority', $this->hooks[ $hook ], $hook, $this ) : $this->hooks[ $hook ] );
159
  }
160
 
161
  return false;
includes/class-wc-gzd-install.php CHANGED
@@ -47,6 +47,14 @@ class WC_GZD_Install {
47
  public static function check_version() {
48
  if ( ! defined( 'IFRAME_REQUEST' ) && ( get_option( 'woocommerce_gzd_version' ) != WC_germanized()->version ) ) {
49
  self::install();
 
 
 
 
 
 
 
 
50
  do_action( 'woocommerce_gzd_updated' );
51
  }
52
  }
@@ -58,17 +66,21 @@ class WC_GZD_Install {
58
  // Install - Add pages button
59
  if ( ! empty( $_GET['install_woocommerce_gzd'] ) ) {
60
 
61
- if ( ! empty( $_GET['install_woocommerce_gzd_pages'] ) )
62
  self::create_pages();
 
63
 
64
- if ( ! empty( $_GET['install_woocommerce_gzd_settings'] ) )
65
  self::set_default_settings();
 
66
 
67
- if ( ! empty( $_GET['install_woocommerce_gzd_virtual_tax_rates'] ) )
68
  self::create_virtual_tax_rates();
 
69
 
70
- if ( ! empty( $_GET['install_woocommerce_gzd_tax_rates'] ) )
71
  self::create_tax_rates();
 
72
 
73
  // We no longer need to install pages
74
  delete_option( '_wc_gzd_needs_pages' );
@@ -119,8 +131,9 @@ class WC_GZD_Install {
119
  $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-germanized' );
120
  $mofile = WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized.mo';
121
 
122
- if ( file_exists( WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized-' . $locale . '.mo' ) )
123
  $mofile = WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized-' . $locale . '.mo';
 
124
 
125
  load_textdomain( 'woocommerce-germanized', $mofile );
126
 
@@ -138,20 +151,36 @@ class WC_GZD_Install {
138
  self::create_labels();
139
  self::create_options();
140
 
141
- // Virtual Tax Classes
142
- $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option('woocommerce_tax_classes' ) ) ) );
143
-
144
- if ( ! in_array( 'Virtual Rate', $tax_classes ) || ! in_array( 'Virtual Reduced Rate', $tax_classes ) ) {
 
 
 
 
 
145
 
146
  update_option( '_wc_gzd_needs_pages', 1 );
147
 
148
- if ( ! in_array( 'Virtual Rate', $tax_classes ) )
149
- array_push( $tax_classes, 'Virtual Rate' );
 
150
 
151
- if ( ! in_array( 'Virtual Reduced Rate', $tax_classes ) )
152
- array_push( $tax_classes, 'Virtual Reduced Rate' );
153
-
154
- update_option( 'woocommerce_tax_classes', implode( "\n", $tax_classes ) );
 
 
 
 
 
 
 
 
 
 
155
  }
156
 
157
  // Delete plugin header data for dependency check
@@ -205,7 +234,13 @@ class WC_GZD_Install {
205
  // Flush rules after install
206
  flush_rewrite_rules();
207
 
208
- // Upon install + update
 
 
 
 
 
 
209
  do_action( 'woocommerce_gzd_installed' );
210
 
211
  // Prevent redirect for inline plugin updates
@@ -458,7 +493,9 @@ class WC_GZD_Install {
458
  'woocommerce_tax_based_on' => 'billing',
459
  'woocommerce_allowed_countries' => 'specific',
460
  'woocommerce_specific_allowed_countries' => array( 'DE' ),
 
461
  );
 
462
  if ( ! empty($options ) ) {
463
  foreach ( $options as $key => $option ) {
464
  update_option( $key, $option );
@@ -474,9 +511,17 @@ class WC_GZD_Install {
474
  */
475
  public static function create_pages() {
476
 
477
- if ( ! function_exists( 'wc_create_page' ) )
478
  include_once( WC()->plugin_path() . '/includes/admin/wc-admin-functions.php' );
479
-
 
 
 
 
 
 
 
 
480
  $pages = apply_filters( 'woocommerce_gzd_create_pages', array(
481
  'data_security' => array(
482
  'name' => _x( 'data-security', 'Page slug', 'woocommerce-germanized' ),
@@ -506,7 +551,7 @@ class WC_GZD_Install {
506
  'payment_methods' => array(
507
  'name' => _x( 'payment-methods', 'Page slug', 'woocommerce-germanized' ),
508
  'title' => _x( 'Payment Methods', 'Page title', 'woocommerce-germanized' ),
509
- 'content' => '[' . apply_filters( 'woocommerce_gzd_payment_methods_shortcode_tag', 'payment_methods_info' ) . ']'
510
  ),
511
  ) );
512
 
@@ -531,6 +576,14 @@ class WC_GZD_Install {
531
  include_once WC_GERMANIZED_ABSPATH . 'includes/admin/settings/class-wc-gzd-settings-germanized.php';
532
 
533
  $settings = new WC_GZD_Settings_Germanized();
 
 
 
 
 
 
 
 
534
  $options = apply_filters( 'woocommerce_gzd_installation_default_settings', array_merge( $settings->get_settings(), $settings->get_display_settings(), $settings->get_email_settings() ) );
535
 
536
  $manager = WC_GZD_Legal_Checkbox_Manager::instance();
47
  public static function check_version() {
48
  if ( ! defined( 'IFRAME_REQUEST' ) && ( get_option( 'woocommerce_gzd_version' ) != WC_germanized()->version ) ) {
49
  self::install();
50
+
51
+ /**
52
+ * Plugin updated.
53
+ *
54
+ * Germanized was updated to a new version.
55
+ *
56
+ * @since 1.0.0
57
+ */
58
  do_action( 'woocommerce_gzd_updated' );
59
  }
60
  }
66
  // Install - Add pages button
67
  if ( ! empty( $_GET['install_woocommerce_gzd'] ) ) {
68
 
69
+ if ( ! empty( $_GET['install_woocommerce_gzd_pages'] ) ) {
70
  self::create_pages();
71
+ }
72
 
73
+ if ( ! empty( $_GET['install_woocommerce_gzd_settings'] ) ) {
74
  self::set_default_settings();
75
+ }
76
 
77
+ if ( ! empty( $_GET['install_woocommerce_gzd_virtual_tax_rates'] ) ) {
78
  self::create_virtual_tax_rates();
79
+ }
80
 
81
+ if ( ! empty( $_GET['install_woocommerce_gzd_tax_rates'] ) ) {
82
  self::create_tax_rates();
83
+ }
84
 
85
  // We no longer need to install pages
86
  delete_option( '_wc_gzd_needs_pages' );
131
  $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-germanized' );
132
  $mofile = WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized.mo';
133
 
134
+ if ( file_exists( WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized-' . $locale . '.mo' ) ) {
135
  $mofile = WC_germanized()->plugin_path() . '/i18n/languages/woocommerce-germanized-' . $locale . '.mo';
136
+ }
137
 
138
  load_textdomain( 'woocommerce-germanized', $mofile );
139
 
151
  self::create_labels();
152
  self::create_options();
153
 
154
+ if ( is_callable( array( 'WC_Tax', 'get_tax_class_slugs' ) ) ) {
155
+ $tax_classes = WC_Tax::get_tax_class_slugs();
156
+ } else {
157
+ $tax_classes = array_filter( array_map( 'sanitize_title', array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ) );
158
+ }
159
+
160
+ $new_tax_classes = array();
161
+
162
+ if ( ! in_array( 'virtual-rate', $tax_classes ) || ! in_array( 'virtual-reduced-rate', $tax_classes ) ) {
163
 
164
  update_option( '_wc_gzd_needs_pages', 1 );
165
 
166
+ if ( ! in_array( 'virtual-rate', $tax_classes ) ) {
167
+ array_push( $new_tax_classes, 'Virtual Rate' );
168
+ }
169
 
170
+ if ( ! in_array( 'virtual-reduced-rate', $tax_classes ) ) {
171
+ array_push( $new_tax_classes, 'Virtual Reduced Rate' );
172
+ }
173
+
174
+ if ( is_callable( array( 'WC_Tax', 'create_tax_class' ) ) ) {
175
+ foreach( $new_tax_classes as $new_tax_class ) {
176
+ WC_Tax::create_tax_class( $new_tax_class );
177
+ }
178
+ } else {
179
+ $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) );
180
+ $tax_classes = array_merge( $tax_classes, $new_tax_classes );
181
+
182
+ update_option( 'woocommerce_tax_classes', implode( "\n", $tax_classes ) );
183
+ }
184
  }
185
 
186
  // Delete plugin header data for dependency check
234
  // Flush rules after install
235
  flush_rewrite_rules();
236
 
237
+ /**
238
+ * Plugin installed.
239
+ *
240
+ * Germanized was installed successfully.
241
+ *
242
+ * @since 1.0.0
243
+ */
244
  do_action( 'woocommerce_gzd_installed' );
245
 
246
  // Prevent redirect for inline plugin updates
493
  'woocommerce_tax_based_on' => 'billing',
494
  'woocommerce_allowed_countries' => 'specific',
495
  'woocommerce_specific_allowed_countries' => array( 'DE' ),
496
+ 'woocommerce_default_customer_address' => 'base'
497
  );
498
+
499
  if ( ! empty($options ) ) {
500
  foreach ( $options as $key => $option ) {
501
  update_option( $key, $option );
511
  */
512
  public static function create_pages() {
513
 
514
+ if ( ! function_exists( 'wc_create_page' ) ) {
515
  include_once( WC()->plugin_path() . '/includes/admin/wc-admin-functions.php' );
516
+ }
517
+
518
+ /**
519
+ * Filter to add/edit pages to be created on install.
520
+ *
521
+ * @since 1.0.0
522
+ *
523
+ * @param array $pages Array containing page data.
524
+ */
525
  $pages = apply_filters( 'woocommerce_gzd_create_pages', array(
526
  'data_security' => array(
527
  'name' => _x( 'data-security', 'Page slug', 'woocommerce-germanized' ),
551
  'payment_methods' => array(
552
  'name' => _x( 'payment-methods', 'Page slug', 'woocommerce-germanized' ),
553
  'title' => _x( 'Payment Methods', 'Page title', 'woocommerce-germanized' ),
554
+ 'content' => '[payment_methods_info]'
555
  ),
556
  ) );
557
 
576
  include_once WC_GERMANIZED_ABSPATH . 'includes/admin/settings/class-wc-gzd-settings-germanized.php';
577
 
578
  $settings = new WC_GZD_Settings_Germanized();
579
+
580
+ /**
581
+ * Filter to adjust default options to be created on install.
582
+ *
583
+ * @since 1.0.0
584
+ *
585
+ * @param array $settings The settings to be added as wp_option on install.
586
+ */
587
  $options = apply_filters( 'woocommerce_gzd_installation_default_settings', array_merge( $settings->get_settings(), $settings->get_display_settings(), $settings->get_email_settings() ) );
588
 
589
  $manager = WC_GZD_Legal_Checkbox_Manager::instance();
includes/class-wc-gzd-legal-checkbox-manager.php CHANGED
@@ -55,6 +55,14 @@ class WC_GZD_Legal_Checkbox_Manager {
55
  }
56
 
57
  public function get_core_checkbox_ids() {
 
 
 
 
 
 
 
 
58
  return apply_filters( 'woocommerce_gzd_legal_checkbox_core_ids', $this->core_checkboxes );
59
  }
60
 
@@ -184,6 +192,22 @@ class WC_GZD_Legal_Checkbox_Manager {
184
  ) );
185
  }
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  do_action( 'woocommerce_gzd_register_legal_core_checkboxes', $this );
188
  }
189
 
@@ -286,6 +310,15 @@ class WC_GZD_Legal_Checkbox_Manager {
286
  $this->checkboxes = array();
287
  $this->register_core_checkboxes();
288
 
 
 
 
 
 
 
 
 
 
289
  do_action( 'woocommerce_gzd_register_legal_checkboxes', $this );
290
 
291
  // Make sure we are not registering core checkboxes again
@@ -301,6 +334,15 @@ class WC_GZD_Legal_Checkbox_Manager {
301
  }
302
  }
303
 
 
 
 
 
 
 
 
 
 
304
  do_action( 'woocommerce_gzd_registered_legal_checkboxes', $this );
305
  }
306
 
@@ -367,6 +409,14 @@ class WC_GZD_Legal_Checkbox_Manager {
367
  }
368
 
369
  public function get_locations() {
 
 
 
 
 
 
 
 
370
  return apply_filters( 'woocommerce_gzd_legal_checkbox_locations', array(
371
  'checkout' => __( 'Checkout', 'woocommerce-germanized' ),
372
  'register' => __( 'Register form', 'woocommerce-germanized' ),
@@ -460,8 +510,23 @@ class WC_GZD_Legal_Checkbox_Manager {
460
  return new WP_Error( 'checkbox_exists', sprintf( __( 'Checkbox with name %s does already exist.', 'woocommerce-germanized' ), $id ) );
461
  }
462
 
463
- // Allow third parties to filter checkbox args
 
 
 
 
 
 
 
464
  $args = apply_filters( 'woocommerce_gzd_register_legal_checkbox_args', $args, $id );
 
 
 
 
 
 
 
 
465
  $classname = apply_filters( 'woocommerce_gzd_legal_checkbox_classname', 'WC_GZD_Legal_Checkbox' );
466
 
467
  $this->checkboxes[ $id ] = new $classname( $id, $args );
@@ -566,11 +631,46 @@ class WC_GZD_Legal_Checkbox_Manager {
566
  }
567
 
568
  private function maybe_do_hooks( $location = 'checkout' ) {
 
569
  if ( ! did_action( 'woocommerce_gzd_run_legal_checkboxes' ) ) {
 
 
 
 
 
 
 
 
 
 
 
570
  do_action( 'woocommerce_gzd_run_legal_checkboxes', $this );
571
  }
572
 
573
  if ( ! did_action( 'woocommerce_gzd_run_legal_checkboxes_' . $location ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
574
  do_action( 'woocommerce_gzd_run_legal_checkboxes_' . $location, $this );
575
  }
576
  }
55
  }
56
 
57
  public function get_core_checkbox_ids() {
58
+
59
+ /**
60
+ * Filter that returns the core checkbox ids.
61
+ *
62
+ * @since 2.0.0
63
+ *
64
+ * @param array $checkbox_ids Array containg checkbox ids.
65
+ */
66
  return apply_filters( 'woocommerce_gzd_legal_checkbox_core_ids', $this->core_checkboxes );
67
  }
68
 
192
  ) );
193
  }
194
 
195
+ /**
196
+ * After core checkbox registration.
197
+ *
198
+ * Fires after Germanized has registered it's core legal checkboxes.
199
+ * Might be used to register additional checkboxes.
200
+ *
201
+ * ```php
202
+ * function ex_after_register_checkboxes( $manager ) {
203
+ * wc_gzd_register_legal_checkbox( array() );
204
+ * }
205
+ * add_action( 'woocommerce_gzd_register_legal_core_checkboxes', 'ex_after_register_checkboxes', 10, 1 );
206
+ *
207
+ * @since 2.0.0
208
+ *
209
+ * @param WC_GZD_Legal_Checkbox_Manager $this The legal checkbox manager instance.
210
+ */
211
  do_action( 'woocommerce_gzd_register_legal_core_checkboxes', $this );
212
  }
213
 
310
  $this->checkboxes = array();
311
  $this->register_core_checkboxes();
312
 
313
+ /**
314
+ * Before legal checkbox registration.
315
+ *
316
+ * Register legal checkboxes and populate settings.
317
+ *
318
+ * @since 2.0.0
319
+ *
320
+ * @param WC_GZD_Legal_Checkbox_Manager $this The checkboxes manager instance.
321
+ */
322
  do_action( 'woocommerce_gzd_register_legal_checkboxes', $this );
323
 
324
  // Make sure we are not registering core checkboxes again
334
  }
335
  }
336
 
337
+ /**
338
+ * After legal checkbox registration.
339
+ *
340
+ * Fires after the registration is completed. Might be used to alter settings and registered checkboxes.
341
+ *
342
+ * @since 2.0.0
343
+ *
344
+ * @param WC_GZD_Legal_Checkbox_Manager $this The checkboxes manager instance.
345
+ */
346
  do_action( 'woocommerce_gzd_registered_legal_checkboxes', $this );
347
  }
348
 
409
  }
410
 
411
  public function get_locations() {
412
+
413
+ /**
414
+ * Filter to add/remove legal checkbox locations.
415
+ *
416
+ * @since 2.0.0
417
+ *
418
+ * @param array $locations Key => value array containing location id and title.
419
+ */
420
  return apply_filters( 'woocommerce_gzd_legal_checkbox_locations', array(
421
  'checkout' => __( 'Checkout', 'woocommerce-germanized' ),
422
  'register' => __( 'Register form', 'woocommerce-germanized' ),
510
  return new WP_Error( 'checkbox_exists', sprintf( __( 'Checkbox with name %s does already exist.', 'woocommerce-germanized' ), $id ) );
511
  }
512
 
513
+ /**
514
+ * Filter legal checkbox arguments before registering.
515
+ *
516
+ * @since 2.0.0
517
+ *
518
+ * @param array $args Arguments passed to register checkbox.
519
+ * @param int $id Checkbox id.
520
+ */
521
  $args = apply_filters( 'woocommerce_gzd_register_legal_checkbox_args', $args, $id );
522
+
523
+ /**
524
+ * Filter to adjust default checkbox classname. Defaults to `WC_GZD_Legal_Checkbox`.
525
+ *
526
+ * @since 2.0.0
527
+ *
528
+ * @param string $classname The name of the checkbox classname.
529
+ */
530
  $classname = apply_filters( 'woocommerce_gzd_legal_checkbox_classname', 'WC_GZD_Legal_Checkbox' );
531
 
532
  $this->checkboxes[ $id ] = new $classname( $id, $args );
631
  }
632
 
633
  private function maybe_do_hooks( $location = 'checkout' ) {
634
+
635
  if ( ! did_action( 'woocommerce_gzd_run_legal_checkboxes' ) ) {
636
+
637
+ /**
638
+ * Before render checkboxes.
639
+ *
640
+ * This hook is used to alter checkboxes before rendering and to
641
+ * dynamically choose whether to display or hide them.
642
+ *
643
+ * @since 2.0.0
644
+ *
645
+ * @param WC_GZD_Legal_Checkbox_Manager $this The checkboxes manager instance.
646
+ */
647
  do_action( 'woocommerce_gzd_run_legal_checkboxes', $this );
648
  }
649
 
650
  if ( ! did_action( 'woocommerce_gzd_run_legal_checkboxes_' . $location ) ) {
651
+
652
+ /**
653
+ * Before render checkboxes location.
654
+ *
655
+ * This hook is used to alter checkboxes before rendering a specific location `$location`
656
+ * e.g. checkout and to dynamically choose whether to display or hide them.
657
+ *
658
+ * @see WC_GZD_Legal_Checkbox_Manager::get_locations()
659
+ *
660
+ * ```php
661
+ * function ex_filter_checkboxes_checkout( $manager ) {
662
+ * if ( $manager = $this->get_checkbox( 'download' ) ) {
663
+ * wc_gzd_update_legal_checkbox( 'download', array(
664
+ * 'is_shown' => true,
665
+ * ) );
666
+ * }
667
+ * }
668
+ * add_action( 'woocommerce_gzd_run_legal_checkboxes_checkout', 'ex_filter_checkboxes_checkout', 10, 1 );
669
+ *
670
+ * @since 2.0.0
671
+ *
672
+ * @param WC_GZD_Legal_Checkbox_Manager $this The checkboxes manager instance.
673
+ */
674
  do_action( 'woocommerce_gzd_run_legal_checkboxes_' . $location, $this );
675
  }
676
  }
includes/class-wc-gzd-legal-checkbox.php CHANGED
@@ -266,8 +266,18 @@ class WC_GZD_Legal_Checkbox {
266
  } else {
267
  $label = $this->settings['label'];
268
  $label = wc_gzd_replace_label_shortcodes( $label, $this->get_label_args() );
269
-
270
- return apply_filters( "woocommerce_gzd_legal_checkbox_{$this->get_id()}_label", $label, $this );
 
 
 
 
 
 
 
 
 
 
271
  }
272
  }
273
 
@@ -306,9 +316,19 @@ class WC_GZD_Legal_Checkbox {
306
  return $this->settings['error_message'];
307
  } else {
308
  $error_text = $this->settings['error_message'];
309
- $error_text = wc_gzd_replace_label_shortcodes( $error_text, $this->get_label_args() );
310
-
311
- return apply_filters( "woocommerce_gzd_legal_checkbox_{$this->get_id()}_error_text", $error_text, $this );
 
 
 
 
 
 
 
 
 
 
312
  }
313
  }
314
 
@@ -608,10 +628,21 @@ class WC_GZD_Legal_Checkbox {
608
  */
609
  public function validate( $value = '', $location = 'checkout' ) {
610
  $value = wc_clean( $value );
 
611
 
612
  if ( $this->is_validateable() && $this->is_mandatory() ) {
613
- if ( has_action( "woocommerce_gzd_legal_checkbox_{$location}_{$this->get_id()}_validate" ) ) {
614
- return apply_filters( "woocommerce_gzd_legal_checkbox_{$location}_{$this->get_id()}_validate", true, $this );
 
 
 
 
 
 
 
 
 
 
615
  } elseif ( empty( $value ) ) {
616
  return false;
617
  }
@@ -702,6 +733,14 @@ class WC_GZD_Legal_Checkbox {
702
  $supporting_locations[ $location ] = $locations[ $location ];
703
  }
704
 
 
 
 
 
 
 
 
 
705
  $options = apply_filters( "woocommerce_gzd_legal_checkbox_fields_before_titles", array(
706
 
707
  array(
@@ -788,12 +827,29 @@ class WC_GZD_Legal_Checkbox {
788
 
789
  ), $this );
790
 
791
- // ID based filter
792
- $options = apply_filters( "woocommerce_gzd_legal_checkbox_{$this->get_id()}_fields_before_titles", $options, $this );
 
 
 
 
 
 
 
 
 
793
 
794
  array_unshift( $options, array( 'title' => '', 'type' => 'title', 'id' => "checkbox_options" ) );
795
  array_push( $options, array( 'type' => 'sectionend', 'id' => 'checkbox_options' ) );
796
 
 
 
 
 
 
 
 
 
797
  return apply_filters( "woocommerce_gzd_legal_checkbox_fields", $options, $this );
798
  }
799
 
266
  } else {
267
  $label = $this->settings['label'];
268
  $label = wc_gzd_replace_label_shortcodes( $label, $this->get_label_args() );
269
+ $id = $this->get_id();
270
+
271
+ /**
272
+ * Filter the label for a legal checkbox.
273
+ * `$id` equals the checkbox id.
274
+ *
275
+ * @since 2.0.0
276
+ *
277
+ * @param string $label The HTML label.
278
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
279
+ */
280
+ return apply_filters( "woocommerce_gzd_legal_checkbox_{$id}_label", $label, $this );
281
  }
282
  }
283
 
316
  return $this->settings['error_message'];
317
  } else {
318
  $error_text = $this->settings['error_message'];
319
+ $error_text = wc_gzd_replace_label_shortcodes( $error_text, $this->get_label_args() );
320
+ $id = $this->get_id();
321
+
322
+ /**
323
+ * Filter the error message for a legal checkbox.
324
+ * `$id` equals the checkbox id.
325
+ *
326
+ * @since 2.0.0
327
+ *
328
+ * @param string $error_text The error message.
329
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
330
+ */
331
+ return apply_filters( "woocommerce_gzd_legal_checkbox_{$id}_error_text", $error_text, $this );
332
  }
333
  }
334
 
628
  */
629
  public function validate( $value = '', $location = 'checkout' ) {
630
  $value = wc_clean( $value );
631
+ $id = $this->get_id();
632
 
633
  if ( $this->is_validateable() && $this->is_mandatory() ) {
634
+ if ( has_filter( "woocommerce_gzd_legal_checkbox_{$location}_{$id}_validate" ) ) {
635
+
636
+ /**
637
+ * Filter whether a certain checkbox `$id` shall be validated for a certain
638
+ * location `$location`.
639
+ *
640
+ * @since 2.0.0
641
+ *
642
+ * @param bool $validate Whether to validate the checkbox or not.
643
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
644
+ */
645
+ return apply_filters( "woocommerce_gzd_legal_checkbox_{$location}_{$id}_validate", true, $this );
646
  } elseif ( empty( $value ) ) {
647
  return false;
648
  }
733
  $supporting_locations[ $location ] = $locations[ $location ];
734
  }
735
 
736
+ /**
737
+ * Filters legal checkbox settings before titles.
738
+ *
739
+ * @since 2.0.0
740
+ *
741
+ * @param array $settings Array containing settings.
742
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
743
+ */
744
  $options = apply_filters( "woocommerce_gzd_legal_checkbox_fields_before_titles", array(
745
 
746
  array(
827
 
828
  ), $this );
829
 
830
+ $id = $this->get_id();
831
+
832
+ /**
833
+ * Filters legal checkbox settings for `$id` before titles.
834
+ *
835
+ * @since 2.0.0
836
+ *
837
+ * @param array $settings Array containing settings.
838
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
839
+ */
840
+ $options = apply_filters( "woocommerce_gzd_legal_checkbox_{$id}_fields_before_titles", $options, $this );
841
 
842
  array_unshift( $options, array( 'title' => '', 'type' => 'title', 'id' => "checkbox_options" ) );
843
  array_push( $options, array( 'type' => 'sectionend', 'id' => 'checkbox_options' ) );
844
 
845
+ /**
846
+ * Filters legal checkbox settings.
847
+ *
848
+ * @since 2.0.0
849
+ *
850
+ * @param array $settings Array containing settings.
851
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
852
+ */
853
  return apply_filters( "woocommerce_gzd_legal_checkbox_fields", $options, $this );
854
  }
855
 
includes/class-wc-gzd-payment-gateways.php CHANGED
@@ -74,6 +74,15 @@ class WC_GZD_Payment_Gateways {
74
  }
75
 
76
  public function gateway_supports_fees( $id ) {
 
 
 
 
 
 
 
 
 
77
  return in_array( $id, apply_filters( 'woocommerce_gzd_fee_supporting_gateways', array( 'cod' ) ) ) ? true : false;
78
  }
79
 
@@ -85,8 +94,21 @@ class WC_GZD_Payment_Gateways {
85
 
86
  $this->maybe_set_gateway_data( $gateway );
87
 
88
- if ( ! isset( $gateway->force_order_button_text ) || $gateway->force_order_button_text )
 
 
 
 
 
 
 
 
 
 
 
 
89
  $gateway->order_button_text = apply_filters( 'woocommerce_gzd_order_button_payment_gateway_text', __( get_option( 'woocommerce_gzd_order_submit_btn_text' ), 'woocommerce-germanized' ), $gateway->id );
 
90
 
91
  if ( $this->gateway_supports_fees( $gateway->id ) && $gateway->get_option( 'fee' ) ) {
92
 
@@ -94,9 +116,18 @@ class WC_GZD_Payment_Gateways {
94
 
95
  $desc = sprintf( __( '%s payment charge', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'fee' ) ) ) . '.';
96
 
97
- if ( $gateway->get_option( 'forwarding_fee' ) )
98
- $desc .= ' ' . sprintf( __( 'Plus %s forwarding fee (charged by the transport agent)', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'forwarding_fee' ) ) ) . '.';
99
-
 
 
 
 
 
 
 
 
 
100
  $gateway_description .= apply_filters( 'woocommerce_gzd_payment_gateway_description', ' ' . $desc, $gateway );
101
 
102
  $gateway->description = $gateway_description;
74
  }
75
 
76
  public function gateway_supports_fees( $id ) {
77
+ /**
78
+ * Filter to adjust gateways supporting fees.
79
+ *
80
+ * By default only the Cash on delivery gateway supports the Germanized payment gateway fee feature.
81
+ *
82
+ * @since 2.0.0
83
+ *
84
+ * @param array[string] $gateway Array of gateway ids.
85
+ */
86
  return in_array( $id, apply_filters( 'woocommerce_gzd_fee_supporting_gateways', array( 'cod' ) ) ) ? true : false;
87
  }
88
 
94
 
95
  $this->maybe_set_gateway_data( $gateway );
96
 
97
+ if ( ! isset( $gateway->force_order_button_text ) || $gateway->force_order_button_text ) {
98
+
99
+ /**
100
+ * Filter to adjust the forced order submit button text per gateway.
101
+ * By default Woo allows gateways to adjust the submit button text.
102
+ * This behaviour does not comply with the button solution - that is why Germanized adds the
103
+ * option-based static text by default.
104
+ *
105
+ * @since 1.0.0
106
+ *
107
+ * @param string $button_text The static button text from within the options.
108
+ * @param string $gateway_id The gateway id.
109
+ */
110
  $gateway->order_button_text = apply_filters( 'woocommerce_gzd_order_button_payment_gateway_text', __( get_option( 'woocommerce_gzd_order_submit_btn_text' ), 'woocommerce-germanized' ), $gateway->id );
111
+ }
112
 
113
  if ( $this->gateway_supports_fees( $gateway->id ) && $gateway->get_option( 'fee' ) ) {
114
 
116
 
117
  $desc = sprintf( __( '%s payment charge', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'fee' ) ) ) . '.';
118
 
119
+ if ( $gateway->get_option( 'forwarding_fee' ) ) {
120
+ $desc .= ' ' . sprintf( __( 'Plus %s forwarding fee (charged by the transport agent)', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'forwarding_fee' ) ) ) . '.';
121
+ }
122
+
123
+ /**
124
+ * Filters the gateway description in case gateway fees have been added.
125
+ *
126
+ * @since 1.0.0
127
+ *
128
+ * @param string $html The description.
129
+ * @param WC_Payment_Gateway $gateway The gateway instance.
130
+ */
131
  $gateway_description .= apply_filters( 'woocommerce_gzd_payment_gateway_description', ' ' . $desc, $gateway );
132
 
133
  $gateway->description = $gateway_description;
includes/class-wc-gzd-post-types.php CHANGED
@@ -26,7 +26,21 @@ class WC_GZD_Post_Types {
26
  public static function register_taxonomies() {
27
  // Delivery time
28
  register_taxonomy( 'product_delivery_time',
 
 
 
 
 
 
 
29
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_delivery_time', array( 'product' ) ),
 
 
 
 
 
 
 
30
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_delivery_time', array(
31
  'hierarchical' => false,
32
  'update_count_callback' => '_wc_term_recount',
@@ -56,7 +70,21 @@ class WC_GZD_Post_Types {
56
  );
57
  // Units
58
  register_taxonomy( 'product_unit',
 
 
 
 
 
 
 
59
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_unit', array( 'product' ) ),
 
 
 
 
 
 
 
60
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_unit', array(
61
  'hierarchical' => false,
62
  'update_count_callback' => '_wc_term_recount',
@@ -86,7 +114,21 @@ class WC_GZD_Post_Types {
86
  );
87
  // Price labels
88
  register_taxonomy( 'product_price_label',
 
 
 
 
 
 
 
89
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_price_label', array( 'product' ) ),
 
 
 
 
 
 
 
90
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_price_label', array(
91
  'hierarchical' => false,
92
  'update_count_callback' => '_wc_term_recount',
26
  public static function register_taxonomies() {
27
  // Delivery time
28
  register_taxonomy( 'product_delivery_time',
29
+ /**
30
+ * Filter post types which are capable of storing delivery times.
31
+ *
32
+ * @since 1.0.0
33
+ *
34
+ * @param array $post_types The post types to support `delivery_time` taxonomy.
35
+ */
36
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_delivery_time', array( 'product' ) ),
37
+ /**
38
+ * Filter to adjust arguments passed to register the `delivery_time` taxonomy.
39
+ *
40
+ * @since 1.0.0
41
+ *
42
+ * @param array $args Arguments passed to `register_taxonomy`.
43
+ */
44
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_delivery_time', array(
45
  'hierarchical' => false,
46
  'update_count_callback' => '_wc_term_recount',
70
  );
71
  // Units
72
  register_taxonomy( 'product_unit',
73
+ /**
74
+ * Filter post types which are capable of storing units.
75
+ *
76
+ * @since 1.0.0
77
+ *
78
+ * @param array $post_types The post types to support `product_unit` taxonomy.
79
+ */
80
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_unit', array( 'product' ) ),
81
+ /**
82
+ * Filter to adjust arguments passed to register the `product_unit` taxonomy.
83
+ *
84
+ * @since 1.0.0
85
+ *
86
+ * @param array $args Arguments passed to `register_taxonomy`.
87
+ */
88
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_unit', array(
89
  'hierarchical' => false,
90
  'update_count_callback' => '_wc_term_recount',
114
  );
115
  // Price labels
116
  register_taxonomy( 'product_price_label',
117
+ /**
118
+ * Filter post types which are capable of storing price labels.
119
+ *
120
+ * @since 1.0.0
121
+ *
122
+ * @param array $post_types The post types to support `price_label` taxonomy.
123
+ */
124
  apply_filters( 'woocommerce_germanized_taxonomy_objects_product_price_label', array( 'product' ) ),
125
+ /**
126
+ * Filter to adjust arguments passed to register the `price_label` taxonomy.
127
+ *
128
+ * @since 1.0.0
129
+ *
130
+ * @param array $args Arguments passed to `register_taxonomy`.
131
+ */
132
  apply_filters( 'woocommerce_germanized_taxonomy_args_product_price_label', array(
133
  'hierarchical' => false,
134
  'update_count_callback' => '_wc_term_recount',
includes/class-wc-gzd-privacy.php CHANGED
@@ -22,6 +22,15 @@ class WC_GZD_Privacy {
22
  }
23
 
24
  public function erase_order_data( $order ) {
 
 
 
 
 
 
 
 
 
25
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_erase_order_personal_metadata', array(
26
  '_shipping_parcelshop_post_number' => 'text',
27
  '_billing_title' => 'text',
@@ -54,6 +63,15 @@ class WC_GZD_Privacy {
54
  }
55
 
56
  public function erase_customer_data( $response, $customer ) {
 
 
 
 
 
 
 
 
 
57
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_erase_customer_personal_metadata', array(
58
  'shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
59
  'billing_title' => __( 'Billing Title', 'woocommerce-germanized' ),
@@ -78,6 +96,15 @@ class WC_GZD_Privacy {
78
  }
79
 
80
  public function get_order_data( $data, $order ) {
 
 
 
 
 
 
 
 
 
81
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_export_order_personal_metadata', array(
82
  '_shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
83
  '_direct_debit_holder' => __( 'Account Holder', 'woocommerce-germanized' ),
@@ -116,6 +143,14 @@ class WC_GZD_Privacy {
116
 
117
  public function get_customer_data( $data, $customer ) {
118
 
 
 
 
 
 
 
 
 
119
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_export_customer_personal_metadata', array(
120
  'shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
121
  'billing_title' => __( 'Billing Title', 'woocommerce-germanized' ),
22
  }
23
 
24
  public function erase_order_data( $order ) {
25
+
26
+ /**
27
+ * Filter to adjust personal order data to be anonymized while removing personal data from orders.
28
+ *
29
+ * @since 1.9.10
30
+ *
31
+ * @param array $meta_keys Meta keys to be anonymized.
32
+ * @param WC_Order $order The order object.
33
+ */
34
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_erase_order_personal_metadata', array(
35
  '_shipping_parcelshop_post_number' => 'text',
36
  '_billing_title' => 'text',
63
  }
64
 
65
  public function erase_customer_data( $response, $customer ) {
66
+
67
+ /**
68
+ * Filter to adjust personal customer data to be anonymized while removing personal data from customers.
69
+ *
70
+ * @since 1.9.10
71
+ *
72
+ * @param array $meta_keys Meta keys to be anonymized.
73
+ * @param WC_Customer $customer The customer object.
74
+ */
75
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_erase_customer_personal_metadata', array(
76
  'shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
77
  'billing_title' => __( 'Billing Title', 'woocommerce-germanized' ),
96
  }
97
 
98
  public function get_order_data( $data, $order ) {
99
+
100
+ /**
101
+ * Filter to allow exporting personal data added by Germanized to orders.
102
+ *
103
+ * @since 1.9.10
104
+ *
105
+ * @param array $meta_keys Keys as well as titles to be exported.
106
+ * @param WC_Order $order The order object.
107
+ */
108
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_export_order_personal_metadata', array(
109
  '_shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
110
  '_direct_debit_holder' => __( 'Account Holder', 'woocommerce-germanized' ),
143
 
144
  public function get_customer_data( $data, $customer ) {
145
 
146
+ /**
147
+ * Filter to allow exporting personal data added by Germanized to customers.
148
+ *
149
+ * @since 1.9.10
150
+ *
151
+ * @param array $meta_keys Keys as well as titles to be exported.
152
+ * @param WC_Customer $customer The customer object.
153
+ */
154
  $meta_data = apply_filters( 'woocommerce_gzd_privacy_export_customer_personal_metadata', array(
155
  'shipping_parcelshop_post_number' => __( 'Postnumber', 'woocommerce-germanized' ),
156
  'billing_title' => __( 'Billing Title', 'woocommerce-germanized' ),
includes/class-wc-gzd-product-attribute-helper.php CHANGED
@@ -159,6 +159,7 @@ class WC_GZD_Product_Attribute_Helper {
159
  if ( isset( $meta_attributes[ $meta_key ] ) ) {
160
  $meta_value = array_merge(
161
  array(
 
162
  'checkout_visible' => apply_filters( 'woocommerce_gzd_product_attribute_checkout_visible_default_value', false ),
163
  ),
164
  (array) $meta_attributes[ $meta_key ]
159
  if ( isset( $meta_attributes[ $meta_key ] ) ) {
160
  $meta_value = array_merge(
161
  array(
162
+ /** This filter is documented in includes/class-wc-gzd-product-attribute.php */
163
  'checkout_visible' => apply_filters( 'woocommerce_gzd_product_attribute_checkout_visible_default_value', false ),
164
  ),
165
  (array) $meta_attributes[ $meta_key ]
includes/class-wc-gzd-product-attribute.php CHANGED
@@ -27,9 +27,17 @@ class WC_GZD_Product_Attribute extends WC_Product_Attribute {
27
  $attribute = new WC_Product_Attribute();
28
  }
29
 
 
 
 
 
 
 
 
 
30
  $this->attribute = $attribute;
31
  $this->data = array_merge( $this->attribute->get_data(), array(
32
- 'checkout_visible' => apply_filters( 'woocommerce_gzd_product_attribute_checkout_visible_default_value', false ),
33
  ) );
34
  }
35
 
27
  $attribute = new WC_Product_Attribute();
28
  }
29
 
30
+ /**
31
+ * Filter whether a product attribute should be visible within checkout by default.
32
+ *
33
+ * @since 2.0.0
34
+ *
35
+ * @param bool $default_visible Set to `true` to enable default checkout visibility.
36
+ */
37
+ $default_visible = apply_filters( 'woocommerce_gzd_product_attribute_checkout_visible_default_value', false );
38
  $this->attribute = $attribute;
39
  $this->data = array_merge( $this->attribute->get_data(), array(
40
+ 'checkout_visible' => $default_visible,
41
  ) );
42
  }
43
 
includes/class-wc-gzd-product-factory.php CHANGED
@@ -50,6 +50,14 @@ class WC_GZD_Product_Factory extends WC_Product_Factory {
50
  $type = wc_gzd_get_crud_data( $product, 'product_type' );
51
  $classname = 'WC_GZD_Product_' . ucfirst( $type );
52
 
 
 
 
 
 
 
 
 
53
  $classname = apply_filters( 'woocommerce_gzd_product_classname', $classname, $type );
54
 
55
  if ( class_exists( $classname ) ) {
50
  $type = wc_gzd_get_crud_data( $product, 'product_type' );
51
  $classname = 'WC_GZD_Product_' . ucfirst( $type );
52
 
53
+ /**
54
+ * Filter the classname for the Germanized product implementation.
55
+ *
56
+ * @since 1.0.0
57
+ *
58
+ * @param string $classname The classname.
59
+ * @param string $type The product type.
60
+ */
61
  $classname = apply_filters( 'woocommerce_gzd_product_classname', $classname, $type );
62
 
63
  if ( class_exists( $classname ) ) {
includes/class-wc-gzd-product-grouped.php CHANGED
@@ -38,6 +38,11 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
38
  $this->has_unit_price = true;
39
 
40
  foreach ( $children as $child ) {
 
 
 
 
 
41
  if ( $child->has_unit() ) {
42
  $unit = $child->get_unit_raw();
43
 
@@ -159,6 +164,15 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
159
  }
160
 
161
  public function get_delivery_time_html() {
 
 
 
 
 
 
 
 
 
162
  if ( apply_filters( 'woocommerce_gzd_hide_delivery_time_for_grouped_product', true, $this ) ) {
163
  return '';
164
  }
@@ -172,9 +186,13 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
172
  * @return string
173
  */
174
  public function get_unit_base() {
175
- $base = $this->get_unit_base_raw();
 
 
 
 
176
 
177
- return ( $base ) ? ( $base != apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 ) ? '<span class="unit-base">' . $base . '</span>' . apply_filters( 'wc_gzd_unit_price_base_seperator', ' ' ) : '' ) . '<span class="unit">' . $this->get_unit() . '</span>' : '';
178
  }
179
 
180
  /**
@@ -195,6 +213,8 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
195
  * @return string
196
  */
197
  public function get_unit_html( $show_sale = true ) {
 
 
198
  if ( $this->has_unit() ) {
199
 
200
  $prices = $this->get_child_unit_prices();
@@ -215,6 +235,15 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
215
  $price = wc_price( $min_price );
216
  }
217
 
 
 
 
 
 
 
 
 
 
218
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_price_html', $price, $this );
219
 
220
  } else {
@@ -225,14 +254,26 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
225
  $min_regular_price = current( $prices['regular_price'] );
226
  $max_regular_price = end( $prices['regular_price'] );
227
  $regular_price = $min_regular_price !== $max_regular_price ? sprintf( _x( '%1$s&ndash;%2$s', 'Price range: from-to', 'woocommerce-germanized' ), wc_price( $min_regular_price ), wc_price( $max_regular_price ) ) : wc_price( $min_regular_price );
 
 
 
 
 
 
 
 
 
228
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_sale_price_html', $this->get_price_html_from_to( $regular_price, $price, false ), $this );
229
  } else {
 
 
230
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_price_html', $price, $this );
231
  }
232
  }
233
 
234
  if ( strpos( $text, '{price}' ) !== false ) {
235
  $replacements = array(
 
236
  '{price}' => $price . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
237
  );
238
  } else {
@@ -246,6 +287,7 @@ class WC_GZD_Product_Grouped extends WC_GZD_Product {
246
  $price = wc_gzd_replace_label_shortcodes( $text, $replacements );
247
  }
248
 
 
249
  return apply_filters( 'woocommerce_gzd_unit_price_html', $price, $this );
250
  }
251
- }
38
  $this->has_unit_price = true;
39
 
40
  foreach ( $children as $child ) {
41
+
42
+ if ( ! $child ) {
43
+ continue;
44
+ }
45
+
46
  if ( $child->has_unit() ) {
47
  $unit = $child->get_unit_raw();
48
 
164
  }
165
 
166
  public function get_delivery_time_html() {
167
+
168
+ /**
169
+ * Filter that decides whether to hide delivery time for grouped products or not.
170
+ *
171
+ * @since 2.3.1
172
+ *
173
+ * @param bool $hide Whether to hide delivery time or not.
174
+ * @param WC_GZD_Product_Grouped $product The product object.
175
+ */
176
  if ( apply_filters( 'woocommerce_gzd_hide_delivery_time_for_grouped_product', true, $this ) ) {
177
  return '';
178
  }
186
  * @return string
187
  */
188
  public function get_unit_base() {
189
+ $base = $this->get_unit_base_raw();
190
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
191
+ $hide_amount = apply_filters( 'woocommerce_gzd_unit_base_hide_amount', 1 );
192
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
193
+ $separator = apply_filters( 'wc_gzd_unit_price_base_seperator', ' ' );
194
 
195
+ return ( $base ) ? ( $base != $hide_amount ? '<span class="unit-base">' . $base . '</span>' . $separator : '' ) . '<span class="unit">' . $this->get_unit() . '</span>' : '';
196
  }
197
 
198
  /**
213
  * @return string
214
  */
215
  public function get_unit_html( $show_sale = true ) {
216
+ $price = '';
217
+
218
  if ( $this->has_unit() ) {
219
 
220
  $prices = $this->get_child_unit_prices();
235
  $price = wc_price( $min_price );
236
  }
237
 
238
+ /**
239
+ * Filter to adjust grouped product unit price.
240
+ * In case of Woo version > 3.0.0 this filter can contain the formatted sale price too.
241
+ *
242
+ * @since 2.3.1
243
+ *
244
+ * @param string $price The price.
245
+ * @param WC_GZD_Product_Grouped $product The product object.
246
+ */
247
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_price_html', $price, $this );
248
 
249
  } else {
254
  $min_regular_price = current( $prices['regular_price'] );
255
  $max_regular_price = end( $prices['regular_price'] );
256
  $regular_price = $min_regular_price !== $max_regular_price ? sprintf( _x( '%1$s&ndash;%2$s', 'Price range: from-to', 'woocommerce-germanized' ), wc_price( $min_regular_price ), wc_price( $max_regular_price ) ) : wc_price( $min_regular_price );
257
+
258
+ /**
259
+ * Filter to adjust grouped product unit sale price for Woo version < 3.0.0.
260
+ *
261
+ * @since 2.3.1
262
+ *
263
+ * @param string $price The price range.
264
+ * @param WC_GZD_Product_Grouped $product The product object.
265
+ */
266
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_sale_price_html', $this->get_price_html_from_to( $regular_price, $price, false ), $this );
267
  } else {
268
+
269
+ /** This filter is documented in includes/class-wc-gzd-product-grouped.php */
270
  $price = apply_filters( 'woocommerce_gzd_grouped_unit_price_html', $price, $this );
271
  }
272
  }
273
 
274
  if ( strpos( $text, '{price}' ) !== false ) {
275
  $replacements = array(
276
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
277
  '{price}' => $price . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
278
  );
279
  } else {
287
  $price = wc_gzd_replace_label_shortcodes( $text, $replacements );
288
  }
289
 
290
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
291
  return apply_filters( 'woocommerce_gzd_unit_price_html', $price, $this );
292
  }
293
+ }
includes/class-wc-gzd-product-variable.php CHANGED
@@ -26,6 +26,16 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
26
  $prices = $this->get_variation_unit_prices( $display );
27
  $price = 'min' === $min_or_max ? current( $prices['regular_price'] ) : end( $prices['regular_price'] );
28
 
 
 
 
 
 
 
 
 
 
 
29
  return apply_filters( 'woocommerce_gzd_get_variation_unit_regular_price', $price, $this, $min_or_max, $display );
30
  }
31
 
@@ -39,6 +49,16 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
39
  $prices = $this->get_variation_unit_prices( $display );
40
  $price = 'min' === $min_or_max ? current( $prices['sale_price'] ) : end( $prices['sale_price'] );
41
 
 
 
 
 
 
 
 
 
 
 
42
  return apply_filters( 'woocommerce_gzd_get_variation_unit_sale_price', $price, $this, $min_or_max, $display );
43
  }
44
 
@@ -52,6 +72,16 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
52
  $prices = $this->get_variation_unit_prices( $display );
53
  $price = 'min' === $min_or_max ? current( $prices['price'] ) : end( $prices['price'] );
54
 
 
 
 
 
 
 
 
 
 
 
55
  return apply_filters( 'woocommerce_gzd_get_variation_unit_price', $price, $this, $min_or_max, $display );
56
  }
57
 
@@ -63,6 +93,7 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
63
  $is_on_sale = true;
64
  }
65
 
 
66
  return apply_filters( 'woocommerce_gzd_product_is_on_unit_sale', $is_on_sale, $this );
67
  }
68
 
@@ -89,6 +120,7 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
89
 
90
  $price = ( ! empty( $sale_label ) ? '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span>' : '' ) . ' <del>' . ( ( is_numeric( $from ) ) ? wc_price( $from ) : $from ) . '</del> ' . ( ! empty( $sale_regular_label ) ? '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' : '' ) . '<ins>' . ( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) . '</ins>';
91
 
 
92
  return apply_filters( 'woocommerce_germanized_get_price_html_from_to', $price, $from, $to, $this );
93
  }
94
 
@@ -101,12 +133,12 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
101
  */
102
  public function get_unit_html( $price = '' ) {
103
 
104
- if ( get_option( 'woocommerce_gzd_unit_price_enable_variable' ) === 'no' )
105
- return '';
 
106
 
107
  $prices = $this->get_variation_unit_prices( true );
108
-
109
- $text = get_option( 'woocommerce_gzd_unit_price_text' );
110
 
111
  if ( $this->has_unit() ) {
112
 
@@ -125,6 +157,15 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
125
  $price = wc_price( $min_price );
126
  }
127
 
 
 
 
 
 
 
 
 
 
128
  $price = apply_filters( 'woocommerce_gzd_variable_unit_price_html', $price, $this );
129
 
130
  } else {
@@ -135,14 +176,26 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
135
  $min_regular_price = current( $prices['regular_price'] );
136
  $max_regular_price = end( $prices['regular_price'] );
137
  $regular_price = $min_regular_price !== $max_regular_price ? sprintf( _x( '%1$s&ndash;%2$s', 'Price range: from-to', 'woocommerce-germanized' ), wc_price( $min_regular_price ), wc_price( $max_regular_price ) ) : wc_price( $min_regular_price );
 
 
 
 
 
 
 
 
 
138
  $price = apply_filters( 'woocommerce_gzd_variable_unit_sale_price_html', $this->get_price_html_from_to( $regular_price, $price, false ), $this );
139
  } else {
 
 
140
  $price = apply_filters( 'woocommerce_gzd_variable_unit_price_html', $price, $this );
141
  }
142
  }
143
 
144
  if ( strpos( $text, '{price}' ) !== false ) {
145
  $replacements = array(
 
146
  '{price}' => $price . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
147
  );
148
  } else {
@@ -156,6 +209,7 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
156
  $price = wc_gzd_replace_label_shortcodes( $text, $replacements );
157
  }
158
 
 
159
  return apply_filters( 'woocommerce_gzd_unit_price_html', $price, $this );
160
  }
161
 
@@ -204,6 +258,16 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
204
  }
205
  }
206
 
 
 
 
 
 
 
 
 
 
 
207
  $price_hash = md5( json_encode( apply_filters( 'woocommerce_gzd_get_variation_unit_prices_hash', $price_hash, $this, $display ) ) );
208
 
209
  // If the value has already been generated, we don't need to grab the values again.
@@ -231,11 +295,49 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
231
 
232
  $gzd_variation = wc_gzd_get_gzd_product( $variation );
233
 
234
- // E.g. recalculate unit price for dynamic pricing plugins
 
 
 
 
 
 
 
 
 
235
  do_action( 'woocommerce_gzd_before_get_variable_variation_unit_price', $gzd_variation );
236
-
 
 
 
 
 
 
 
 
 
237
  $price = apply_filters( 'woocommerce_gzd_variation_unit_prices_price', $gzd_variation->get_unit_price_raw(), $variation, $this );
 
 
 
 
 
 
 
 
 
 
238
  $regular_price = apply_filters( 'woocommerce_gzd_variation_unit_prices_regular_price', $gzd_variation->get_unit_regular_price(), $variation, $this );
 
 
 
 
 
 
 
 
 
 
239
  $sale_price = apply_filters( 'woocommerce_gzd_variation_unit_prices_sale_price', $gzd_variation->get_unit_sale_price(), $variation, $this );
240
 
241
  // If sale price does not equal price, the product is not yet on sale
@@ -275,6 +377,16 @@ class WC_GZD_Product_Variable extends WC_GZD_Product {
275
  set_transient( $transient_name, json_encode( $this->unit_prices_array ), DAY_IN_SECONDS * 30 );
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
278
  $this->unit_prices_array[ $price_hash ] = apply_filters( 'woocommerce_gzd_variation_unit_prices', $this->unit_prices_array[ $price_hash ], $this, $display );
279
  }
280
 
26
  $prices = $this->get_variation_unit_prices( $display );
27
  $price = 'min' === $min_or_max ? current( $prices['regular_price'] ) : end( $prices['regular_price'] );
28
 
29
+ /**
30
+ * Filter to adjust the min or max variation regular unit price.
31
+ *
32
+ * @since 1.0.0
33
+ *
34
+ * @param string $price The price.
35
+ * @param WC_GZD_Product_Variable $product The product object.
36
+ * @param string $min_or_max Either `min` or `max`.
37
+ * @param bool $display Either for display purposes or not.
38
+ */
39
  return apply_filters( 'woocommerce_gzd_get_variation_unit_regular_price', $price, $this, $min_or_max, $display );
40
  }
41
 
49
  $prices = $this->get_variation_unit_prices( $display );
50
  $price = 'min' === $min_or_max ? current( $prices['sale_price'] ) : end( $prices['sale_price'] );
51
 
52
+ /**
53
+ * Filter to adjust the min or max variation sale unit price.
54
+ *
55
+ * @since 1.0.0
56
+ *
57
+ * @param string $price The price.
58
+ * @param WC_GZD_Product_Variable $product The product object.
59
+ * @param string $min_or_max Either `min` or `max`.
60
+ * @param bool $display Either for display purposes or not.
61
+ */
62
  return apply_filters( 'woocommerce_gzd_get_variation_unit_sale_price', $price, $this, $min_or_max, $display );
63
  }
64
 
72
  $prices = $this->get_variation_unit_prices( $display );
73
  $price = 'min' === $min_or_max ? current( $prices['price'] ) : end( $prices['price'] );
74
 
75
+ /**
76
+ * Filter to adjust the min or max variation unit price.
77
+ *
78
+ * @since 1.0.0
79
+ *
80
+ * @param string $price The price.
81
+ * @param WC_GZD_Product_Variable $product The product object.
82
+ * @param string $min_or_max Either `min` or `max`.
83
+ * @param bool $display Either for display purposes or not.
84
+ */
85
  return apply_filters( 'woocommerce_gzd_get_variation_unit_price', $price, $this, $min_or_max, $display );
86
  }
87
 
93
  $is_on_sale = true;
94
  }
95
 
96
+ /** This filter is documented in includes/abstracts/abstract-wc-gzd-product.php */
97
  return apply_filters( 'woocommerce_gzd_product_is_on_unit_sale', $is_on_sale, $this );
98
  }
99
 
120
 
121
  $price = ( ! empty( $sale_label ) ? '<span class="wc-gzd-sale-price-label">' . $sale_label . '</span>' : '' ) . ' <del>' . ( ( is_numeric( $from ) ) ? wc_price( $from ) : $from ) . '</del> ' . ( ! empty( $sale_regular_label ) ? '<span class="wc-gzd-sale-price-label wc-gzd-sale-price-regular-label">' . $sale_regular_label . '</span> ' : '' ) . '<ins>' . ( ( is_numeric( $to ) ) ? wc_price( $to ) : $to ) . '</ins>';
122
 
123
+ /** This filter is documented in includes/abstracts/abstract-wc-gzd-product.php */
124
  return apply_filters( 'woocommerce_germanized_get_price_html_from_to', $price, $from, $to, $this );
125
  }
126
 
133
  */
134
  public function get_unit_html( $price = '' ) {
135
 
136
+ if ( get_option( 'woocommerce_gzd_unit_price_enable_variable' ) === 'no' ) {
137
+ return '';
138
+ }
139
 
140
  $prices = $this->get_variation_unit_prices( true );
141
+ $text = get_option( 'woocommerce_gzd_unit_price_text' );
 
142
 
143
  if ( $this->has_unit() ) {
144
 
157
  $price = wc_price( $min_price );
158
  }
159
 
160
+ /**
161
+ * Filter to adjust variable product unit price.
162
+ * In case of Woo version > 3.0.0 this filter can contain the formatted sale price too.
163
+ *
164
+ * @since 1.8.3
165
+ *
166
+ * @param string $price The price.
167
+ * @param WC_GZD_Product_Variable $product The product object.
168
+ */
169
  $price = apply_filters( 'woocommerce_gzd_variable_unit_price_html', $price, $this );
170
 
171
  } else {
176
  $min_regular_price = current( $prices['regular_price'] );
177
  $max_regular_price = end( $prices['regular_price'] );
178
  $regular_price = $min_regular_price !== $max_regular_price ? sprintf( _x( '%1$s&ndash;%2$s', 'Price range: from-to', 'woocommerce-germanized' ), wc_price( $min_regular_price ), wc_price( $max_regular_price ) ) : wc_price( $min_regular_price );
179
+
180
+ /**
181
+ * Filter to adjust variable product unit sale price for Woo version < 3.0.0.
182
+ *
183
+ * @since 1.8.3
184
+ *
185
+ * @param string $price The price range.
186
+ * @param WC_GZD_Product_Variable $product The product object.
187
+ */
188
  $price = apply_filters( 'woocommerce_gzd_variable_unit_sale_price_html', $this->get_price_html_from_to( $regular_price, $price, false ), $this );
189
  } else {
190
+
191
+ /** This filter is documented in includes/class-wc-gzd-product-variable.php */
192
  $price = apply_filters( 'woocommerce_gzd_variable_unit_price_html', $price, $this );
193
  }
194
  }
195
 
196
  if ( strpos( $text, '{price}' ) !== false ) {
197
  $replacements = array(
198
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
199
  '{price}' => $price . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(),
200
  );
201
  } else {
209
  $price = wc_gzd_replace_label_shortcodes( $text, $replacements );
210
  }
211
 
212
+ /** This filter is documented in includes/abstract/abstract-wc-gzd-product.php */
213
  return apply_filters( 'woocommerce_gzd_unit_price_html', $price, $this );
214
  }
215
 
258
  }
259
  }
260
 
261
+ /**
262
+ * Filter to adjust variable unit prices hash.
263
+ * This hash is used to get a transient with cached variable unit prices.
264
+ *
265
+ * @since 1.0.0
266
+ *
267
+ * @param string $price_hash The hash.
268
+ * @param WC_GZD_Product_Variable $product The producht object.
269
+ * @param bool $display Whether prices are for displaying purposes or not.
270
+ */
271
  $price_hash = md5( json_encode( apply_filters( 'woocommerce_gzd_get_variation_unit_prices_hash', $price_hash, $this, $display ) ) );
272
 
273
  // If the value has already been generated, we don't need to grab the values again.
295
 
296
  $gzd_variation = wc_gzd_get_gzd_product( $variation );
297
 
298
+ /**
299
+ * Before retrieving variation unit price.
300
+ *
301
+ * Fires before a unit price for a certain variation is retrieved. May be useful for
302
+ * recalculation purposes.
303
+ *
304
+ * @since 1.0.0
305
+ *
306
+ * @param WC_GZD_Product the variation product object.
307
+ */
308
  do_action( 'woocommerce_gzd_before_get_variable_variation_unit_price', $gzd_variation );
309
+
310
+ /**
311
+ * Filters the variation unit price.
312
+ *
313
+ * @since 1.8.3
314
+ *
315
+ * @param string $price The unit price.
316
+ * @param WC_Product_Variation $product The product object.
317
+ * @param WC_GZD_Product_Variable $parent The variable parent product object.
318
+ */
319
  $price = apply_filters( 'woocommerce_gzd_variation_unit_prices_price', $gzd_variation->get_unit_price_raw(), $variation, $this );
320
+
321
+ /**
322
+ * Filters the variation regular unit price.
323
+ *
324
+ * @since 1.8.3
325
+ *
326
+ * @param string $price The regular unit price.
327
+ * @param WC_Product_Variation $product The product object.
328
+ * @param WC_GZD_Product_Variable $parent The variable parent product object.
329
+ */
330
  $regular_price = apply_filters( 'woocommerce_gzd_variation_unit_prices_regular_price', $gzd_variation->get_unit_regular_price(), $variation, $this );
331
+
332
+ /**
333
+ * Filters the variation sale unit price.
334
+ *
335
+ * @since 1.8.3
336
+ *
337
+ * @param string $price The sale unit price.
338
+ * @param WC_Product_Variation $product The product object.
339
+ * @param WC_GZD_Product_Variable $parent The variable parent product object.
340
+ */
341
  $sale_price = apply_filters( 'woocommerce_gzd_variation_unit_prices_sale_price', $gzd_variation->get_unit_sale_price(), $variation, $this );
342
 
343
  // If sale price does not equal price, the product is not yet on sale
377
  set_transient( $transient_name, json_encode( $this->unit_prices_array ), DAY_IN_SECONDS * 30 );
378
  }
379
 
380
+ /**
381
+ * Filter to adjust the unit prices for a certain variation right before returning.
382
+ * Last change to adjust unit prices before handing them over for further processing.
383
+ *
384
+ * @since 1.8.3
385
+ *
386
+ * @param array $unit_prices Array containing unit price data.
387
+ * @param WC_GZD_Product_Variable $product The product object.
388
+ * @param bool $display Whether output is for display purposes or not.
389
+ */
390
  $this->unit_prices_array[ $price_hash ] = apply_filters( 'woocommerce_gzd_variation_unit_prices', $this->unit_prices_array[ $price_hash ], $this, $display );
391
  }
392
 
includes/class-wc-gzd-revocation.php CHANGED
@@ -16,6 +16,14 @@ class WC_GZD_Revocation {
16
  * @return array
17
  */
18
  public static function get_fields() {
 
 
 
 
 
 
 
 
19
  return apply_filters( 'woocommerce_gzd_revocation_fields', array(
20
  'content' => array(
21
  'type' => 'textarea',
@@ -80,6 +88,13 @@ class WC_GZD_Revocation {
80
  ),
81
  'privacy_checkbox' => array(
82
  'type' => 'checkbox',
 
 
 
 
 
 
 
83
  'label' => apply_filters( 'woocommerce_gzd_revocation_privacy_notice_label', sprintf( _x( 'Please accept our <a href="%s" target="_blank">Pricacy Policy</a> so that we can process your inquiry.', 'revocation-form', 'woocommerce-germanized' ) , wc_gzd_get_privacy_policy_url() ) ),
84
  'required' => true,
85
  ),
16
  * @return array
17
  */
18
  public static function get_fields() {
19
+
20
+ /**
21
+ * Filter to adjust form fields for the revocation form.
22
+ *
23
+ * @since 1.0.0
24
+ *
25
+ * @param array $fields The fields for the form.
26
+ */
27
  return apply_filters( 'woocommerce_gzd_revocation_fields', array(
28
  'content' => array(
29
  'type' => 'textarea',
88
  ),
89
  'privacy_checkbox' => array(
90
  'type' => 'checkbox',
91
+ /**
92
+ * Filter to adjust the privacy field label for revocation form.
93
+ *
94
+ * @since 1.9.10
95
+ *
96
+ * @param string $html The label.
97
+ */
98
  'label' => apply_filters( 'woocommerce_gzd_revocation_privacy_notice_label', sprintf( _x( 'Please accept our <a href="%s" target="_blank">Pricacy Policy</a> so that we can process your inquiry.', 'revocation-form', 'woocommerce-germanized' ) , wc_gzd_get_privacy_policy_url() ) ),
99
  'required' => true,
100
  ),
includes/class-wc-gzd-shipping-rate.php CHANGED
@@ -19,6 +19,7 @@ class WC_GZD_Shipping_Rate extends WC_Shipping_Rate {
19
  }
20
 
21
  if ( get_option( 'woocommerce_gzd_shipping_tax' ) === 'yes' && ( ! empty( $rate->taxes ) || get_option( 'woocommerce_gzd_shipping_tax_force' ) === 'yes' ) ) {
 
22
  if ( $this->get_shipping_tax() > 0 ) {
23
  $this->set_shared_taxes();
24
  }
@@ -51,6 +52,23 @@ class WC_GZD_Shipping_Rate extends WC_Shipping_Rate {
51
  } else {
52
  $this->taxes = $taxes;
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
  }
56
 
19
  }
20
 
21
  if ( get_option( 'woocommerce_gzd_shipping_tax' ) === 'yes' && ( ! empty( $rate->taxes ) || get_option( 'woocommerce_gzd_shipping_tax_force' ) === 'yes' ) ) {
22
+
23
  if ( $this->get_shipping_tax() > 0 ) {
24
  $this->set_shared_taxes();
25
  }
52
  } else {
53
  $this->taxes = $taxes;
54
  }
55
+ // Fallback when no taxes have been defined for the items - use default shipping rate instead.
56
+ } else {
57
+ $rates = array_keys( $this->taxes );
58
+
59
+ if ( ! empty( $rates ) ) {
60
+ $tax_rates = WC_Tax::get_shipping_tax_rates();
61
+
62
+ if ( ! empty( $tax_rates) ) {
63
+ $taxes = WC_Tax::calc_tax( $this->cost, $tax_rates, ( WC()->cart->tax_display_cart === 'incl' ) );
64
+
65
+ if ( is_callable( array( $this, 'set_taxes' ) ) ) {
66
+ $this->set_taxes( $taxes );
67
+ } else {
68
+ $this->taxes = $taxes;
69
+ }
70
+ }
71
+ }
72
  }
73
  }
74
 
includes/class-wc-gzd-shortcodes.php CHANGED
@@ -38,9 +38,15 @@ class WC_GZD_Shortcodes {
38
  );
39
 
40
  foreach ( $shortcodes as $shortcode => $function ) {
 
 
 
 
 
 
 
41
  add_shortcode( apply_filters( "gzd_{$shortcode}_shortcode_tag", $shortcode ), $function );
42
  }
43
-
44
  }
45
 
46
  protected static function get_gzd_product_shortcode( $atts, $function_name = '' ) {
@@ -70,22 +76,62 @@ class WC_GZD_Shortcodes {
70
  }
71
 
72
  public static function gzd_product_unit_price( $atts ) {
 
 
 
 
 
 
 
 
73
  return apply_filters( 'woocommerce_gzd_shortcode_product_unit_price_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_price_unit' ), $atts );
74
  }
75
 
76
  public static function gzd_product_units( $atts ) {
 
 
 
 
 
 
 
 
77
  return apply_filters( 'woocommerce_gzd_shortcode_product_units_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_product_units' ), $atts );
78
  }
79
 
80
  public static function gzd_product_delivery_time( $atts ) {
 
 
 
 
 
 
 
 
81
  return apply_filters( 'woocommerce_gzd_shortcode_product_delivery_time_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_delivery_time_info' ), $atts );
82
  }
83
 
84
  public static function gzd_product_tax_notice( $atts ) {
 
 
 
 
 
 
 
 
85
  return apply_filters( 'woocommerce_gzd_shortcode_product_tax_notice_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_tax_info' ), $atts );
86
  }
87
 
88
  public static function gzd_product_shipping_notice( $atts ) {
 
 
 
 
 
 
 
 
89
  return apply_filters( 'woocommerce_gzd_shortcode_product_shipping_notice_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_shipping_costs_info' ), $atts );
90
  }
91
 
38
  );
39
 
40
  foreach ( $shortcodes as $shortcode => $function ) {
41
+ /**
42
+ * Filter the shortcode tag.
43
+ *
44
+ * @since 1.0.0
45
+ *
46
+ * @param string $shortcode The shortcode name.
47
+ */
48
  add_shortcode( apply_filters( "gzd_{$shortcode}_shortcode_tag", $shortcode ), $function );
49
  }
 
50
  }
51
 
52
  protected static function get_gzd_product_shortcode( $atts, $function_name = '' ) {
76
  }
77
 
78
  public static function gzd_product_unit_price( $atts ) {
79
+ /**
80
+ * Filter shortcode product unit price output.
81
+ *
82
+ * @since 2.0.0
83
+ *
84
+ * @param string $html The output.
85
+ * @param array $atts The shortcode arguments.
86
+ */
87
  return apply_filters( 'woocommerce_gzd_shortcode_product_unit_price_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_price_unit' ), $atts );
88
  }
89
 
90
  public static function gzd_product_units( $atts ) {
91
+ /**
92
+ * Filter shortcode product unit output.
93
+ *
94
+ * @since 2.0.0
95
+ *
96
+ * @param string $html The output.
97
+ * @param array $atts The shortcode arguments.
98
+ */
99
  return apply_filters( 'woocommerce_gzd_shortcode_product_units_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_product_units' ), $atts );
100
  }
101
 
102
  public static function gzd_product_delivery_time( $atts ) {
103
+ /**
104
+ * Filter shortcode product delivery time output.
105
+ *
106
+ * @since 2.0.0
107
+ *
108
+ * @param string $html The output.
109
+ * @param array $atts The shortcode arguments.
110
+ */
111
  return apply_filters( 'woocommerce_gzd_shortcode_product_delivery_time_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_delivery_time_info' ), $atts );
112
  }
113
 
114
  public static function gzd_product_tax_notice( $atts ) {
115
+ /**
116
+ * Filter shortcode product tax notice output.
117
+ *
118
+ * @since 2.0.0
119
+ *
120
+ * @param string $html The output.
121
+ * @param array $atts The shortcode arguments.
122
+ */
123
  return apply_filters( 'woocommerce_gzd_shortcode_product_tax_notice_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_tax_info' ), $atts );
124
  }
125
 
126
  public static function gzd_product_shipping_notice( $atts ) {
127
+ /**
128
+ * Filter shortcode product shipping notice output.
129
+ *
130
+ * @since 2.0.0
131
+ *
132
+ * @param string $html The output.
133
+ * @param array $atts The shortcode arguments.
134
+ */
135
  return apply_filters( 'woocommerce_gzd_shortcode_product_shipping_notice_html', self::get_gzd_product_shortcode( $atts, 'woocommerce_gzd_template_single_shipping_costs_info' ), $atts );
136
  }
137
 
includes/class-wc-gzd-virtual-vat-helper.php CHANGED
@@ -47,13 +47,31 @@ class WC_GZD_Virtual_VAT_Helper {
47
  $location = WC_Tax::get_tax_location( $tax_class );
48
  $virtual_vat_applicable = in_array( $tax_class, array( 'virtual-rate', 'virtual-reduced-rate' ) ) && isset( $location[0] ) && sizeof( $location ) === 4 && $location[0] !== WC()->countries->get_base_country();
49
 
50
- // Make sure that the customer is not a vat exempt
 
 
 
 
 
 
 
 
51
  if ( apply_filters( 'woocommerce_gzd_check_virtual_vat_exempt', true, $rates, $tax_class ) && is_callable( array( WC()->customer, 'is_vat_exempt' ) ) ) {
52
  if ( WC()->customer->is_vat_exempt() ) {
53
  return $rates;
54
  }
55
  }
56
 
 
 
 
 
 
 
 
 
 
 
57
  if ( apply_filters( 'woocommerce_gzd_force_tax_location_vat_base_rates', $virtual_vat_applicable, $tax_class, $location ) ) {
58
 
59
  list( $country, $state, $postcode, $city ) = $location;
47
  $location = WC_Tax::get_tax_location( $tax_class );
48
  $virtual_vat_applicable = in_array( $tax_class, array( 'virtual-rate', 'virtual-reduced-rate' ) ) && isset( $location[0] ) && sizeof( $location ) === 4 && $location[0] !== WC()->countries->get_base_country();
49
 
50
+ /**
51
+ * Filter that allows disabling default customer VAT exempt check when handling virtual VAT rates.
52
+ *
53
+ * @since 1.0.0
54
+ *
55
+ * @param bool $check Whether to check for VAT exempt or not.
56
+ * @param array $rates Array containing tax rates.
57
+ * @param string $tax_class The current tax class.
58
+ */
59
  if ( apply_filters( 'woocommerce_gzd_check_virtual_vat_exempt', true, $rates, $tax_class ) && is_callable( array( WC()->customer, 'is_vat_exempt' ) ) ) {
60
  if ( WC()->customer->is_vat_exempt() ) {
61
  return $rates;
62
  }
63
  }
64
 
65
+ /**
66
+ * Filter to adjust whether virtual VAT is applicable or not.
67
+ * If set to true, Germanized will return tax rates based on the user country.
68
+ *
69
+ * @since 1.0.0
70
+ *
71
+ * @param bool $virtual_vat_applicable Whether virtual VAT rates are applicable or not.
72
+ * @param string $tax_class The tax class.
73
+ * @param array $location The tax location data.
74
+ */
75
  if ( apply_filters( 'woocommerce_gzd_force_tax_location_vat_base_rates', $virtual_vat_applicable, $tax_class, $location ) ) {
76
 
77
  list( $country, $state, $postcode, $city ) = $location;
includes/compatibility/class-wc-gzd-compatibility-woo-poly-integration.php CHANGED
@@ -40,6 +40,15 @@ class WC_GZD_Compatibility_Woo_Poly_Integration extends WC_GZD_Compatibility {
40
  $this->setup_taxonomy_translation();
41
  $this->setup_emails();
42
 
 
 
 
 
 
 
 
 
 
43
  do_action( 'woocommerce_gzd_polylang_compatibility_loaded', $this );
44
  }
45
 
@@ -67,10 +76,26 @@ class WC_GZD_Compatibility_Woo_Poly_Integration extends WC_GZD_Compatibility {
67
  }
68
 
69
  public function get_order_emails() {
 
 
 
 
 
 
 
 
70
  return apply_filters( 'woocommerce_gzd_polylang_order_emails', $this->order_emails, $this );
71
  }
72
 
73
  public function get_emails() {
 
 
 
 
 
 
 
 
74
  return apply_filters( 'woocommerce_gzd_polylang_emails', array_merge( $this->get_order_emails(), $this->other_emails ), $this );
75
  }
76
 
40
  $this->setup_taxonomy_translation();
41
  $this->setup_emails();
42
 
43
+ /**
44
+ * Hyyan WooCommerce Polylang Integration compatibility loaded.
45
+ *
46
+ * Fires after Germanized loaded it's Woo PolyLang compatibility script.
47
+ *
48
+ * @since 1.9.7
49
+ *
50
+ * @param WC_GZD_Compatibility_Woo_Poly_Integration $this The compatibility instance.
51
+ */
52
  do_action( 'woocommerce_gzd_polylang_compatibility_loaded', $this );
53
  }
54
 
76
  }
77
 
78
  public function get_order_emails() {
79
+ /**
80
+ * Filter to add additional order emails to PolyLang.
81
+ *
82
+ * @since 1.8.5
83
+ *
84
+ * @param array $order_mails Array containing additional email ids.
85
+ * @param WC_GZD_Compatibility_Woo_Poly_Integration $integration The integration instance.
86
+ */
87
  return apply_filters( 'woocommerce_gzd_polylang_order_emails', $this->order_emails, $this );
88
  }
89
 
90
  public function get_emails() {
91
+ /**
92
+ * Filter to get emails relevant for PolyLang.
93
+ *
94
+ * @since 1.8.5
95
+ *
96
+ * @param array $mails Array containing additional email ids.
97
+ * @param WC_GZD_Compatibility_Woo_Poly_Integration $integration The integration instance.
98
+ */
99
  return apply_filters( 'woocommerce_gzd_polylang_emails', array_merge( $this->get_order_emails(), $this->other_emails ), $this );
100
  }
101
 
includes/compatibility/class-wc-gzd-compatibility-woocommerce-subscriptions.php CHANGED
@@ -47,6 +47,13 @@ class WC_GZD_Compatibility_Woocommerce_Subscriptions extends WC_GZD_Compatibilit
47
 
48
  public function set_tax_notice( $price, $cart ) {
49
 
 
 
 
 
 
 
 
50
  if ( ! apply_filters( 'woocommerce_gzd_show_tax_for_cart_subscription_price', true ) ) {
51
  return $price;
52
  }
47
 
48
  public function set_tax_notice( $price, $cart ) {
49
 
50
+ /**
51
+ * Filter that allows disabling tax notice for subscription cart prices.
52
+ *
53
+ * @since 2.0.0
54
+ *
55
+ * @param bool $disable Whether to disable tax notice for subscription price or not.
56
+ */
57
  if ( ! apply_filters( 'woocommerce_gzd_show_tax_for_cart_subscription_price', true ) ) {
58
  return $price;
59
  }
includes/compatibility/class-wc-gzd-compatibility-wpml-string-translation.php CHANGED
@@ -84,6 +84,14 @@ class WC_GZD_Compatibility_Wpml_String_Translation extends WC_GZD_Compatibility
84
  * @return array
85
  */
86
  public function get_translatable_options() {
 
 
 
 
 
 
 
 
87
  return apply_filters( 'woocommerce_gzd_wpml_translatable_options', array(
88
  'woocommerce_gzd_small_enterprise_text' => '',
89
  'woocommerce_gzd_differential_taxation_notice_text' => '',
@@ -111,13 +119,17 @@ class WC_GZD_Compatibility_Wpml_String_Translation extends WC_GZD_Compatibility
111
  ) );
112
  }
113
 
114
- /**
115
- * By default WPML allow only certain strings to be translated within the administration area (e.g. blog title).
116
- * If you want some translatable strings to be loaded globally within the admin panel use the filter accordingly.
117
- *
118
- * @return array
119
- */
120
  public function get_translatable_admin_options() {
 
 
 
 
 
 
 
 
 
 
121
  return apply_filters( 'woocommerce_gzd_wpml_translatable_admin_options', array() );
122
  }
123
 
@@ -193,6 +205,13 @@ class WC_GZD_Compatibility_Wpml_String_Translation extends WC_GZD_Compatibility
193
  $enable = true;
194
  }
195
 
 
 
 
 
 
 
 
196
  return apply_filters( 'woocommerce_gzd_enable_wpml_string_translation_settings_filters', $enable );
197
  }
198
 
@@ -414,6 +433,20 @@ class WC_GZD_Compatibility_Wpml_String_Translation extends WC_GZD_Compatibility
414
  * Remove translation if it equals original string
415
  * Use woocommerce_gzd_wpml_remove_translation_empty_equal filter to disallow string deletion which results in "real" option translations
416
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  if ( ( $org_string === $new_value || empty( $new_value ) ) && apply_filters( 'woocommerce_gzd_wpml_remove_translation_empty_equal', true, $option, $new_value, $old_value ) ) {
418
  $this->delete_string_translation( $org_string_id, $this->get_current_language() );
419
 
@@ -427,7 +460,6 @@ class WC_GZD_Compatibility_Wpml_String_Translation extends WC_GZD_Compatibility
427
  }
428
  }
429
 
430
- // Allow WPML to delete the cache
431
  do_action( "update_option_{$option}", $old_value, $return_value, $option );
432
 
433
  return $return_value;
84
  * @return array
85
  */
86
  public function get_translatable_options() {
87
+
88
+ /**
89
+ * Filter that return WPML translatable string options.
90
+ *
91
+ * @since 2.0.0
92
+ *
93
+ * @param array $strings Array containing the option_name as key.
94
+ */
95
  return apply_filters( 'woocommerce_gzd_wpml_translatable_options', array(
96
  'woocommerce_gzd_small_enterprise_text' => '',
97
  'woocommerce_gzd_differential_taxation_notice_text' => '',
119
  ) );
120
  }
121
 
 
 
 
 
 
 
122
  public function get_translatable_admin_options() {
123
+ /**
124
+ * Filter to add further WPML translatable admin options.
125
+ *
126
+ * By default WPML allow only certain strings to be translated within the administration area (e.g. blog title).
127
+ * If you want some translatable strings to be loaded globally within the admin panel use the filter accordingly.
128
+ *
129
+ * @since 2.0.0
130
+ *
131
+ * @param array $strings Array containing admin strings.
132
+ */
133
  return apply_filters( 'woocommerce_gzd_wpml_translatable_admin_options', array() );
134
  }
135
 
205
  $enable = true;
206
  }
207
 
208
+ /**
209
+ * Filter that allows enabling WPML translation string filters.
210
+ *
211
+ * @since 2.0.0
212
+ *
213
+ * @param bool $enable Whether to enable filters or not.
214
+ */
215
  return apply_filters( 'woocommerce_gzd_enable_wpml_string_translation_settings_filters', $enable );
216
  }
217
 
433
  * Remove translation if it equals original string
434
  * Use woocommerce_gzd_wpml_remove_translation_empty_equal filter to disallow string deletion which results in "real" option translations
435
  */
436
+
437
+ /**
438
+ * Filter that allows to disable deleting empty strings or strings that equal their parent value.
439
+ *
440
+ * This filter is used by our Trusted Shops integration to allow "real" option translation e.g. to allow
441
+ * one option to be set for a specific language only.
442
+ *
443
+ * @since 2.0.0
444
+ *
445
+ * @param bool $enable Whether to enable deletion or not.
446
+ * @param string $option The option name.
447
+ * @param string $new_value The new value.
448
+ * @param string $old_value The old value.
449
+ */
450
  if ( ( $org_string === $new_value || empty( $new_value ) ) && apply_filters( 'woocommerce_gzd_wpml_remove_translation_empty_equal', true, $option, $new_value, $old_value ) ) {
451
  $this->delete_string_translation( $org_string_id, $this->get_current_language() );
452
 
460
  }
461
  }
462
 
 
463
  do_action( "update_option_{$option}", $old_value, $return_value, $option );
464
 
465
  return $return_value;
includes/compatibility/class-wc-gzd-compatibility-wpml.php CHANGED
@@ -56,6 +56,13 @@ class WC_GZD_Compatibility_Wpml extends WC_GZD_Compatibility {
56
  unload_textdomain( 'woocommerce-germanized' );
57
  WC_germanized()->load_plugin_textdomain();
58
 
 
 
 
 
 
 
 
59
  do_action( 'woocommerce_gzd_reload_locale' );
60
  }
61
 
@@ -194,9 +201,29 @@ class WC_GZD_Compatibility_Wpml extends WC_GZD_Compatibility {
194
  load_default_textdomain( get_locale() );
195
  }
196
 
 
 
 
 
 
 
 
 
 
 
197
  do_action( 'woocommerce_gzd_wpml_switched_language', $lang, $wc_gzd_original_lang );
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
200
  do_action( 'woocommerce_gzd_wpml_switch_language', $lang, $wc_gzd_original_lang );
201
  }
202
 
56
  unload_textdomain( 'woocommerce-germanized' );
57
  WC_germanized()->load_plugin_textdomain();
58
 
59
+ /**
60
+ * Reload locale.
61
+ *
62
+ * Fires after Germanized plugin textdomain was reloaded programmatically.
63
+ *
64
+ * @since 2.2.9
65
+ */
66
  do_action( 'woocommerce_gzd_reload_locale' );
67
  }
68
 
201
  load_default_textdomain( get_locale() );
202
  }
203
 
204
+ /**
205
+ * WPML language switched.
206
+ *
207
+ * Fires whenever Germanized has explicitly changed the language.
208
+ *
209
+ * @since 2.2.9
210
+ *
211
+ * @param string $lang The new language code.
212
+ * @param string $wc_gzd_original_lang The old language code.
213
+ */
214
  do_action( 'woocommerce_gzd_wpml_switched_language', $lang, $wc_gzd_original_lang );
215
  }
216
 
217
+ /**
218
+ * WPML language switch.
219
+ *
220
+ * Fires whenever Germanized was asked to programatically change the language.
221
+ *
222
+ * @since 2.2.9
223
+ *
224
+ * @param string $lang The new language code.
225
+ * @param string $wc_gzd_original_lang The old language code.
226
+ */
227
  do_action( 'woocommerce_gzd_wpml_switch_language', $lang, $wc_gzd_original_lang );
228
  }
229
 
includes/compatibility/elementor/widgets/abstact-class-wc-gzd-elementor-widget.php CHANGED
@@ -37,6 +37,13 @@ abstract class WC_GZD_Elementor_Widget extends ElementorPro\Modules\Woocommerce\
37
  ]
38
  );
39
 
 
 
 
 
 
 
 
40
  if ( apply_filters( 'woocommerce_gzd_show_elementor_upgrade_notice', true ) ) {
41
  $this->add_responsive_control(
42
  'upgrade',
@@ -48,12 +55,26 @@ abstract class WC_GZD_Elementor_Widget extends ElementorPro\Modules\Woocommerce\
48
  );
49
  }
50
 
51
- do_action( "woocommerce_gzd_elementor_widget_{$this->get_postfix()}_controls", $this, Controls_Manager::class );
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  $this->end_controls_section();
54
  }
55
 
56
  protected function get_title_prefix() {
 
 
57
  if ( ! apply_filters( 'woocommerce_gzd_show_elementor_upgrade_notice', true ) ) {
58
  return '';
59
  }
@@ -68,6 +89,16 @@ abstract class WC_GZD_Elementor_Widget extends ElementorPro\Modules\Woocommerce\
68
  return '';
69
  }
70
 
 
 
 
 
 
 
 
 
 
 
71
  do_action( "woocommerce_gzd_elementor_widget_{$this->get_postfix()}_render", $product, $this );
72
  }
73
 
37
  ]
38
  );
39
 
40
+ /**
41
+ * Filter that allows to disable showing an upgrade notice for Germanized Elementor widgets.
42
+ *
43
+ * @since 2.0.0
44
+ *
45
+ * @param bool $disable Whether to disable the upgrade notice or not.
46
+ */
47
  if ( apply_filters( 'woocommerce_gzd_show_elementor_upgrade_notice', true ) ) {
48
  $this->add_responsive_control(
49
  'upgrade',
55
  );
56
  }
57
 
58
+ $class_name = Controls_Manager::class;
59
+
60
+ /**
61
+ * Elementor Widget Controls.
62
+ *
63
+ * Fires after Germanized has added Elementor widget controls.
64
+ *
65
+ * @since 2.0.0
66
+ *
67
+ * @param WC_GZD_Elementor_Widget $this The actual widget.
68
+ * @param Elementor\Controls_Manager $class_name The controls manager class.
69
+ */
70
+ do_action( "woocommerce_gzd_elementor_widget_{$this->get_postfix()}_controls", $this, $class_name );
71
 
72
  $this->end_controls_section();
73
  }
74
 
75
  protected function get_title_prefix() {
76
+
77
+ /** This filter is documented in includes/compatibility/elementor/widgets/abstract-class-wc-gzd-elementor-widget.php */
78
  if ( ! apply_filters( 'woocommerce_gzd_show_elementor_upgrade_notice', true ) ) {
79
  return '';
80
  }
89
  return '';
90
  }
91
 
92
+ /**
93
+ * Render an Elementor widget.
94
+ *
95
+ * Render a certain Germanized Elementor widget in the frontend.
96
+ *
97
+ * @since 2.0.0
98
+ *
99
+ * @param WC_Product $product The product object.
100
+ * @param WC_GZD_Elementor_Widget $this The widget instance.
101
+ */
102
  do_action( "woocommerce_gzd_elementor_widget_{$this->get_postfix()}_render", $product, $this );
103
  }
104
 
includes/emails/class-wc-gzd-email-customer-on-hold-order.php CHANGED
@@ -32,6 +32,15 @@ if ( ! class_exists( 'WC_GZD_Email_Customer_On_Hold_Order' ) ) :
32
  }
33
 
34
  public function trigger( $order_id, $order = false ) {
 
 
 
 
 
 
 
 
 
35
  if ( apply_filters( 'woocommerce_gzd_disable_on_hold_email', true ) ) {
36
  return;
37
  }
32
  }
33
 
34
  public function trigger( $order_id, $order = false ) {
35
+
36
+ /**
37
+ * Filter that allows re-enabling the on-hold order email which is by default
38
+ * replaced by the processing email used as order confirmation.
39
+ *
40
+ * @since 1.0.0
41
+ *
42
+ * @param bool $disable Whether to disable the on-hold email or not.
43
+ */
44
  if ( apply_filters( 'woocommerce_gzd_disable_on_hold_email', true ) ) {
45
  return;
46
  }
includes/emails/class-wc-gzd-email-customer-paid-for-order.php CHANGED
@@ -85,6 +85,10 @@ class WC_GZD_Email_Customer_Paid_For_Order extends WC_Email {
85
  }
86
 
87
  if ( $this->is_enabled() && $this->get_recipient() ) {
 
 
 
 
88
  $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
89
  }
90
 
85
  }
86
 
87
  if ( $this->is_enabled() && $this->get_recipient() ) {
88
+
89
+ // Make sure gateways do not insert data here
90
+ remove_all_actions( 'woocommerce_email_before_order_table' );
91
+
92
  $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
93
  }
94
 
includes/emails/class-wc-gzd-email-customer-revocation.php CHANGED
@@ -95,6 +95,13 @@ class WC_GZD_Email_Customer_Revocation extends WC_Email {
95
  * @return string
96
  */
97
  public function get_admin_email() {
 
 
 
 
 
 
 
98
  return apply_filters( 'wc_gzd_revocation_admin_mail', $this->get_option( 'admin_email', get_bloginfo( 'admin_email' ) ) );
99
  }
100
 
95
  * @return string
96
  */
97
  public function get_admin_email() {
98
+ /**
99
+ * Filter the revocation admin email receiver address.
100
+ *
101
+ * @since 1.0.0
102
+ *
103
+ * @param string $email The email address.
104
+ */
105
  return apply_filters( 'wc_gzd_revocation_admin_mail', $this->get_option( 'admin_email', get_bloginfo( 'admin_email' ) ) );
106
  }
107
 
includes/export/class-wc-gzd-product-export.php CHANGED
@@ -38,6 +38,13 @@ class WC_GZD_Product_Export {
38
 
39
  public function init() {
40
 
 
 
 
 
 
 
 
41
  $this->columns = apply_filters( 'woocommerce_gzd_product_export_default_columns', array(
42
  'service' => _x( 'Is service?', 'exporter', 'woocommerce-germanized' ),
43
  'differential_taxation' => _x( 'Is differential taxed?', 'exporter', 'woocommerce-germanized' ),
@@ -70,12 +77,20 @@ class WC_GZD_Product_Export {
70
  }
71
 
72
  public function export_column( $value, $product ) {
73
- $filter = current_filter();
74
  $column_name = str_replace( 'woocommerce_product_export_product_column_', '', $filter );
75
 
76
  // Filter for 3rd parties.
77
  if ( has_filter( "woocommerce_gzd_product_export_column_{$column_name}" ) ) {
78
- $value = apply_filters( "woocommerce_product_export_column_{$column_name}", '', $product );
 
 
 
 
 
 
 
 
79
  } else if ( is_callable( array( $this, "get_column_value_{$column_name}" ) ) ) {
80
  $value = $this->{"get_column_value_{$column_name}"}( $product );
81
  } else {
38
 
39
  public function init() {
40
 
41
+ /**
42
+ * Filter to extend Germanized data added to the WooCommerce product export.
43
+ *
44
+ * @since 1.9.1
45
+ *
46
+ * @param array $export_data Product export data.
47
+ */
48
  $this->columns = apply_filters( 'woocommerce_gzd_product_export_default_columns', array(
49
  'service' => _x( 'Is service?', 'exporter', 'woocommerce-germanized' ),
50
  'differential_taxation' => _x( 'Is differential taxed?', 'exporter', 'woocommerce-germanized' ),
77
  }
78
 
79
  public function export_column( $value, $product ) {
80
+ $filter = current_filter();
81
  $column_name = str_replace( 'woocommerce_product_export_product_column_', '', $filter );
82
 
83
  // Filter for 3rd parties.
84
  if ( has_filter( "woocommerce_gzd_product_export_column_{$column_name}" ) ) {
85
+ /**
86
+ * Filter that allows adjusting product export data for a certain `$column_name`.
87
+ *
88
+ * @since 1.9.1
89
+ *
90
+ * @param string $data Export data.
91
+ * @param WC_Product $product Product object.
92
+ */
93
+ $value = apply_filters( "woocommerce_gzd_product_export_column_{$column_name}", '', $product );
94
  } else if ( is_callable( array( $this, "get_column_value_{$column_name}" ) ) ) {
95
  $value = $this->{"get_column_value_{$column_name}"}( $product );
96
  } else {
includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php CHANGED
@@ -25,6 +25,14 @@ class WC_GZD_Gateway_Direct_Debit extends WC_Payment_Gateway {
25
  */
26
  public function __construct() {
27
  $this->id = 'direct-debit';
 
 
 
 
 
 
 
 
28
  $this->icon = apply_filters( 'woocommerce_gzd_direct_debit_icon', '' );
29
  $this->has_fields = true;
30
  $this->method_title = __( 'Direct Debit', 'woocommerce-germanized' );
@@ -278,11 +286,12 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
278
 
279
  public function export( $args = array() ) {
280
 
281
- if ( $args[ 'content' ] != 'sepa' )
282
  return;
 
283
 
284
  $filename = '';
285
- $parts = array( 'SEPA-Export' );
286
 
287
  $meta_query = array(
288
  array(
@@ -310,18 +319,25 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
310
 
311
  if ( isset( $args['order_id'] ) ) {
312
 
313
- $query_args[ 'p' ] = absint( $args['order_id'] );
314
  array_push( $parts, 'order-' . absint( $args['order_id'] ) );
315
 
316
  } else {
317
 
318
  $query_args = array_merge( $query_args, array(
319
  'showposts' => -1,
 
 
 
 
 
 
 
320
  'post_status' => apply_filters( 'woocommerce_gzd_direct_debit_export_order_statuses', array( 'wc-pending', 'wc-processing', 'wc-on-hold' ) ),
321
  'date_query' => array(
322
  array(
323
- 'after' => $args['start_date'],
324
- 'before' => $args['end_date'],
325
  'inclusive' => true,
326
  ),
327
  ),
@@ -333,15 +349,47 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
333
  array_push( $parts, $args['end_date'] );
334
  }
335
 
 
 
 
 
 
 
 
 
336
  $order_query = new WP_Query( apply_filters( 'woocommerce_gzd_direct_debit_export_query_args', $query_args, $args ) );
337
- $filename = apply_filters( 'woocommerce_germanized_direct_debit_export_filename', implode( '-', $parts ) . '.xml', $args );
 
 
 
 
 
 
 
 
 
338
 
339
  $directDebit = false;
340
 
341
  if ( $order_query->have_posts() ) {
342
 
343
- $msg_id = apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_msg_id', $this->company_account_bic . '00' . date( 'YmdHis', time() ) );
 
 
 
 
 
 
 
344
  $directDebit = Digitick\Sepa\TransferFile\Factory\TransferFileFacadeFactory::createDirectDebit( $msg_id, $this->company_account_holder, $this->pain_format );
 
 
 
 
 
 
 
 
345
  $directDebit = apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter', $directDebit );
346
 
347
  // Group orders by their mandate type to only add one payment per mandate type group.
@@ -369,6 +417,15 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
369
 
370
  $payment_id = 'PMT-ID-' . date( 'YmdHis', time() ) . '-' . strtolower( $mandate_type );
371
 
 
 
 
 
 
 
 
 
 
372
  $directDebit->addPaymentInfo( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_payment_args', array(
373
  'id' => $payment_id,
374
  'creditorName' => $this->company_account_holder,
@@ -380,6 +437,16 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
380
  ), $this, $mandate_type ) );
381
 
382
  foreach( $orders as $order ) {
 
 
 
 
 
 
 
 
 
 
383
  $directDebit->addTransfer( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_transfer_args', array(
384
  'amount' => $order->get_total(),
385
  'debtorIban' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( wc_gzd_get_crud_data( $order, 'direct_debit_iban' ) ) ) ),
@@ -387,6 +454,14 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
387
  'debtorName' => wc_gzd_get_crud_data( $order, 'direct_debit_holder' ),
388
  'debtorMandate' => $this->get_mandate_id( $order ),
389
  'debtorMandateSignDate' => date_i18n( 'Y-m-d', $this->get_mandate_sign_date( $order ) ),
 
 
 
 
 
 
 
 
390
  'remittanceInformation' => apply_filters( 'woocommerce_germanized_direct_debit_purpose', sprintf( __( 'Order %s', 'woocommerce-germanized' ), $order->get_order_number() ), $order ),
391
  ), $this, $order ) );
392
  }
@@ -418,6 +493,14 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
418
  }
419
  }
420
 
 
 
 
 
 
 
 
 
421
  return apply_filters( 'woocommerce_germanized_direct_debit_mandate_id', $id, $order );
422
  }
423
 
@@ -443,8 +526,9 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
443
 
444
  public function email_sepa( $order, $sent_to_admin, $plain_text ) {
445
 
446
- if ( $this->id !== wc_gzd_get_crud_data( $order, 'payment_method' ) )
447
  return;
 
448
 
449
  $sepa_fields = array(
450
  __( 'Account Holder', 'woocommerce-germanized' ) => wc_gzd_get_crud_data( $order, 'direct_debit_holder' ),
@@ -456,31 +540,38 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
456
  $sepa_fields[ __( 'Mandate Reference ID', 'woocommerce-germanized' ) ] = $this->get_mandate_id( $order );
457
  }
458
 
459
- $debit_date = $this->get_debit_date( $order );
460
-
 
 
 
 
 
 
 
 
 
461
  $pre_notification_text = apply_filters( 'woocommerce_gzd_direct_debit_pre_notification_text', sprintf( __( 'We will debit %s from your account by direct debit on or shortly after %s.', 'woocommerce-germanized' ), wc_price( $order->get_total(), array( 'currency' => wc_gzd_get_order_currency( $order ) ) ), date_i18n( wc_date_format(), $debit_date ) ), $order, $debit_date );
462
 
463
  wc_get_template( 'emails/email-sepa-data.php', array(
464
- 'fields' => $sepa_fields,
465
  'send_pre_notification' => ( $this->enable_pre_notification === 'yes' && ! $sent_to_admin ),
466
  'pre_notification_text' => $pre_notification_text,
467
  ) );
468
  }
469
 
470
  public function set_debit_fields( $fields ) {
471
-
472
  global $post;
473
 
474
- if ( ! $post || ! $order = wc_get_order( $post->ID ) )
475
  return $fields;
 
476
 
477
- if ( wc_gzd_get_crud_data( $order, 'payment_method' ) !== $this->id )
478
  return $fields;
479
-
480
-
481
 
482
  return $fields;
483
-
484
  }
485
 
486
  public function send_mail( $order_id ) {
@@ -488,10 +579,11 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
488
  $order = wc_get_order( $order_id );
489
 
490
  if ( wc_gzd_get_crud_data( $order, 'payment_method' ) == $this->id ) {
491
- if ( $mail = WC_germanized()->emails->get_email_instance_by_id( 'customer_sepa_direct_debit_mandate' ) )
 
492
  $mail->trigger( $order );
 
493
  }
494
-
495
  }
496
 
497
  public function clean_whitespaces( $str ) {
@@ -528,7 +620,17 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
528
  $order = wc_gzd_set_crud_meta_data( $order, '_direct_debit_mandate_date', current_time( 'timestamp', true ) );
529
  $order = wc_gzd_set_crud_meta_data( $order, '_direct_debit_mandate_mail', wc_gzd_get_crud_data( $order, 'billing_email' ) );
530
 
531
- // Let compatibility plugins adjust the mandate data
 
 
 
 
 
 
 
 
 
 
532
  do_action( 'woocommerce_gzd_direct_debit_order_data_updated', $order, $user_id, $this );
533
 
534
  if ( $this->supports_encryption() && $this->remember === 'yes' && wc_gzd_get_crud_data( $order, 'user_id' ) && ! empty( $iban ) ) {
@@ -537,6 +639,17 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
537
  update_user_meta( $user_id, 'direct_debit_iban', $iban );
538
  update_user_meta( $user_id, 'direct_debit_bic', $bic );
539
 
 
 
 
 
 
 
 
 
 
 
 
540
  do_action( 'woocommerce_gzd_direct_debit_user_data_updated', $order, $user_id, $this );
541
  }
542
 
@@ -568,6 +681,13 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
568
  'postcode' => wc_clean( isset( $_GET['postcode'] ) ? $_GET['postcode'] : '' ),
569
  'city' => wc_clean( isset( $_GET['city'] ) ? $_GET['city'] : '' ),
570
  'country' => ( isset( $_GET[ 'country' ] ) && isset( WC()->countries->countries[ $_GET['country'] ] ) ? WC()->countries->countries[ $_GET['country'] ] : '' ),
 
 
 
 
 
 
 
571
  'mandate_type_text' => apply_filters( 'woocommerce_gzd_direct_debit_mandate_type_text', __( 'a single payment', 'woocommerce-germanized' ) ),
572
  );
573
 
@@ -590,6 +710,14 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
590
  'country' => WC()->countries->countries[ wc_gzd_get_crud_data( $order, 'billing_country' ) ],
591
  'date' => date_i18n( wc_date_format(), $this->get_mandate_sign_date( $order ) ),
592
  'mandate_id' => $this->get_mandate_id( $order ),
 
 
 
 
 
 
 
 
593
  'mandate_type_text' => apply_filters( 'woocommerce_gzd_direct_debit_mandate_type_order_text', __( 'a single payment', 'woocommerce-germanized' ), $order ),
594
  );
595
 
@@ -597,9 +725,17 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
597
  }
598
 
599
  public function mask( $data ) {
600
- if ( strlen( $data ) <= 4 || $this->get_option( 'mask' ) === 'no' )
601
  return $data;
 
602
 
 
 
 
 
 
 
 
603
  return str_repeat( apply_filters( 'woocommerce_gzd_direct_debit_mask_char', '*' ), strlen( $data ) - 4 ) . substr( $data, -4 );
604
  }
605
 
@@ -638,6 +774,15 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
638
 
639
  public function get_checkbox_label() {
640
  $ajax_url = wp_nonce_url( add_query_arg( array( 'action' => 'show_direct_debit' ), admin_url( 'admin-ajax.php' ) ), 'show_direct_debit' );
 
 
 
 
 
 
 
 
 
641
  return apply_filters( 'woocommerce_gzd_direct_debit_ajax_url', str_replace( array( '{link}', '{/link}' ), array( '<a href="' . $ajax_url . '" id="show-direct-debit-trigger" rel="prettyPhoto">', '</a>' ), $this->checkbox_label ), $this );
642
  }
643
 
@@ -821,31 +966,52 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
821
  }
822
 
823
  $account_data = $this->get_user_account_data();
 
824
 
825
  $fields = array(
826
  'account-holder' => '<p class="form-row form-row-wide">
827
- <label for="' . esc_attr( $this->id ) . '-account-holder">' . __( 'Account Holder', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
828
- <input id="' . esc_attr( $this->id ) . '-account-holder" class="input-text wc-gzd-' . $this->id . '-account-holder" value="' . esc_attr( $account_data[ 'holder' ] ) . '" type="text" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_holder' . '" />
829
  </p>',
830
  'account-iban' => '<p class="form-row form-row-wide">
831
- <label for="' . esc_attr( $this->id ) . '-account-iban">' . __( 'IBAN', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
832
- <input id="' . esc_attr( $this->id ) . '-account-iban" class="input-text wc-gzd-' . $this->id . '-account-iban" type="text" value="' . esc_attr( $account_data[ 'iban' ] ) . '" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_iban' . '" />
833
  </p>',
834
  'account-bic' => '<p class="form-row form-row-wide">
835
- <label for="' . esc_attr( $this->id ) . '-account-bic">' . __( 'BIC/SWIFT', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
836
- <input id="' . esc_attr( $this->id ) . '-account-bic" class="input-text wc-gzd-' . $this->id . '-account-bic" type="text" value="' . esc_attr( $account_data[ 'bic' ] ) . '" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_bic' . '" />
837
  </p>',
838
  );
839
 
840
  ?>
841
- <fieldset id="<?php echo $this->id; ?>-form">
842
- <?php do_action( 'woocommerce_gzd_direct_debit_form_start', $this->id ); ?>
843
  <?php
844
- foreach ( $fields as $field ) {
845
- echo $field;
846
- }
847
- ?>
848
- <?php do_action( 'woocommerce_gzd_direct_debit_form_end', $this->id ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
849
  <div class="clear"></div>
850
  </fieldset>
851
  <?php
@@ -871,9 +1037,20 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
871
  include_once WC_GERMANIZED_ABSPATH . 'includes/libraries/iban/oophp-iban.php';
872
  $iban_validator = new IBAN( $iban );
873
 
 
 
 
 
 
 
 
 
 
 
 
874
  if ( ! $iban_validator->Verify() ) {
875
  wc_add_notice( __( 'Your IBAN seems to be invalid.', 'woocommerce-germanized' ), 'error' );
876
- } elseif ( apply_filters( 'woocommerce_gzd_direct_debit_verify_iban_country', false ) && $iban_validator->Country() != $country ) {
877
  wc_add_notice( __( 'Your IBAN\'s country code doesn’t match with your billing country.', 'woocommerce-germanized' ), 'error' );
878
  }
879
 
@@ -959,7 +1136,13 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
959
  public function process_payment( $order_id ) {
960
  $order = wc_get_order( $order_id );
961
 
962
- // Mark as on-hold (we're awaiting the cheque)
 
 
 
 
 
 
963
  $order->update_status( apply_filters( 'woocommerce_gzd_direct_debit_default_status', 'on-hold' ), __( 'Awaiting Direct Debit Payment', 'woocommerce-germanized' ) );
964
 
965
  // Reduce stock level
@@ -1003,17 +1186,23 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
1003
 
1004
  global $wp_version;
1005
 
1006
- if ( version_compare( phpversion(), '5.4', '<' ) )
1007
  return false;
1008
- if ( ! extension_loaded( 'openssl' ) )
 
 
1009
  return false;
1010
- if ( version_compare( $wp_version, '4.4', '<' ) )
 
 
1011
  return false;
 
1012
 
1013
  require_once WC_GERMANIZED_ABSPATH . 'includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit-encryption-helper.php';
1014
 
1015
- if ( ! WC_GZD_Gateway_Direct_Debit_Encryption_Helper::instance()->is_configured() )
1016
  return false;
 
1017
 
1018
  return true;
1019
  }
25
  */
26
  public function __construct() {
27
  $this->id = 'direct-debit';
28
+
29
+ /**
30
+ * Filter to allow adding an icon to direct debit gateway.
31
+ *
32
+ * @since 1.8.5
33
+ *
34
+ * @param string $icon_url The icon URL.
35
+ */
36
  $this->icon = apply_filters( 'woocommerce_gzd_direct_debit_icon', '' );
37
  $this->has_fields = true;
38
  $this->method_title = __( 'Direct Debit', 'woocommerce-germanized' );
286
 
287
  public function export( $args = array() ) {
288
 
289
+ if ( $args['content'] != 'sepa' ) {
290
  return;
291
+ }
292
 
293
  $filename = '';
294
+ $parts = array( 'SEPA-Export' );
295
 
296
  $meta_query = array(
297
  array(
319
 
320
  if ( isset( $args['order_id'] ) ) {
321
 
322
+ $query_args['p'] = absint( $args['order_id'] );
323
  array_push( $parts, 'order-' . absint( $args['order_id'] ) );
324
 
325
  } else {
326
 
327
  $query_args = array_merge( $query_args, array(
328
  'showposts' => -1,
329
+ /**
330
+ * Filter to adjust direct debit export valid order statuses.
331
+ *
332
+ * @since 1.8.5
333
+ *
334
+ * @param array $order_statuses Valid order statuses to be exported.
335
+ */
336
  'post_status' => apply_filters( 'woocommerce_gzd_direct_debit_export_order_statuses', array( 'wc-pending', 'wc-processing', 'wc-on-hold' ) ),
337
  'date_query' => array(
338
  array(
339
+ 'after' => $args['start_date'],
340
+ 'before' => $args['end_date'],
341
  'inclusive' => true,
342
  ),
343
  ),
349
  array_push( $parts, $args['end_date'] );
350
  }
351
 
352
+ /**
353
+ * Filter to adjust direct debit export arguments passed to `WP_Query`.
354
+ *
355
+ * @since 1.8.5
356
+ *
357
+ * @param array $query_args The query arguments.
358
+ * @param array $args Export arguments.
359
+ */
360
  $order_query = new WP_Query( apply_filters( 'woocommerce_gzd_direct_debit_export_query_args', $query_args, $args ) );
361
+
362
+ /**
363
+ * Filter that allows adjusting the direct debit export filename.
364
+ *
365
+ * @since 1.8.5
366
+ *
367
+ * @param string $filename The filename.
368
+ * @param array $args The export arguments.
369
+ */
370
+ $filename = apply_filters( 'woocommerce_germanized_direct_debit_export_filename', implode( '-', $parts ) . '.xml', $args );
371
 
372
  $directDebit = false;
373
 
374
  if ( $order_query->have_posts() ) {
375
 
376
+ /**
377
+ * Filter to adjust direct debit SEPA XML message id.
378
+ *
379
+ * @since 1.8.5
380
+ *
381
+ * @param string $message_id The message id.
382
+ */
383
+ $msg_id = apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_msg_id', $this->company_account_bic . '00' . date( 'YmdHis', time() ) );
384
  $directDebit = Digitick\Sepa\TransferFile\Factory\TransferFileFacadeFactory::createDirectDebit( $msg_id, $this->company_account_holder, $this->pain_format );
385
+
386
+ /**
387
+ * Filter to adjust the direct debit SEPA XML exporter instance.
388
+ *
389
+ * @since 1.8.5
390
+ *
391
+ * @param Digitick\Sepa\TransferFile\Facade\CustomerDirectDebitFacade $directDebit Exporter instance.
392
+ */
393
  $directDebit = apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter', $directDebit );
394
 
395
  // Group orders by their mandate type to only add one payment per mandate type group.
417
 
418
  $payment_id = 'PMT-ID-' . date( 'YmdHis', time() ) . '-' . strtolower( $mandate_type );
419
 
420
+ /**
421
+ * Filter that allows adjusting direct debit SEPA XML Export payment data.
422
+ *
423
+ * @since 1.8.5
424
+ *
425
+ * @param array $args Payment arguments.
426
+ * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
427
+ * @param string $mandate_type The mandate type.
428
+ */
429
  $directDebit->addPaymentInfo( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_payment_args', array(
430
  'id' => $payment_id,
431
  'creditorName' => $this->company_account_holder,
437
  ), $this, $mandate_type ) );
438
 
439
  foreach( $orders as $order ) {
440
+
441
+ /**
442
+ * Filter that allows adjusting direct debit SEPA XML Export transfer data per order.
443
+ *
444
+ * @since 1.8.5
445
+ *
446
+ * @param array $args Transfer data.
447
+ * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
448
+ * @param WC_Order $order The order object.
449
+ */
450
  $directDebit->addTransfer( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_transfer_args', array(
451
  'amount' => $order->get_total(),
452
  'debtorIban' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( wc_gzd_get_crud_data( $order, 'direct_debit_iban' ) ) ) ),
454
  'debtorName' => wc_gzd_get_crud_data( $order, 'direct_debit_holder' ),
455
  'debtorMandate' => $this->get_mandate_id( $order ),
456
  'debtorMandateSignDate' => date_i18n( 'Y-m-d', $this->get_mandate_sign_date( $order ) ),
457
+ /**
458
+ * Filter that allows adjusting the purpose of a SEPA direct debit.
459
+ *
460
+ * @since 1.8.5
461
+ *
462
+ * @param string $purpose The SEPA purpose.
463
+ * @param WC_Order $order The order object.
464
+ */
465
  'remittanceInformation' => apply_filters( 'woocommerce_germanized_direct_debit_purpose', sprintf( __( 'Order %s', 'woocommerce-germanized' ), $order->get_order_number() ), $order ),
466
  ), $this, $order ) );
467
  }
493
  }
494
  }
495
 
496
+ /**
497
+ * Filter to adjust the direct debit mandate id.
498
+ *
499
+ * @since 1.8.5
500
+ *
501
+ * @param string $id The mandate id.
502
+ * @param bool|WC_Order $order The order if available. `false` otherwise.
503
+ */
504
  return apply_filters( 'woocommerce_germanized_direct_debit_mandate_id', $id, $order );
505
  }
506
 
526
 
527
  public function email_sepa( $order, $sent_to_admin, $plain_text ) {
528
 
529
+ if ( $this->id !== wc_gzd_get_crud_data( $order, 'payment_method' ) ) {
530
  return;
531
+ }
532
 
533
  $sepa_fields = array(
534
  __( 'Account Holder', 'woocommerce-germanized' ) => wc_gzd_get_crud_data( $order, 'direct_debit_holder' ),
540
  $sepa_fields[ __( 'Mandate Reference ID', 'woocommerce-germanized' ) ] = $this->get_mandate_id( $order );
541
  }
542
 
543
+ $debit_date = $this->get_debit_date( $order );
544
+
545
+ /**
546
+ * Filter to adjust the direct debit pre notification text.
547
+ *
548
+ * @since 1.8.5
549
+ *
550
+ * @param string $text The notification text.
551
+ * @param WC_Order $order The order object.
552
+ * @param int $debit_date The debit date as timestamp.
553
+ */
554
  $pre_notification_text = apply_filters( 'woocommerce_gzd_direct_debit_pre_notification_text', sprintf( __( 'We will debit %s from your account by direct debit on or shortly after %s.', 'woocommerce-germanized' ), wc_price( $order->get_total(), array( 'currency' => wc_gzd_get_order_currency( $order ) ) ), date_i18n( wc_date_format(), $debit_date ) ), $order, $debit_date );
555
 
556
  wc_get_template( 'emails/email-sepa-data.php', array(
557
+ 'fields' => $sepa_fields,
558
  'send_pre_notification' => ( $this->enable_pre_notification === 'yes' && ! $sent_to_admin ),
559
  'pre_notification_text' => $pre_notification_text,
560
  ) );
561
  }
562
 
563
  public function set_debit_fields( $fields ) {
 
564
  global $post;
565
 
566
+ if ( ! $post || ! $order = wc_get_order( $post->ID ) ) {
567
  return $fields;
568
+ }
569
 
570
+ if ( wc_gzd_get_crud_data( $order, 'payment_method' ) !== $this->id ) {
571
  return $fields;
572
+ }
 
573
 
574
  return $fields;
 
575
  }
576
 
577
  public function send_mail( $order_id ) {
579
  $order = wc_get_order( $order_id );
580
 
581
  if ( wc_gzd_get_crud_data( $order, 'payment_method' ) == $this->id ) {
582
+
583
+ if ( $mail = WC_germanized()->emails->get_email_instance_by_id( 'customer_sepa_direct_debit_mandate' ) ) {
584
  $mail->trigger( $order );
585
+ }
586
  }
 
587
  }
588
 
589
  public function clean_whitespaces( $str ) {
620
  $order = wc_gzd_set_crud_meta_data( $order, '_direct_debit_mandate_date', current_time( 'timestamp', true ) );
621
  $order = wc_gzd_set_crud_meta_data( $order, '_direct_debit_mandate_mail', wc_gzd_get_crud_data( $order, 'billing_email' ) );
622
 
623
+ /**
624
+ * Updated direct debit order data.
625
+ *
626
+ * Fires after Germanized has updated direct debit data for a specific order.
627
+ *
628
+ * @since 1.9.2
629
+ *
630
+ * @param WC_Order $order The order object.
631
+ * @param int $user_id The user id.
632
+ * @param WC_GZD_Gateway_Direct_Debit $this The gateway instance.
633
+ */
634
  do_action( 'woocommerce_gzd_direct_debit_order_data_updated', $order, $user_id, $this );
635
 
636
  if ( $this->supports_encryption() && $this->remember === 'yes' && wc_gzd_get_crud_data( $order, 'user_id' ) && ! empty( $iban ) ) {
639
  update_user_meta( $user_id, 'direct_debit_iban', $iban );
640
  update_user_meta( $user_id, 'direct_debit_bic', $bic );
641
 
642
+ /**
643
+ * Updated direct debit user data.
644
+ *
645
+ * Fires after Germanized has updated direct debit data for a specific user.
646
+ *
647
+ * @since 1.9.2
648
+ *
649
+ * @param WC_Order $order The order object.
650
+ * @param int $user_id The user id.
651
+ * @param WC_GZD_Gateway_Direct_Debit $this The gateway instance.
652
+ */
653
  do_action( 'woocommerce_gzd_direct_debit_user_data_updated', $order, $user_id, $this );
654
  }
655
 
681
  'postcode' => wc_clean( isset( $_GET['postcode'] ) ? $_GET['postcode'] : '' ),
682
  'city' => wc_clean( isset( $_GET['city'] ) ? $_GET['city'] : '' ),
683
  'country' => ( isset( $_GET[ 'country' ] ) && isset( WC()->countries->countries[ $_GET['country'] ] ) ? WC()->countries->countries[ $_GET['country'] ] : '' ),
684
+ /**
685
+ * Filter to adjust the default mandate type text.
686
+ *
687
+ * @since 1.8.5
688
+ *
689
+ * @param string $text The mandate type text.
690
+ */
691
  'mandate_type_text' => apply_filters( 'woocommerce_gzd_direct_debit_mandate_type_text', __( 'a single payment', 'woocommerce-germanized' ) ),
692
  );
693
 
710
  'country' => WC()->countries->countries[ wc_gzd_get_crud_data( $order, 'billing_country' ) ],
711
  'date' => date_i18n( wc_date_format(), $this->get_mandate_sign_date( $order ) ),
712
  'mandate_id' => $this->get_mandate_id( $order ),
713
+ /**
714
+ * Filter to adjust mandate type text for a certain order.
715
+ *
716
+ * @since 1.8.5
717
+ *
718
+ * @param string $text The mandate type text.
719
+ * @param WC_Order $order The order object.
720
+ */
721
  'mandate_type_text' => apply_filters( 'woocommerce_gzd_direct_debit_mandate_type_order_text', __( 'a single payment', 'woocommerce-germanized' ), $order ),
722
  );
723
 
725
  }
726
 
727
  public function mask( $data ) {
728
+ if ( strlen( $data ) <= 4 || $this->get_option( 'mask' ) === 'no' ) {
729
  return $data;
730
+ }
731
 
732
+ /**
733
+ * Filter to adjust the char replacement for masked direct debit fields.
734
+ *
735
+ * @since 1.8.5
736
+ *
737
+ * @param string $char The char to masked data e.g. `*`.
738
+ */
739
  return str_repeat( apply_filters( 'woocommerce_gzd_direct_debit_mask_char', '*' ), strlen( $data ) - 4 ) . substr( $data, -4 );
740
  }
741
 
774
 
775
  public function get_checkbox_label() {
776
  $ajax_url = wp_nonce_url( add_query_arg( array( 'action' => 'show_direct_debit' ), admin_url( 'admin-ajax.php' ) ), 'show_direct_debit' );
777
+
778
+ /**
779
+ * Filter to adjust the direct debit mandate link.
780
+ *
781
+ * @since 1.8.5
782
+ *
783
+ * @param string $link The link.
784
+ * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
785
+ */
786
  return apply_filters( 'woocommerce_gzd_direct_debit_ajax_url', str_replace( array( '{link}', '{/link}' ), array( '<a href="' . $ajax_url . '" id="show-direct-debit-trigger" rel="prettyPhoto">', '</a>' ), $this->checkbox_label ), $this );
787
  }
788
 
966
  }
967
 
968
  $account_data = $this->get_user_account_data();
969
+ $id = $this->id;
970
 
971
  $fields = array(
972
  'account-holder' => '<p class="form-row form-row-wide">
973
+ <label for="' . esc_attr( $id ) . '-account-holder">' . __( 'Account Holder', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
974
+ <input id="' . esc_attr( $id ) . '-account-holder" class="input-text wc-gzd-' . $id . '-account-holder" value="' . esc_attr( $account_data['holder'] ) . '" type="text" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $id ) . '_account_holder' . '" />
975
  </p>',
976
  'account-iban' => '<p class="form-row form-row-wide">
977
+ <label for="' . esc_attr( $id ) . '-account-iban">' . __( 'IBAN', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
978
+ <input id="' . esc_attr( $id ) . '-account-iban" class="input-text wc-gzd-' . $id . '-account-iban" type="text" value="' . esc_attr( $account_data['iban'] ) . '" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $id ) . '_account_iban' . '" />
979
  </p>',
980
  'account-bic' => '<p class="form-row form-row-wide">
981
+ <label for="' . esc_attr( $id ) . '-account-bic">' . __( 'BIC/SWIFT', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
982
+ <input id="' . esc_attr( $id ) . '-account-bic" class="input-text wc-gzd-' . $id . '-account-bic" type="text" value="' . esc_attr( $account_data['bic'] ) . '" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $id ) . '_account_bic' . '" />
983
  </p>',
984
  );
985
 
986
  ?>
987
+ <fieldset id="<?php echo $id; ?>-form">
 
988
  <?php
989
+ /**
990
+ * Before direct debit checkout form.
991
+ *
992
+ * Fires before the direct debit checkout form is being rendered.
993
+ *
994
+ * @since 1.4.0
995
+ *
996
+ * @param string $id The gateway id.
997
+ */
998
+ do_action( 'woocommerce_gzd_direct_debit_form_start', $id );
999
+
1000
+ foreach ( $fields as $field ) : ?>
1001
+ <?php echo $field; ?>
1002
+ <?php endforeach;
1003
+
1004
+ /**
1005
+ * After direct debit checkout form.
1006
+ *
1007
+ * Fires after the direct debit checkout form is being rendered.
1008
+ *
1009
+ * @since 1.4.0
1010
+ *
1011
+ * @param string $id The gateway id.
1012
+ */
1013
+ do_action( 'woocommerce_gzd_direct_debit_form_end', $id );
1014
+ ?>
1015
  <div class="clear"></div>
1016
  </fieldset>
1017
  <?php
1037
  include_once WC_GERMANIZED_ABSPATH . 'includes/libraries/iban/oophp-iban.php';
1038
  $iban_validator = new IBAN( $iban );
1039
 
1040
+ /**
1041
+ * Filter that allows enabling IBAN country validation.
1042
+ *
1043
+ * By enabling this option the IBAN country must match the billing country.
1044
+ *
1045
+ * @since 1.8.5
1046
+ *
1047
+ * @param bool $enable Whether to enable the check or not.
1048
+ */
1049
+ $verify_iban_country = apply_filters( 'woocommerce_gzd_direct_debit_verify_iban_country', false );
1050
+
1051
  if ( ! $iban_validator->Verify() ) {
1052
  wc_add_notice( __( 'Your IBAN seems to be invalid.', 'woocommerce-germanized' ), 'error' );
1053
+ } elseif ( $verify_iban_country && $iban_validator->Country() != $country ) {
1054
  wc_add_notice( __( 'Your IBAN\'s country code doesn’t match with your billing country.', 'woocommerce-germanized' ), 'error' );
1055
  }
1056
 
1136
  public function process_payment( $order_id ) {
1137
  $order = wc_get_order( $order_id );
1138
 
1139
+ /**
1140
+ * Filter that allows default direct debit gateway order status.
1141
+ *
1142
+ * @since 1.8.5
1143
+ *
1144
+ * @param string $status The default order status.
1145
+ */
1146
  $order->update_status( apply_filters( 'woocommerce_gzd_direct_debit_default_status', 'on-hold' ), __( 'Awaiting Direct Debit Payment', 'woocommerce-germanized' ) );
1147
 
1148
  // Reduce stock level
1186
 
1187
  global $wp_version;
1188
 
1189
+ if ( version_compare( phpversion(), '5.4', '<' ) ) {
1190
  return false;
1191
+ }
1192
+
1193
+ if ( ! extension_loaded( 'openssl' ) ) {
1194
  return false;
1195
+ }
1196
+
1197
+ if ( version_compare( $wp_version, '4.4', '<' ) ) {
1198
  return false;
1199
+ }
1200
 
1201
  require_once WC_GERMANIZED_ABSPATH . 'includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit-encryption-helper.php';
1202
 
1203
+ if ( ! WC_GZD_Gateway_Direct_Debit_Encryption_Helper::instance()->is_configured() ) {
1204
  return false;
1205
+ }
1206
 
1207
  return true;
1208
  }
includes/gateways/invoice/class-wc-gzd-gateway-invoice.php CHANGED
@@ -21,6 +21,14 @@ class WC_GZD_Gateway_Invoice extends WC_Payment_Gateway {
21
  */
22
  public function __construct() {
23
  $this->id = 'invoice';
 
 
 
 
 
 
 
 
24
  $this->icon = apply_filters( 'woocommerce_gzd_invoice_icon', '' );
25
  $this->has_fields = true;
26
  $this->method_title = __( 'Pay by Invoice', 'woocommerce-germanized' );
21
  */
22
  public function __construct() {
23
  $this->id = 'invoice';
24
+
25
+ /**
26
+ * Filter to allow adding an icon to the invoice gateway.
27
+ *
28
+ * @since 1.8.5
29
+ *
30
+ * @param string $icon_url The icon URL.
31
+ */
32
  $this->icon = apply_filters( 'woocommerce_gzd_invoice_icon', '' );
33
  $this->has_fields = true;
34
  $this->method_title = __( 'Pay by Invoice', 'woocommerce-germanized' );
includes/import/class-wc-gzd-product-import.php CHANGED
@@ -48,6 +48,15 @@ class WC_GZD_Product_Import {
48
  }
49
 
50
  public function get_formatting_callbacks() {
 
 
 
 
 
 
 
 
 
51
  return apply_filters( 'woocommerce_gzd_product_import_formatting_callbacks', array(
52
  'mini_desc' => 'wp_filter_post_kses',
53
  'unit_price_regular' => 'wc_format_decimal',
@@ -96,8 +105,16 @@ class WC_GZD_Product_Import {
96
 
97
  $value = $data[ $column_name ];
98
 
99
- // Filter for 3rd parties.
100
  if ( has_filter( "woocommerce_gzd_product_import_column_{$column_name}" ) ) {
 
 
 
 
 
 
 
 
 
101
  $product = apply_filters( "woocommerce_gzd_product_import_column_{$column_name}", $product, $value );
102
  } else if ( is_callable( array( $this, "set_column_value_{$column_name}" ) ) ) {
103
  $product = $this->{"set_column_value_{$column_name}"}( $product, $value );
48
  }
49
 
50
  public function get_formatting_callbacks() {
51
+
52
+ /**
53
+ * Filter that allows adjusting product import formatting callbacks
54
+ * for Germanized product data.
55
+ *
56
+ * @since 1.8.5
57
+ *
58
+ * @param array $callbacks Key => value array containing meta keys and callback functions.
59
+ */
60
  return apply_filters( 'woocommerce_gzd_product_import_formatting_callbacks', array(
61
  'mini_desc' => 'wp_filter_post_kses',
62
  'unit_price_regular' => 'wc_format_decimal',
105
 
106
  $value = $data[ $column_name ];
107
 
 
108
  if ( has_filter( "woocommerce_gzd_product_import_column_{$column_name}" ) ) {
109
+
110
+ /**
111
+ * Filter that allows adjusting product import data for a certain `$column_name`.
112
+ *
113
+ * @since 1.8.5
114
+ *
115
+ * @param WC_Product $product The product object
116
+ * @param mixed $value The import value.
117
+ */
118
  $product = apply_filters( "woocommerce_gzd_product_import_column_{$column_name}", $product, $value );
119
  } else if ( is_callable( array( $this, "set_column_value_{$column_name}" ) ) ) {
120
  $product = $this->{"set_column_value_{$column_name}"}( $product, $value );
includes/trusted-shops/class-wc-gzd-trusted-shops-review-exporter.php CHANGED
@@ -60,7 +60,15 @@ class WC_GZD_Trusted_Shops_Review_Exporter extends WC_CSV_Exporter {
60
  * @return array
61
  */
62
  public function get_default_column_names() {
63
- return apply_filters( "woocommerce_gzd_{$this->export_type}_default_columns", array(
 
 
 
 
 
 
 
 
64
  'id' => _x( 'Order ID', 'trusted-shops', 'woocommerce-germanized' ),
65
  'date' => _x( 'Order date', 'trusted-shops', 'woocommerce-germanized' ),
66
  'days' => _x( '# Days', 'trusted-shops', 'woocommerce-germanized' ),
@@ -128,7 +136,15 @@ class WC_GZD_Trusted_Shops_Review_Exporter extends WC_CSV_Exporter {
128
  );
129
  }
130
 
131
- $order_query = new WP_Query( apply_filters( "woocommerce_gzd_{$this->export_type}_query_args", $args ) );
 
 
 
 
 
 
 
 
132
  $this->total_rows = $order_query->found_posts;
133
  $this->row_data = array();
134
 
@@ -154,6 +170,14 @@ class WC_GZD_Trusted_Shops_Review_Exporter extends WC_CSV_Exporter {
154
  $row[ $column_id ] = $value;
155
  }
156
 
 
 
 
 
 
 
 
 
157
  $this->row_data[] = apply_filters( 'woocommerce_gzd_trusted_shops_review_export_row_data', $row, $order );
158
  }
159
  }
60
  * @return array
61
  */
62
  public function get_default_column_names() {
63
+
64
+ /**
65
+ * Filter to adjust Trusted Shops review CSV exporter column names.
66
+ *
67
+ * @since 2.3.0
68
+ *
69
+ * @param array $columns Key => value pair of columns to be exported.
70
+ */
71
+ return apply_filters( "woocommerce_gzd_trusted_shops_reviews_default_columns", array(
72
  'id' => _x( 'Order ID', 'trusted-shops', 'woocommerce-germanized' ),
73
  'date' => _x( 'Order date', 'trusted-shops', 'woocommerce-germanized' ),
74
  'days' => _x( '# Days', 'trusted-shops', 'woocommerce-germanized' ),
136
  );
137
  }
138
 
139
+ /**
140
+ * Filter that allows adjusting arguments passed to `WP_Query` when exporting
141
+ * orders that should be included within the review export CSV file.
142
+ *
143
+ * @since 2.0.0
144
+ *
145
+ * @param array $args The arguments passed to `WP_Query`.
146
+ */
147
+ $order_query = new WP_Query( apply_filters( "woocommerce_gzd_trusted_shops_reviews_query_args", $args ) );
148
  $this->total_rows = $order_query->found_posts;
149
  $this->row_data = array();
150
 
170
  $row[ $column_id ] = $value;
171
  }
172
 
173
+ /**
174
+ * Filter that allows adjusting Trusted Shops review export data per order.
175
+ *
176
+ * @since 2.0.0
177
+ *
178
+ * @param array $row The row data.
179
+ * @param WC_Order $order The order object.
180
+ */
181
  $this->row_data[] = apply_filters( 'woocommerce_gzd_trusted_shops_review_export_row_data', $row, $order );
182
  }
183
  }
includes/trusted-shops/class-wc-gzd-trusted-shops-schedule.php CHANGED
@@ -171,6 +171,15 @@ class WC_GZD_Trusted_Shops_Schedule {
171
 
172
  $args = array(
173
  'post_type' => 'shop_order',
 
 
 
 
 
 
 
 
 
174
  'post_status' => apply_filters( 'woocommerce_trusted_shops_review_reminder_valid_order_statuses', array( $this->base->review_reminder_status ) ),
175
  'showposts' => -1,
176
  'meta_query' => array(
@@ -195,18 +204,45 @@ class WC_GZD_Trusted_Shops_Schedule {
195
  );
196
  }
197
 
 
 
 
 
 
 
 
 
 
198
  $order_query = new WP_Query( apply_filters( 'woocommerce_trusted_shops_review_reminder_order_args', $args, $lang ) );
199
 
200
  while ( $order_query->have_posts() ) {
201
 
202
  $order_query->next_post();
203
  $order = wc_get_order( $order_query->post->ID );
 
 
 
 
 
 
 
 
 
 
204
  $completed_date = apply_filters( 'woocommerce_trusted_shops_review_reminder_order_completed_date', wc_ts_get_crud_data( $order, 'completed_date' ), $order );
205
  $diff = $this->base->plugin->get_date_diff( $completed_date, date( 'Y-m-d H:i:s' ) );
206
  $min_days = (int) $this->base->review_reminder_days;
207
 
208
  if ( $diff['d'] >= $min_days ) {
209
 
 
 
 
 
 
 
 
 
210
  if ( apply_filters( 'woocommerce_trusted_shops_send_review_reminder_email', true, $order ) ) {
211
  if ( $mail = $this->base->plugin->emails->get_email_instance_by_id( 'customer_trusted_shops' ) ) {
212
  $mail->trigger( wc_ts_get_crud_data( $order, 'id' ) );
171
 
172
  $args = array(
173
  'post_type' => 'shop_order',
174
+ /**
175
+ * Filter that allows adjusting Trusted Shops review reminder order statuses.
176
+ *
177
+ * This filter allows adjusting valid order status to send the review reminder.
178
+ *
179
+ * @since 2.0.0
180
+ *
181
+ * @param array $order_statuses Valid order statuses to send the reminder.
182
+ */
183
  'post_status' => apply_filters( 'woocommerce_trusted_shops_review_reminder_valid_order_statuses', array( $this->base->review_reminder_status ) ),
184
  'showposts' => -1,
185
  'meta_query' => array(
204
  );
205
  }
206
 
207
+ /**
208
+ * Filter that allows adjusting Trusted Shops arguments passed to `WP_Query` to retrieve
209
+ * order objects which are ready to retrieve the review reminder email.
210
+ *
211
+ * @since 2.0.0
212
+ *
213
+ * @param array $args Arguments passed to `WP_Query`.
214
+ * @param string $lang The language to be considered.
215
+ */
216
  $order_query = new WP_Query( apply_filters( 'woocommerce_trusted_shops_review_reminder_order_args', $args, $lang ) );
217
 
218
  while ( $order_query->have_posts() ) {
219
 
220
  $order_query->next_post();
221
  $order = wc_get_order( $order_query->post->ID );
222
+
223
+ /**
224
+ * Filter to adjust the order completed data used to determine whether
225
+ * to send the review reminder or not.
226
+ *
227
+ * @since 2.0.0
228
+ *
229
+ * @param string $order_date The order completed date.
230
+ * @param WC_Order $order The order object.
231
+ */
232
  $completed_date = apply_filters( 'woocommerce_trusted_shops_review_reminder_order_completed_date', wc_ts_get_crud_data( $order, 'completed_date' ), $order );
233
  $diff = $this->base->plugin->get_date_diff( $completed_date, date( 'Y-m-d H:i:s' ) );
234
  $min_days = (int) $this->base->review_reminder_days;
235
 
236
  if ( $diff['d'] >= $min_days ) {
237
 
238
+ /**
239
+ * Filter that allows to disable Trusted Shops review reminder email for a certain order.
240
+ *
241
+ * @since 2.0.0
242
+ *
243
+ * @param bool $send Whether to send the reminder or not.
244
+ * @param WC_Order $order The order object.
245
+ */
246
  if ( apply_filters( 'woocommerce_trusted_shops_send_review_reminder_email', true, $order ) ) {
247
  if ( $mail = $this->base->plugin->emails->get_email_instance_by_id( 'customer_trusted_shops' ) ) {
248
  $mail->trigger( wc_ts_get_crud_data( $order, 'id' ) );
includes/trusted-shops/class-wc-gzd-trusted-shops-template-hooks.php CHANGED
@@ -158,6 +158,15 @@ class WC_GZD_Trusted_Shops_Template_Hooks {
158
  $link = add_query_arg( array( 'lang' => $lang ), $link );
159
  }
160
 
 
 
 
 
 
 
 
 
 
161
  return apply_filters( 'woocommerce_trusted_shops_cancel_review_reminder_link', $link, $code, $order );
162
  }
163
 
158
  $link = add_query_arg( array( 'lang' => $lang ), $link );
159
  }
160
 
161
+ /**
162
+ * Filter that allows adjusting the Trusted Shops cancel review reminder link.
163
+ *
164
+ * @since 2.0.0
165
+ *
166
+ * @param string $link The URL.
167
+ * @param string $code The code to identify the request.
168
+ * @param WC_Order $order The order object.
169
+ */
170
  return apply_filters( 'woocommerce_trusted_shops_cancel_review_reminder_link', $link, $code, $order );
171
  }
172
 
includes/trusted-shops/class-wc-gzd-trusted-shops.php CHANGED
@@ -191,6 +191,14 @@ class WC_GZD_Trusted_Shops {
191
  }
192
 
193
  public function get_multi_language_compatibility() {
 
 
 
 
 
 
 
 
194
  return apply_filters( 'woocommerce_trusted_shops_multi_language_compatibility', $this->plugin->get_compatibility( 'wpml-string-translation' ) );
195
  }
196
 
@@ -623,6 +631,14 @@ class WC_GZD_Trusted_Shops {
623
  if ( $replace ) {
624
  $rating = $this->get_average_rating();
625
 
 
 
 
 
 
 
 
 
626
  $args = apply_filters( 'woocommerce_trusted_shops_rich_snippets_args', wp_parse_args( $args, array(
627
  'average' => $rating['avg'],
628
  'count' => $rating['count'],
191
  }
192
 
193
  public function get_multi_language_compatibility() {
194
+
195
+ /**
196
+ * This filter adjusts how to load the Trusted Shops multi language compatibility if necessary.
197
+ *
198
+ * @since 2.0.0
199
+ *
200
+ * @param WC_GZD_Compatibility_Wpml_String_Translation $instance The string translation helper instance.
201
+ */
202
  return apply_filters( 'woocommerce_trusted_shops_multi_language_compatibility', $this->plugin->get_compatibility( 'wpml-string-translation' ) );
203
  }
204
 
631
  if ( $replace ) {
632
  $rating = $this->get_average_rating();
633
 
634
+ /**
635
+ * Filter to adjust Trusted Shops rich snippets arguments.
636
+ *
637
+ * @since 2.0.0
638
+ *
639
+ * @param array $args The arguments to be passed.
640
+ * @param WC_GZD_Trusted_Shops $instance The Trusted Shops instance.
641
+ */
642
  $args = apply_filters( 'woocommerce_trusted_shops_rich_snippets_args', wp_parse_args( $args, array(
643
  'average' => $rating['avg'],
644
  'count' => $rating['count'],
includes/trusted-shops/widgets/class-wc-gzd-trusted-shops-widget-review-sticker.php CHANGED
@@ -43,7 +43,7 @@ class WC_GZD_Trusted_Shops_Widget_Review_Sticker extends WC_Widget {
43
 
44
  $element = "#ts_review_sticker_{$this->number}";
45
 
46
- $title = apply_filters('widget_title', empty( $instance['title'] ) ? _x( 'Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized' ) : $instance['title'], $instance, $this->id_base );
47
 
48
  echo $before_widget;
49
 
43
 
44
  $element = "#ts_review_sticker_{$this->number}";
45
 
46
+ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? _x( 'Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized' ) : $instance['title'], $instance, $this->id_base );
47
 
48
  echo $before_widget;
49
 
includes/wc-gzd-cart-functions.php CHANGED
@@ -34,8 +34,18 @@ function wc_gzd_cart_product_differential_taxation_mark( $title, $cart_item, $ca
34
  }
35
 
36
  if ( $product ) {
37
- if ( wc_gzd_get_gzd_product( $product )->is_differential_taxed() )
 
 
 
 
 
 
 
 
 
38
  $product_mark = apply_filters( 'woocommerce_gzd_differential_taxation_cart_item_mark', ' **' );
 
39
  }
40
 
41
  if ( ! empty( $product_mark ) )
@@ -250,6 +260,19 @@ function wc_gzd_get_cart_tax_share( $type = 'shipping', $cart_contents = array()
250
  foreach ( $cart as $key => $item ) {
251
 
252
  $_product = apply_filters( 'woocommerce_cart_item_product', $item['data'], $item, $key );
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  $_product_shipping = apply_filters( 'woocommerce_gzd_cart_item_tax_share_product', $_product, $item, $key, $type );
254
  $no_shipping = false;
255
 
@@ -266,6 +289,16 @@ function wc_gzd_get_cart_tax_share( $type = 'shipping', $cart_contents = array()
266
  }
267
  }
268
 
 
 
 
 
 
 
 
 
 
 
269
  if ( apply_filters( 'woocommerce_gzd_cart_item_not_supporting_tax_share', $no_shipping, $item, $key, $type ) ) {
270
  continue;
271
  }
@@ -436,6 +469,13 @@ function wc_gzd_get_legal_text_digital_email_notice() {
436
  }
437
  }
438
 
 
 
 
 
 
 
 
439
  return apply_filters( 'woocommerce_gzd_legal_digital_email_text', $text );
440
  }
441
 
@@ -463,6 +503,13 @@ function wc_gzd_get_legal_text_service_email_notice() {
463
  }
464
  }
465
 
 
 
 
 
 
 
 
466
  return apply_filters( 'woocommerce_gzd_legal_service_email_text', $text );
467
  }
468
 
34
  }
35
 
36
  if ( $product ) {
37
+ if ( wc_gzd_get_gzd_product( $product )->is_differential_taxed() ) {
38
+ /**
39
+ * Differential taxation mark.
40
+ *
41
+ * Adjust the default differential taxation mark.
42
+ *
43
+ * @since 1.9.1
44
+ *
45
+ * @param string $html The differential mark e.g. `*`.
46
+ */
47
  $product_mark = apply_filters( 'woocommerce_gzd_differential_taxation_cart_item_mark', ' **' );
48
+ }
49
  }
50
 
51
  if ( ! empty( $product_mark ) )
260
  foreach ( $cart as $key => $item ) {
261
 
262
  $_product = apply_filters( 'woocommerce_cart_item_product', $item['data'], $item, $key );
263
+
264
+ /**
265
+ * Cart item tax share product.
266
+ *
267
+ * Filters the product containing shipping information for cart item tax share calculation.
268
+ *
269
+ * @since 2.0.2
270
+ *
271
+ * @param WC_Product $_product The product object.
272
+ * @param array $item The cart item.
273
+ * @param string $key The cart item hash.
274
+ * @param string $type The tax calculation type e.g. shipping or fees.
275
+ */
276
  $_product_shipping = apply_filters( 'woocommerce_gzd_cart_item_tax_share_product', $_product, $item, $key, $type );
277
  $no_shipping = false;
278
 
289
  }
290
  }
291
 
292
+ /**
293
+ * Filter whether cart item supports tax share calculation or not.
294
+ *
295
+ * @since 1.7.5
296
+ *
297
+ * @param bool $no_shipping True if supports calculation. False otherwise.
298
+ * @param array $item The cart item.
299
+ * @param string $key The cart item hash.
300
+ * @param string $type The tax calculation type e.g. shipping or fees.
301
+ */
302
  if ( apply_filters( 'woocommerce_gzd_cart_item_not_supporting_tax_share', $no_shipping, $item, $key, $type ) ) {
303
  continue;
304
  }
469
  }
470
  }
471
 
472
+ /**
473
+ * Filter to adjust the legal email text for digital products.
474
+ *
475
+ * @since 2.0.2
476
+ *
477
+ * @param string $text The HTML output.
478
+ */
479
  return apply_filters( 'woocommerce_gzd_legal_digital_email_text', $text );
480
  }
481
 
503
  }
504
  }
505
 
506
+ /**
507
+ * Filter to adjust the legal email text for service products.
508
+ *
509
+ * @since 2.0.2
510
+ *
511
+ * @param string $text The HTML output.
512
+ */
513
  return apply_filters( 'woocommerce_gzd_legal_service_email_text', $text );
514
  }
515
 
includes/wc-gzd-core-functions.php CHANGED
@@ -13,14 +13,42 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
  require WC_GERMANIZED_ABSPATH . 'includes/wc-gzd-product-functions.php';
14
 
15
  function wc_gzd_get_dependencies( $instance = null ) {
 
16
  return apply_filters( 'woocommerce_gzd_dependencies_instance', WC_GZD_Dependencies::instance( $instance ) );
17
  }
18
 
19
  function wc_gzd_send_instant_order_confirmation() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  return ( apply_filters( 'woocommerce_gzd_instant_order_confirmation', true ) && ( 'yes' !== get_option( 'woocommerce_gzd_disable_instant_order_confirmation' ) ) );
21
  }
22
 
23
  function wc_gzd_get_legal_product_notice_types() {
 
 
 
 
 
 
 
 
 
24
  return apply_filters( 'woocommerce_gzd_legal_product_notice_types', array(
25
  'price_unit' => array(
26
  'single' => 'woocommerce_single_product_summary',
@@ -92,10 +120,28 @@ function wc_gzd_get_legal_product_notice_types_by_location( $location = 'loop' )
92
  }
93
  }
94
 
 
 
 
 
 
 
 
 
 
95
  return apply_filters( 'woocommerce_gzd_legal_product_notice_types_location', $location_types, $location );
96
  }
97
 
98
  function wc_gzd_get_legal_cart_notice_types() {
 
 
 
 
 
 
 
 
 
99
  return apply_filters( 'woocommerce_gzd_legal_cart_notice_types', array(
100
  'unit_price' => array(
101
  'cart' => 'woocommerce_cart_item_price',
@@ -145,6 +191,15 @@ function wc_gzd_get_legal_cart_notice_types_by_location( $location = 'cart' ) {
145
  }
146
  }
147
 
 
 
 
 
 
 
 
 
 
148
  return apply_filters( 'woocommerce_gzd_legal_cart_notice_types_location', $location_types, $location );
149
  }
150
 
@@ -191,6 +246,14 @@ function wc_gzd_get_legal_pages( $email_attachable_only = false ) {
191
  $legal_pages = $legal_pages + $secondary_pages;
192
  }
193
 
 
 
 
 
 
 
 
 
194
  return apply_filters( 'woocommerce_gzd_legal_pages', $legal_pages, $email_attachable_only );
195
  }
196
 
@@ -210,6 +273,14 @@ function wc_gzd_get_page_permalink( $type ) {
210
  $page_id = wc_get_page_id( $type );
211
  $link = $page_id ? get_permalink( $page_id ) : '';
212
 
 
 
 
 
 
 
 
 
213
  return apply_filters( 'woocommerce_gzd_legal_page_permalink', $link, $type );
214
  }
215
 
@@ -220,18 +291,34 @@ if ( ! function_exists( 'is_payment_methods' ) ) {
220
  * @return bool
221
  */
222
  function is_payment_methods() {
 
 
 
 
 
 
 
223
  return is_page( wc_get_page_id( 'payment_methods' ) ) || apply_filters( 'woocommerce_gzd_is_payment_methods', false ) ? true : false;
224
  }
225
  }
226
 
227
  function wc_gzd_get_small_business_notice() {
 
 
 
 
 
 
 
 
228
  return apply_filters( 'woocommerce_gzd_small_business_notice', get_option( 'woocommerce_gzd_small_enterprise_text', __( 'Value added tax is not collected, as small businesses according to §19 (1) UStG.', 'woocommerce-germanized' ) ) );
229
  }
230
 
231
  function wc_gzd_help_tip( $tip, $allow_html = false ) {
232
 
233
- if ( function_exists( 'wc_help_tip' ) )
234
  return wc_help_tip( $tip, $allow_html );
 
235
 
236
  return '<a class="tips" data-tip="' . ( $allow_html ? esc_html( $tip ) : $tip ) . '" href="#">[?]</a>';
237
  }
@@ -249,17 +336,19 @@ function wc_gzd_is_parcel_delivery_data_transfer_checkbox_enabled( $rate_ids = a
249
  } else {
250
  $supported = $checkbox->show_shipping_methods ? $checkbox->show_shipping_methods : array();
251
 
252
- if ( ! is_array( $supported ) )
253
  $supported = array();
 
254
 
255
- $return = false;
256
  $rate_is_supported = true;
257
 
258
  if ( ! empty( $rate_ids ) ) {
259
 
260
  foreach ( $rate_ids as $rate_id ) {
261
- if ( ! in_array( $rate_id, $supported ) )
262
  $rate_is_supported = false;
 
263
  }
264
 
265
  if ( $rate_is_supported ) {
@@ -270,6 +359,15 @@ function wc_gzd_is_parcel_delivery_data_transfer_checkbox_enabled( $rate_ids = a
270
  }
271
  }
272
 
 
 
 
 
 
 
 
 
 
273
  return apply_filters( 'woocommerce_gzd_enable_parcel_delivery_data_transfer_checkbox', $return, $rate_ids );
274
  }
275
 
@@ -279,7 +377,17 @@ function wc_gzd_get_dispute_resolution_text() {
279
  }
280
 
281
  function wc_gzd_get_tax_rate_label( $rate_percentage ) {
282
- return ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $rate_percentage ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) );
 
 
 
 
 
 
 
 
 
 
283
  }
284
 
285
  function wc_gzd_get_shipping_costs_text( $product = false ) {
@@ -290,8 +398,25 @@ function wc_gzd_get_shipping_costs_text( $product = false ) {
290
 
291
  if ( $product ) {
292
  $html = $product->has_free_shipping() ? get_option( 'woocommerce_gzd_free_shipping_text' ) : get_option( 'woocommerce_gzd_shipping_costs_text' );
 
 
 
 
 
 
 
 
 
293
  return apply_filters( 'woocommerce_gzd_shipping_costs_text', wc_gzd_replace_label_shortcodes( $html, $replacements ), $product );
294
  } else {
 
 
 
 
 
 
 
 
295
  return apply_filters( 'woocommerce_gzd_shipping_costs_cart_text', wc_gzd_replace_label_shortcodes( get_option( 'woocommerce_gzd_shipping_costs_text' ), $replacements ) );
296
  }
297
  }
@@ -306,10 +431,25 @@ function wc_gzd_convert_coupon_to_voucher( $coupon ) {
306
  }
307
 
308
  function wc_gzd_get_differential_taxation_notice_text() {
 
 
 
 
 
 
 
309
  return apply_filters( 'woocommerce_gzd_differential_taxation_notice_text', get_option( 'woocommerce_gzd_differential_taxation_notice_text' ) );
310
  }
311
 
312
  function wc_gzd_get_privacy_policy_page_id() {
 
 
 
 
 
 
 
 
313
  return apply_filters( 'woocommerce_gzd_privacy_policy_page_id', wc_get_page_id( 'data_security' ) );
314
  }
315
 
@@ -317,10 +457,33 @@ function wc_gzd_get_privacy_policy_url() {
317
  return get_permalink( wc_gzd_get_privacy_policy_page_id() );
318
  }
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  function wc_gzd_get_customer_title( $value ) {
321
  $option = absint( $value );
322
-
323
- $titles = apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) );
324
 
325
  if ( '[deleted]' === $value ) {
326
  return $value;
@@ -532,6 +695,13 @@ add_filter( 'woocommerce_format_price_range', 'woocommmerce_gzd_price_range', 10
532
 
533
  function woocommmerce_gzd_price_range( $price_html, $from, $to ) {
534
 
 
 
 
 
 
 
 
535
  if ( ! apply_filters( 'woocommerce_gzd_adjust_price_range_format', true ) ) {
536
  return $price_html;
537
  }
13
  require WC_GERMANIZED_ABSPATH . 'includes/wc-gzd-product-functions.php';
14
 
15
  function wc_gzd_get_dependencies( $instance = null ) {
16
+ /** This filter is documented in woocommerce-germanized.php */
17
  return apply_filters( 'woocommerce_gzd_dependencies_instance', WC_GZD_Dependencies::instance( $instance ) );
18
  }
19
 
20
  function wc_gzd_send_instant_order_confirmation() {
21
+
22
+ /**
23
+ * Filter to enable/disable instant order confirmation.
24
+ * This filter may be used to disable the instant order confirmation sent by Germanized
25
+ * to the customer right after submitting the order. Warning: You should check with your lawyer
26
+ * before disabling this option.
27
+ *
28
+ * ```php
29
+ * function ex_disable_instant_order_confirmation() {
30
+ * return false;
31
+ * }
32
+ * add_filter( 'woocommerce_gzd_instant_order_confirmation', 'ex_disable_instant_order_confirmation', 10 );
33
+ * ```
34
+ *
35
+ * @since 1.0.0
36
+ *
37
+ * @param bool $enable Set to `false` to disable instant order confirmation.
38
+ */
39
  return ( apply_filters( 'woocommerce_gzd_instant_order_confirmation', true ) && ( 'yes' !== get_option( 'woocommerce_gzd_disable_instant_order_confirmation' ) ) );
40
  }
41
 
42
  function wc_gzd_get_legal_product_notice_types() {
43
+
44
+ /**
45
+ * Filters legal product notice types.
46
+ * May be adjusted to move or adjust hook names for certain Themes.
47
+ *
48
+ * @since 2.2.0
49
+ *
50
+ * @param array $legal_types Array containing notice types and hook names.
51
+ */
52
  return apply_filters( 'woocommerce_gzd_legal_product_notice_types', array(
53
  'price_unit' => array(
54
  'single' => 'woocommerce_single_product_summary',
120
  }
121
  }
122
 
123
+ /**
124
+ * Filters legal product notice type locations containing hooks ready to be executed.
125
+ *
126
+ * @see wc_gzd_get_legal_product_notice_types
127
+ * @since 2.2.0
128
+ *
129
+ * @param array $location_types Array containing notice location types.
130
+ * @param string $location The actual location e.g. loop or single.
131
+ */
132
  return apply_filters( 'woocommerce_gzd_legal_product_notice_types_location', $location_types, $location );
133
  }
134
 
135
  function wc_gzd_get_legal_cart_notice_types() {
136
+
137
+ /**
138
+ * Filters legal cart notice types.
139
+ * May be adjusted to move or adjust hook names for certain Themes.
140
+ *
141
+ * @since 2.2.0
142
+ *
143
+ * @param array $legal_types Array containing notice types and hook names.
144
+ */
145
  return apply_filters( 'woocommerce_gzd_legal_cart_notice_types', array(
146
  'unit_price' => array(
147
  'cart' => 'woocommerce_cart_item_price',
191
  }
192
  }
193
 
194
+ /**
195
+ * Filters legal cart notice type locations containing hooks ready to be executed.
196
+ *
197
+ * @see wc_gzd_get_legal_product_notice_types
198
+ * @since 2.2.0
199
+ *
200
+ * @param array $location_types Array containing notice location types.
201
+ * @param string $location The actual location e.g. cart or checkout.
202
+ */
203
  return apply_filters( 'woocommerce_gzd_legal_cart_notice_types_location', $location_types, $location );
204
  }
205
 
246
  $legal_pages = $legal_pages + $secondary_pages;
247
  }
248
 
249
+ /**
250
+ * Filters pages considered as legal pages.
251
+ *
252
+ * @since 1.0.0
253
+ *
254
+ * @param array $legal_pages Array containing key and title of legal pages.
255
+ * @param bool $email_attachable_only Whether to include those attachable to emails only or not.
256
+ */
257
  return apply_filters( 'woocommerce_gzd_legal_pages', $legal_pages, $email_attachable_only );
258
  }
259
 
273
  $page_id = wc_get_page_id( $type );
274
  $link = $page_id ? get_permalink( $page_id ) : '';
275
 
276
+ /**
277
+ * Filters the page permalink for a certain legal page.
278
+ *
279
+ * @since 1.0.0
280
+ * @see wc_gzd_get_legal_pages
281
+ *
282
+ * @param string $type Legal page identifier e.g. terms.
283
+ */
284
  return apply_filters( 'woocommerce_gzd_legal_page_permalink', $link, $type );
285
  }
286
 
291
  * @return bool
292
  */
293
  function is_payment_methods() {
294
+ /**
295
+ * Filter allowing to manually set whether the current page is the legal payment methods page or not.
296
+ *
297
+ * @since 1.0.0
298
+ *
299
+ * @param bool $is_page Whether current page is the payment_methods page or not.
300
+ */
301
  return is_page( wc_get_page_id( 'payment_methods' ) ) || apply_filters( 'woocommerce_gzd_is_payment_methods', false ) ? true : false;
302
  }
303
  }
304
 
305
  function wc_gzd_get_small_business_notice() {
306
+
307
+ /**
308
+ * Filter the (global) small business notice.
309
+ *
310
+ * @since 1.0.0
311
+ *
312
+ * @param string $html The notice HTML.
313
+ */
314
  return apply_filters( 'woocommerce_gzd_small_business_notice', get_option( 'woocommerce_gzd_small_enterprise_text', __( 'Value added tax is not collected, as small businesses according to §19 (1) UStG.', 'woocommerce-germanized' ) ) );
315
  }
316
 
317
  function wc_gzd_help_tip( $tip, $allow_html = false ) {
318
 
319
+ if ( function_exists( 'wc_help_tip' ) ) {
320
  return wc_help_tip( $tip, $allow_html );
321
+ }
322
 
323
  return '<a class="tips" data-tip="' . ( $allow_html ? esc_html( $tip ) : $tip ) . '" href="#">[?]</a>';
324
  }
336
  } else {
337
  $supported = $checkbox->show_shipping_methods ? $checkbox->show_shipping_methods : array();
338
 
339
+ if ( ! is_array( $supported ) ) {
340
  $supported = array();
341
+ }
342
 
343
+ $return = false;
344
  $rate_is_supported = true;
345
 
346
  if ( ! empty( $rate_ids ) ) {
347
 
348
  foreach ( $rate_ids as $rate_id ) {
349
+ if ( ! in_array( $rate_id, $supported ) ) {
350
  $rate_is_supported = false;
351
+ }
352
  }
353
 
354
  if ( $rate_is_supported ) {
359
  }
360
  }
361
 
362
+ /**
363
+ * Filter that allows adjusting whether to show the parcel delivery data transfer
364
+ * checkbox or not for rate ids.
365
+ *
366
+ * @since 1.9.7
367
+ *
368
+ * @param bool $return Whether to display the checkbox or not.
369
+ * @param array $rate_ids Shipping rate ids to check against.
370
+ */
371
  return apply_filters( 'woocommerce_gzd_enable_parcel_delivery_data_transfer_checkbox', $return, $rate_ids );
372
  }
373
 
377
  }
378
 
379
  function wc_gzd_get_tax_rate_label( $rate_percentage ) {
380
+ $label = ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $rate_percentage ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) );
381
+
382
+ /**
383
+ * Allow adjusting the tax rate label e.g. "incl. 19% tax".
384
+ *
385
+ * @since 2.3.3
386
+ *
387
+ * @param string $label The label.
388
+ * @param int $rate_percentage The percentage e.g. 19.
389
+ */
390
+ return apply_filters( 'woocommerce_gzd_tax_rate_label', $label, $rate_percentage );
391
  }
392
 
393
  function wc_gzd_get_shipping_costs_text( $product = false ) {
398
 
399
  if ( $product ) {
400
  $html = $product->has_free_shipping() ? get_option( 'woocommerce_gzd_free_shipping_text' ) : get_option( 'woocommerce_gzd_shipping_costs_text' );
401
+
402
+ /**
403
+ * Filter to adjust the shipping costs legal text for a certain product.
404
+ *
405
+ * @since 1.8.5
406
+ *
407
+ * @param string $html The notice output.
408
+ * @param WC_GZD_Product $product The product object.
409
+ */
410
  return apply_filters( 'woocommerce_gzd_shipping_costs_text', wc_gzd_replace_label_shortcodes( $html, $replacements ), $product );
411
  } else {
412
+
413
+ /**
414
+ * Filter to adjust the shipping costs legal text during cart, checkout and orders.
415
+ *
416
+ * @since 1.8.5
417
+ *
418
+ * @param string $html The notice output.
419
+ */
420
  return apply_filters( 'woocommerce_gzd_shipping_costs_cart_text', wc_gzd_replace_label_shortcodes( get_option( 'woocommerce_gzd_shipping_costs_text' ), $replacements ) );
421
  }
422
  }
431
  }
432
 
433
  function wc_gzd_get_differential_taxation_notice_text() {
434
+ /**
435
+ * Filter to adjust the differential taxation notice text.
436
+ *
437
+ * @since 1.9.1
438
+ *
439
+ * @param string $html The notice.
440
+ */
441
  return apply_filters( 'woocommerce_gzd_differential_taxation_notice_text', get_option( 'woocommerce_gzd_differential_taxation_notice_text' ) );
442
  }
443
 
444
  function wc_gzd_get_privacy_policy_page_id() {
445
+
446
+ /**
447
+ * Filter to adjust the Germanized privacy page id.
448
+ *
449
+ * @since 1.9.10
450
+ *
451
+ * @param int $page_id The page id.
452
+ */
453
  return apply_filters( 'woocommerce_gzd_privacy_policy_page_id', wc_get_page_id( 'data_security' ) );
454
  }
455
 
457
  return get_permalink( wc_gzd_get_privacy_policy_page_id() );
458
  }
459
 
460
+ function wc_gzd_get_customer_title_options() {
461
+
462
+ /**
463
+ * Filter default customer title options e.g. Mr. or Ms.
464
+ *
465
+ * ```php
466
+ * function ex_adjust_title_options( $titles ) {
467
+ * // Add a extra title option
468
+ * $titles[3] = __( 'Neutral', 'my-text-domain' );
469
+ *
470
+ * return $titles;
471
+ * }
472
+ * add_filter( 'woocommerce_gzd_title_options', 'ex_adjust_title_options', 10, 1 );
473
+ * ```
474
+ *
475
+ * @since 1.0.0
476
+ *
477
+ * @param array $titles Array containing title selection options.
478
+ */
479
+ $titles = apply_filters( 'woocommerce_gzd_title_options', array( 1 => __( 'Mr.', 'woocommerce-germanized' ), 2 => __( 'Ms.', 'woocommerce-germanized' ) ) );
480
+
481
+ return $titles;
482
+ }
483
+
484
  function wc_gzd_get_customer_title( $value ) {
485
  $option = absint( $value );
486
+ $titles = wc_gzd_get_customer_title_options();
 
487
 
488
  if ( '[deleted]' === $value ) {
489
  return $value;
695
 
696
  function woocommmerce_gzd_price_range( $price_html, $from, $to ) {
697
 
698
+ /**
699
+ * Filter to decide whether Germanized should adjust the price range format or not.
700
+ *
701
+ * @since 2.2.6
702
+ *
703
+ * @param bool $adjust Whether to adjust price range format or not.
704
+ */
705
  if ( ! apply_filters( 'woocommerce_gzd_adjust_price_range_format', true ) ) {
706
  return $price_html;
707
  }
includes/wc-gzd-legacy-functions.php CHANGED
@@ -16,10 +16,9 @@ function wc_gzd_get_crud_data( $object, $key, $suppress_suffix = false ) {
16
  $object = $object->get_wc_product();
17
  }
18
 
19
- $value = null;
20
-
21
  $getter = substr( $key, 0, 3 ) === "get" ? $key : "get_$key";
22
- $key = substr( $key, 0, 3 ) === "get" ? substr( $key, 3 ) : $key;
23
 
24
  if ( 'id' === $key && is_callable( array( $object, 'is_type' ) ) && $object->is_type( 'variation' ) && ! wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
25
  $key = 'variation_id';
@@ -30,11 +29,11 @@ function wc_gzd_get_crud_data( $object, $key, $suppress_suffix = false ) {
30
  }
31
 
32
  $getter_mapping = array(
33
- 'parent' => 'get_parent_id',
34
  'completed_date' => 'get_date_completed',
35
- 'order_date' => 'get_date_created',
36
- 'product_type' => 'get_type',
37
- 'order_type' => 'get_type',
38
  );
39
 
40
  if ( array_key_exists( $key, $getter_mapping ) ) {
@@ -42,18 +41,23 @@ function wc_gzd_get_crud_data( $object, $key, $suppress_suffix = false ) {
42
  }
43
 
44
  if ( is_callable( array( $object, $getter ) ) ) {
45
- $reflection = new ReflectionMethod( $object, $getter );
46
- if ( $reflection->isPublic() ) {
47
- $value = $object->{$getter}();
48
- }
49
- } elseif ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
50
- // Prefix meta if suppress_suffix is not set
51
- if ( substr( $key, 0, 1 ) !== '_' && ! $suppress_suffix )
 
 
 
 
52
  $key = '_' . $key;
 
53
 
54
  $value = $object->get_meta( $key );
55
  } else {
56
- $key = substr( $key, 0, 1 ) === "_" ? substr( $key, 1 ) : $key;
57
  $value = $object->{$key};
58
  }
59
 
@@ -68,6 +72,7 @@ function wc_gzd_set_crud_data( $object, $key, $value ) {
68
 
69
  if ( is_callable( array( $object, $setter ) ) ) {
70
  $reflection = new ReflectionMethod( $object, $setter );
 
71
  if ( $reflection->isPublic() ) {
72
  $object->{$setter}( $value );
73
  }
@@ -83,7 +88,7 @@ function wc_gzd_set_crud_data( $object, $key, $value ) {
83
 
84
  function wc_gzd_set_crud_meta_data( $object, $key, $value ) {
85
 
86
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
87
  $object->update_meta_data( $key, $value );
88
  } else {
89
  update_post_meta( wc_gzd_get_crud_data( $object, 'id' ), $key, $value );
@@ -92,7 +97,7 @@ function wc_gzd_set_crud_meta_data( $object, $key, $value ) {
92
  }
93
 
94
  function wc_gzd_unset_crud_meta_data( $object, $key ) {
95
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
96
  $object->delete_meta_data( $key );
97
  } else {
98
  delete_post_meta( wc_gzd_get_crud_data( $object, 'id' ), $key );
@@ -101,10 +106,9 @@ function wc_gzd_unset_crud_meta_data( $object, $key ) {
101
  }
102
 
103
  function wc_gzd_set_crud_term_data( $object, $term, $taxonomy ) {
104
-
105
  $term_data = ( ! is_numeric( $term ) ? sanitize_text_field( $term ) : absint( $term ) );
106
 
107
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
108
  $object->update_meta_data( '_' . $taxonomy, $term );
109
  } else {
110
  wp_set_object_terms( wc_gzd_get_crud_data( $object, 'id' ), $term_data, $taxonomy );
@@ -114,7 +118,7 @@ function wc_gzd_set_crud_term_data( $object, $term, $taxonomy ) {
114
  }
115
 
116
  function wc_gzd_unset_crud_term_data( $object, $taxonomy ) {
117
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
118
  $object->update_meta_data( '_delete_' . $taxonomy, true );
119
  } else {
120
  wp_delete_object_term_relationships( wc_gzd_get_crud_data( $object, 'id' ), $taxonomy );
@@ -123,39 +127,53 @@ function wc_gzd_unset_crud_term_data( $object, $taxonomy ) {
123
  return $object;
124
  }
125
 
 
 
 
 
126
  function wc_gzd_get_variable_visible_children( $product ) {
127
- if ( is_callable( array( $product, 'get_visible_children' ) ) )
128
  return $product->get_visible_children();
 
 
129
  return $product->get_children( true );
130
  }
131
 
132
  function wc_gzd_get_price_including_tax( $product, $args = array() ) {
133
- if ( function_exists( 'wc_get_price_including_tax' ) )
134
  return wc_get_price_including_tax( $product, $args );
135
- return $product->get_price_including_tax( $args[ 'qty' ], $args[ 'price' ] );
 
 
136
  }
137
 
138
  function wc_gzd_get_price_excluding_tax( $product, $args = array() ) {
139
- if ( function_exists( 'wc_get_price_excluding_tax' ) )
140
  return wc_get_price_excluding_tax( $product, $args );
141
- return $product->get_price_excluding_tax( $args[ 'qty' ], $args[ 'price' ] );
 
 
142
  }
143
 
144
  function wc_gzd_get_variation( $parent, $variation ) {
145
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() )
146
  return wc_get_product( $variation );
 
 
147
  return $parent->get_child( $variation );
148
  }
149
 
150
  function wc_gzd_get_order_currency( $order ) {
151
- if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() )
152
  return $order->get_currency();
 
 
153
  return $order->get_order_currency();
154
  }
155
 
156
  function wc_gzd_reduce_order_stock( $order_id ) {
157
  if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && function_exists( 'wc_maybe_reduce_stock_levels' ) ) {
158
- wc_maybe_reduce_stock_levels($order_id);
159
  } else {
160
  $order = wc_get_order( $order_id );
161
  $order->reduce_order_stock();
16
  $object = $object->get_wc_product();
17
  }
18
 
19
+ $value = null;
 
20
  $getter = substr( $key, 0, 3 ) === "get" ? $key : "get_$key";
21
+ $key = substr( $key, 0, 3 ) === "get" ? substr( $key, 3 ) : $key;
22
 
23
  if ( 'id' === $key && is_callable( array( $object, 'is_type' ) ) && $object->is_type( 'variation' ) && ! wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
24
  $key = 'variation_id';
29
  }
30
 
31
  $getter_mapping = array(
32
+ 'parent' => 'get_parent_id',
33
  'completed_date' => 'get_date_completed',
34
+ 'order_date' => 'get_date_created',
35
+ 'product_type' => 'get_type',
36
+ 'order_type' => 'get_type',
37
  );
38
 
39
  if ( array_key_exists( $key, $getter_mapping ) ) {
41
  }
42
 
43
  if ( is_callable( array( $object, $getter ) ) ) {
44
+ try {
45
+ $reflection = new ReflectionMethod( $object, $getter );
46
+
47
+ if ( $reflection->isPublic() ) {
48
+ $value = $object->{$getter}();
49
+ }
50
+ } catch ( Exception $e ) {}
51
+ } elseif ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && is_callable( array( $object, 'get_meta' ) ) ) {
52
+
53
+ // Prefix meta if suppress_suffix is not set
54
+ if ( substr( $key, 0, 1 ) !== '_' && ! $suppress_suffix ) {
55
  $key = '_' . $key;
56
+ }
57
 
58
  $value = $object->get_meta( $key );
59
  } else {
60
+ $key = substr( $key, 0, 1 ) === "_" ? substr( $key, 1 ) : $key;
61
  $value = $object->{$key};
62
  }
63
 
72
 
73
  if ( is_callable( array( $object, $setter ) ) ) {
74
  $reflection = new ReflectionMethod( $object, $setter );
75
+
76
  if ( $reflection->isPublic() ) {
77
  $object->{$setter}( $value );
78
  }
88
 
89
  function wc_gzd_set_crud_meta_data( $object, $key, $value ) {
90
 
91
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && is_callable( array( $object, 'update_meta_data' ) ) ) {
92
  $object->update_meta_data( $key, $value );
93
  } else {
94
  update_post_meta( wc_gzd_get_crud_data( $object, 'id' ), $key, $value );
97
  }
98
 
99
  function wc_gzd_unset_crud_meta_data( $object, $key ) {
100
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && is_callable( array( $object, 'delete_meta_data' ) ) ) {
101
  $object->delete_meta_data( $key );
102
  } else {
103
  delete_post_meta( wc_gzd_get_crud_data( $object, 'id' ), $key );
106
  }
107
 
108
  function wc_gzd_set_crud_term_data( $object, $term, $taxonomy ) {
 
109
  $term_data = ( ! is_numeric( $term ) ? sanitize_text_field( $term ) : absint( $term ) );
110
 
111
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && is_callable( array( $object, 'update_meta_data' ) ) ) {
112
  $object->update_meta_data( '_' . $taxonomy, $term );
113
  } else {
114
  wp_set_object_terms( wc_gzd_get_crud_data( $object, 'id' ), $term_data, $taxonomy );
118
  }
119
 
120
  function wc_gzd_unset_crud_term_data( $object, $taxonomy ) {
121
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && is_callable( array( $object, 'update_meta_data' ) ) ) {
122
  $object->update_meta_data( '_delete_' . $taxonomy, true );
123
  } else {
124
  wp_delete_object_term_relationships( wc_gzd_get_crud_data( $object, 'id' ), $taxonomy );
127
  return $object;
128
  }
129
 
130
+ function wc_gzd_get_order_item_product( $item, $order ) {
131
+ return ( is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ) );
132
+ }
133
+
134
  function wc_gzd_get_variable_visible_children( $product ) {
135
+ if ( is_callable( array( $product, 'get_visible_children' ) ) ) {
136
  return $product->get_visible_children();
137
+ }
138
+
139
  return $product->get_children( true );
140
  }
141
 
142
  function wc_gzd_get_price_including_tax( $product, $args = array() ) {
143
+ if ( function_exists( 'wc_get_price_including_tax' ) ) {
144
  return wc_get_price_including_tax( $product, $args );
145
+ }
146
+
147
+ return $product->get_price_including_tax( $args['qty'], $args['price'] );
148
  }
149
 
150
  function wc_gzd_get_price_excluding_tax( $product, $args = array() ) {
151
+ if ( function_exists( 'wc_get_price_excluding_tax' ) ) {
152
  return wc_get_price_excluding_tax( $product, $args );
153
+ }
154
+
155
+ return $product->get_price_excluding_tax( $args['qty'], $args['price'] );
156
  }
157
 
158
  function wc_gzd_get_variation( $parent, $variation ) {
159
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
160
  return wc_get_product( $variation );
161
+ }
162
+
163
  return $parent->get_child( $variation );
164
  }
165
 
166
  function wc_gzd_get_order_currency( $order ) {
167
+ if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() ) {
168
  return $order->get_currency();
169
+ }
170
+
171
  return $order->get_order_currency();
172
  }
173
 
174
  function wc_gzd_reduce_order_stock( $order_id ) {
175
  if ( wc_gzd_get_dependencies()->woocommerce_version_supports_crud() && function_exists( 'wc_maybe_reduce_stock_levels' ) ) {
176
+ wc_maybe_reduce_stock_levels( $order_id );
177
  } else {
178
  $order = wc_get_order( $order_id );
179
  $order->reduce_order_stock();
includes/wc-gzd-product-functions.php CHANGED
@@ -27,6 +27,10 @@ function wc_gzd_get_gzd_product( $product ) {
27
  return $product;
28
  }
29
 
 
 
 
 
30
  if ( ! isset( $product->gzd_product ) || ! is_object( $product->gzd_product ) ) {
31
  $factory = WC()->product_factory;
32
 
@@ -70,12 +74,28 @@ function wc_gzd_check_price_update( $meta_id, $post_id, $meta_key, $meta_value )
70
  }
71
 
72
  function wc_gzd_get_small_business_product_notice() {
 
 
 
 
 
 
 
 
73
  return apply_filters( 'woocommerce_gzd_small_business_product_notice', wc_gzd_get_small_business_notice() );
74
  }
75
 
76
  function wc_gzd_is_revocation_exempt( $product, $type = 'digital' ) {
77
  if ( 'digital' === $type && ( $checkbox = wc_gzd_get_legal_checkbox( 'download' ) ) ) {
78
 
 
 
 
 
 
 
 
 
79
  $types = apply_filters( 'woocommerce_gzd_digital_product_types', $checkbox->types );
80
 
81
  if ( ! $checkbox->is_enabled() ) {
@@ -221,5 +241,14 @@ function wc_gzd_recalculate_unit_price( $args = array(), $product = false ) {
221
 
222
  $prices['unit'] = wc_format_decimal( ( $args['price'] / $product_base ) * $base, wc_get_price_decimals() );
223
 
 
 
 
 
 
 
 
 
 
224
  return apply_filters( 'woocommerce_gzd_recalculated_unit_prices', $prices, $product, $args );
225
  }
27
  return $product;
28
  }
29
 
30
+ if ( ! $product ) {
31
+ return false;
32
+ }
33
+
34
  if ( ! isset( $product->gzd_product ) || ! is_object( $product->gzd_product ) ) {
35
  $factory = WC()->product_factory;
36
 
74
  }
75
 
76
  function wc_gzd_get_small_business_product_notice() {
77
+
78
+ /**
79
+ * Filter to adjust the small business product notice.
80
+ *
81
+ * @since 1.0.0
82
+ *
83
+ * @param string $html The notice.
84
+ */
85
  return apply_filters( 'woocommerce_gzd_small_business_product_notice', wc_gzd_get_small_business_notice() );
86
  }
87
 
88
  function wc_gzd_is_revocation_exempt( $product, $type = 'digital' ) {
89
  if ( 'digital' === $type && ( $checkbox = wc_gzd_get_legal_checkbox( 'download' ) ) ) {
90
 
91
+ /**
92
+ * Filter to allow adjusting which product types are considered digital types.
93
+ * Digital product types are used to check whether a possible revocation exempt exists or not.
94
+ *
95
+ * @since 1.8.5
96
+ *
97
+ * @param array $types The product types.
98
+ */
99
  $types = apply_filters( 'woocommerce_gzd_digital_product_types', $checkbox->types );
100
 
101
  if ( ! $checkbox->is_enabled() ) {
241
 
242
  $prices['unit'] = wc_format_decimal( ( $args['price'] / $product_base ) * $base, wc_get_price_decimals() );
243
 
244
+ /**
245
+ * Filter to adjust unit price after a recalculation happened.
246
+ *
247
+ * @since 2.3.1
248
+ *
249
+ * @param array $prices The price data.
250
+ * @param WC_GZD_Product $product The product object.
251
+ * @param array $args Additional arguments.
252
+ */
253
  return apply_filters( 'woocommerce_gzd_recalculated_unit_prices', $prices, $product, $args );
254
  }
includes/wc-gzd-template-functions.php CHANGED
@@ -389,8 +389,16 @@ if ( ! function_exists( 'woocommerce_gzd_template_order_pay_now_button' ) ) {
389
  */
390
  function woocommerce_gzd_template_order_pay_now_button( $order_id ) {
391
 
392
- $show = ( isset( $_GET[ 'retry' ] ) && $_GET[ 'retry' ] );
393
-
 
 
 
 
 
 
 
 
394
  if ( apply_filters( 'woocommerce_gzd_show_pay_now_button', $show, $order_id ) ) {
395
  WC_GZD_Checkout::instance()->add_payment_link( $order_id );
396
  }
@@ -445,16 +453,23 @@ if ( ! function_exists( 'woocommerce_gzd_template_checkout_forwarding_fee_notice
445
 
446
  $gateways = WC()->payment_gateways()->get_available_payment_gateways();
447
 
448
- if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) )
449
  return;
 
450
 
451
  $gateway = $gateways[ $key ];
452
 
453
- if ( $gateway->get_option( 'forwarding_fee' ) )
 
 
 
 
 
 
 
454
  echo apply_filters( 'woocommerce_gzd_forwarding_fee_checkout_text', '<tr><td colspan="2">' . sprintf( __( 'Plus %s forwarding fee (charged by the transport agent)', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'forwarding_fee' ) ) ) . '</td></tr>' );
455
-
456
  }
457
-
458
  }
459
 
460
  if ( ! function_exists( 'woocommerce_gzd_template_maybe_hide_delivery_time' ) ) {
@@ -491,23 +506,32 @@ if ( ! function_exists( 'woocommerce_gzd_template_digital_delivery_time_text' )
491
 
492
  function woocommerce_gzd_template_digital_delivery_time_text( $text, $product ) {
493
 
494
- if ( $product->is_downloadable() && get_option( 'woocommerce_gzd_display_digital_delivery_time_text' ) !== '' )
 
 
 
 
 
 
 
 
495
  return apply_filters( 'woocommerce_germanized_digital_delivery_time_text', get_option( 'woocommerce_gzd_display_digital_delivery_time_text' ), $product );
 
496
 
497
  return $text;
498
 
499
  }
500
-
501
  }
502
 
503
  if ( ! function_exists( 'woocommerce_gzd_template_sale_price_label_html' ) ) {
504
 
505
  function woocommerce_gzd_template_sale_price_label_html( $price, $product ) {
506
 
507
- if ( ! is_product() && get_option( 'woocommerce_gzd_display_listings_sale_price_labels' ) === 'no' )
508
  return $price;
509
- elseif ( is_product() && get_option( 'woocommerce_gzd_display_product_detail_sale_price_labels' ) === 'no' )
510
  return $price;
 
511
 
512
  return wc_gzd_get_gzd_product( $product )->add_labels_to_price_html( $price );
513
  }
@@ -539,7 +563,16 @@ if ( ! function_exists( 'woocommerce_gzd_template_differential_taxation_notice_c
539
 
540
  if ( $contains_differentail_taxation ) {
541
 
542
- $mark = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_mark', '** ' );
 
 
 
 
 
 
 
 
 
543
  $notice = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_checkout', $mark . wc_gzd_get_differential_taxation_notice_text() );
544
 
545
  wc_get_template( 'checkout/differential-taxation-notice.php', array( 'notice' => $notice ) );
@@ -578,8 +611,23 @@ if ( ! function_exists( 'woocommerce_gzd_template_mini_cart_taxes' ) ) {
578
  }
579
 
580
  wc_get_template( 'cart/mini-cart-totals.php', array(
581
- 'taxes' => ( apply_filters( 'woocommerce_gzd_show_mini_cart_totals_taxes', true ) ) ? wc_gzd_get_cart_total_taxes( false ) : array(),
582
- 'shipping_costs_info' => ( apply_filters( 'woocommerce_gzd_show_mini_cart_totals_shipping_costs_notice', $show_shipping ) ) ? wc_gzd_get_shipping_costs_text() : '' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
  );
584
  }
585
 
@@ -683,6 +731,13 @@ if ( ! function_exists( 'woocommerce_gzd_template_mini_cart_add_hooks' ) ) {
683
 
684
  function woocommerce_gzd_template_mini_cart_add_hooks() {
685
 
 
 
 
 
 
 
 
686
  if ( apply_filters( 'woocommerce_gzd_disable_mini_cart_item_legal_details', false ) ) {
687
  return;
688
  }
@@ -732,6 +787,16 @@ if ( ! function_exists( 'woocommerce_gzd_template_add_price_html_suffixes' ) ) {
732
  ),
733
  ) );
734
 
 
 
 
 
 
 
 
 
 
 
735
  $args = apply_filters( 'woocommerce_gzd_template_add_price_html_suffixes_args', $args, $location );
736
 
737
  // Re-order tabs by priority.
@@ -773,6 +838,15 @@ if ( ! function_exists( 'woocommerce_gzd_template_add_price_html_suffixes' ) ) {
773
  }
774
  }
775
 
 
 
 
 
 
 
 
 
 
776
  $suffix = apply_filters( 'woocommerce_gzd_template_add_price_html_suffix', $suffix, $args, $location );
777
 
778
  return $price_html . $suffix;
389
  */
390
  function woocommerce_gzd_template_order_pay_now_button( $order_id ) {
391
 
392
+ $show = ( isset( $_GET['retry'] ) && $_GET['retry'] );
393
+
394
+ /**
395
+ * Filter to allow disabling the pay now button.
396
+ *
397
+ * @since 1.0.0
398
+ *
399
+ * @param bool $show Whether to show or hide the button.
400
+ * @param int $order_id The order id.
401
+ */
402
  if ( apply_filters( 'woocommerce_gzd_show_pay_now_button', $show, $order_id ) ) {
403
  WC_GZD_Checkout::instance()->add_payment_link( $order_id );
404
  }
453
 
454
  $gateways = WC()->payment_gateways()->get_available_payment_gateways();
455
 
456
+ if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) ) {
457
  return;
458
+ }
459
 
460
  $gateway = $gateways[ $key ];
461
 
462
+ if ( $gateway->get_option( 'forwarding_fee' ) ) {
463
+ /**
464
+ * Filter to adjust the forwarding fee checkout notice.
465
+ *
466
+ * @since 1.0.0
467
+ *
468
+ * @param string $html The notice.
469
+ */
470
  echo apply_filters( 'woocommerce_gzd_forwarding_fee_checkout_text', '<tr><td colspan="2">' . sprintf( __( 'Plus %s forwarding fee (charged by the transport agent)', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'forwarding_fee' ) ) ) . '</td></tr>' );
471
+ }
472
  }
 
473
  }
474
 
475
  if ( ! function_exists( 'woocommerce_gzd_template_maybe_hide_delivery_time' ) ) {
506
 
507
  function woocommerce_gzd_template_digital_delivery_time_text( $text, $product ) {
508
 
509
+ if ( $product->is_downloadable() && get_option( 'woocommerce_gzd_display_digital_delivery_time_text' ) !== '' ) {
510
+ /**
511
+ * Filter to adjust delivery time text for digital products.
512
+ *
513
+ * @since 1.6.3
514
+ *
515
+ * @param string $html The notice.
516
+ * @param WC_Product $product The product object.
517
+ */
518
  return apply_filters( 'woocommerce_germanized_digital_delivery_time_text', get_option( 'woocommerce_gzd_display_digital_delivery_time_text' ), $product );
519
+ }
520
 
521
  return $text;
522
 
523
  }
 
524
  }
525
 
526
  if ( ! function_exists( 'woocommerce_gzd_template_sale_price_label_html' ) ) {
527
 
528
  function woocommerce_gzd_template_sale_price_label_html( $price, $product ) {
529
 
530
+ if ( ! is_product() && get_option( 'woocommerce_gzd_display_listings_sale_price_labels' ) === 'no' ) {
531
  return $price;
532
+ } elseif ( is_product() && get_option( 'woocommerce_gzd_display_product_detail_sale_price_labels' ) === 'no' ) {
533
  return $price;
534
+ }
535
 
536
  return wc_gzd_get_gzd_product( $product )->add_labels_to_price_html( $price );
537
  }
563
 
564
  if ( $contains_differentail_taxation ) {
565
 
566
+ /** This filter is documented in includes/class-wc-gzd-emails.php */
567
+ $mark = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_mark', '** ' );
568
+
569
+ /**
570
+ * Filter to adjust the differential taxation notice text during checkout.
571
+ *
572
+ * @since 1.9.3
573
+ *
574
+ * @param string $html The notice.
575
+ */
576
  $notice = apply_filters( 'woocommerce_gzd_differential_taxation_notice_text_checkout', $mark . wc_gzd_get_differential_taxation_notice_text() );
577
 
578
  wc_get_template( 'checkout/differential-taxation-notice.php', array( 'notice' => $notice ) );
611
  }
612
 
613
  wc_get_template( 'cart/mini-cart-totals.php', array(
614
+ /**
615
+ * Filter that allows disabling tax notices within mini cart.
616
+ *
617
+ * @since 2.0.2
618
+ *
619
+ * @param bool $enable Whether to enable or not.
620
+ */
621
+ 'taxes' => ( apply_filters( 'woocommerce_gzd_show_mini_cart_totals_taxes', true ) ) ? wc_gzd_get_cart_total_taxes( false ) : array(),
622
+
623
+ /**
624
+ * Filter that allows disabling shipping costs notice within mini cart.
625
+ *
626
+ * @since 2.0.2
627
+ *
628
+ * @param bool $enable Whether to enable or not.
629
+ */
630
+ 'shipping_costs_info' => ( apply_filters( 'woocommerce_gzd_show_mini_cart_totals_shipping_costs_notice', $show_shipping ) ) ? wc_gzd_get_shipping_costs_text() : '' )
631
  );
632
  }
633
 
731
 
732
  function woocommerce_gzd_template_mini_cart_add_hooks() {
733
 
734
+ /**
735
+ * This filter serves to manually disable mini cart item legal details.
736
+ *
737
+ * @since 2.2.11
738
+ *
739
+ * @param bool $disable Whether to disable or not.
740
+ */
741
  if ( apply_filters( 'woocommerce_gzd_disable_mini_cart_item_legal_details', false ) ) {
742
  return;
743
  }
787
  ),
788
  ) );
789
 
790
+ /**
791
+ * In some cases (e.g. product widgets) Germanized has to add legal information
792
+ * as a suffix because no other filters exist. This filter serves to decide which
793
+ * info to append and in which order.
794
+ *
795
+ * @since 2.2.0
796
+ *
797
+ * @param array $args The data to be appended.
798
+ * @param string $location The location e.g. product_widget.
799
+ */
800
  $args = apply_filters( 'woocommerce_gzd_template_add_price_html_suffixes_args', $args, $location );
801
 
802
  // Re-order tabs by priority.
838
  }
839
  }
840
 
841
+ /**
842
+ * Filter that allows adjusting the HTML suffix for product widgets.
843
+ *
844
+ * @since 2.2.0
845
+ *
846
+ * @param string $html The suffix.
847
+ * @param array $args The data which was appended.
848
+ * @param string $location The location.
849
+ */
850
  $suffix = apply_filters( 'woocommerce_gzd_template_add_price_html_suffix', $suffix, $args, $location );
851
 
852
  return $price_html . $suffix;
includes/wc-gzd-template-hooks.php CHANGED
@@ -82,7 +82,23 @@ if ( get_option( 'woocommerce_gzd_small_enterprise' ) === 'yes' ) {
82
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info', wc_gzd_get_hook_priority( 'cart_small_business_info' ) );
83
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', wc_gzd_get_hook_priority( 'checkout_small_business_info' ) );
84
 
85
- // Maybe show Small Business incl. VAT notice for total sums
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  if ( apply_filters( 'woocommerce_gzd_small_business_show_total_vat_notice', false ) ) {
87
  add_filter( 'woocommerce_get_formatted_order_total', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
88
  add_filter( 'woocommerce_cart_totals_order_total_html', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
@@ -192,7 +208,14 @@ if ( get_option( 'woocommerce_gzd_hide_order_success_details' ) == 'yes' ) {
192
  }
193
 
194
  /**
195
- * Remove Woo data privacy notices
 
 
 
 
 
 
 
196
  */
197
  if ( apply_filters( 'woocommerce_gzd_disable_wc_privacy_policy_checkbox', true ) ) {
198
  remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 );
82
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info', wc_gzd_get_hook_priority( 'cart_small_business_info' ) );
83
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', wc_gzd_get_hook_priority( 'checkout_small_business_info' ) );
84
 
85
+ /**
86
+ * Filter to show incl. VAT for small business after order/cart total.
87
+ *
88
+ * This filter serves for shops which want to enable a incl. VAT notice
89
+ * for small businesses. Some institutions (e.g. Händlerbund) state that this is necessary.
90
+ *
91
+ * ```php
92
+ * function ex_enable_small_business_vat_notice() {
93
+ * return true;
94
+ * }
95
+ * add_filter( 'woocommerce_gzd_small_business_show_total_vat_notice', 'ex_enable_small_business_vat_notice', 10 );
96
+ * ```
97
+ *
98
+ * @since 1.8.7
99
+ *
100
+ * @param bool $enable Whether to enable the notice or not.
101
+ */
102
  if ( apply_filters( 'woocommerce_gzd_small_business_show_total_vat_notice', false ) ) {
103
  add_filter( 'woocommerce_get_formatted_order_total', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
104
  add_filter( 'woocommerce_cart_totals_order_total_html', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
208
  }
209
 
210
  /**
211
+ * Filter to turn on Woo default privacy checkbox in checkout.
212
+ *
213
+ * Germanized disables the default WooCommerce privacy checkbox to replace it with it's own
214
+ * data privacy checkbox instead.
215
+ *
216
+ * @since 1.9.10
217
+ *
218
+ * @param bool $enable Set to `false` to re-enable Woo default privacy checkbox.
219
  */
220
  if ( apply_filters( 'woocommerce_gzd_disable_wc_privacy_policy_checkbox', true ) ) {
221
  remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 );
readme.txt CHANGED
@@ -4,8 +4,8 @@ Tags: woocommerce, woocommerce german, woocommerce DE, woocommerce germany, wooc
4
  Requires at least: 3.8
5
  Tested up to: 5.2
6
  WC requires at least: 2.4
7
- WC tested up to: 3.6
8
- Stable tag: 2.3.1
9
  Requires PHP: 5.3
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -181,6 +181,18 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  = 2.3.1 =
185
  * Feature: Added better fee/shipping costs calculation to order tax recalculation
186
  * Feature: Grouped products: Unit price support if all children share the same unit
4
  Requires at least: 3.8
5
  Tested up to: 5.2
6
  WC requires at least: 2.4
7
+ WC tested up to: 3.7
8
+ Stable tag: 2.3.3
9
  Requires PHP: 5.3
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
181
 
182
  == Changelog ==
183
 
184
+ = 2.3.3 =
185
+ * Feature: Option to manually resend paid for order email
186
+ * Feature: WooCommerce 3.7 support
187
+ * Improvement: Better hook documentation
188
+ * Improvement: Moved digital delivery time text option to delivery time settings
189
+ * Improvement: Role based pricing compatibility mini cart support
190
+ * Improvement: White space between percentage and number in tax rate
191
+ * Improvement: Use woocommerce_gzd_customer_registration_redirect filter while redirecting from checkout to myaccount
192
+ * Fix: Prevent error while trying to access parent products
193
+ * Fix: Better legacy method calling support
194
+ * Fix: Zero tax rate shipping tax calculation fallback
195
+
196
  = 2.3.1 =
197
  * Feature: Added better fee/shipping costs calculation to order tax recalculation
198
  * Feature: Grouped products: Unit price support if all children share the same unit
templates/checkboxes/default.php CHANGED
@@ -9,7 +9,19 @@
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
- do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox->get_id()}", $checkbox );
 
 
 
 
 
 
 
 
 
 
 
 
13
  ?>
14
 
15
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" style="<?php echo esc_attr( $checkbox->get_html_style() ); ?>">
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
+
13
+ $checkbox_id = $checkbox->get_id();
14
+
15
+ /**
16
+ * Before render checkbox template.
17
+ *
18
+ * Fires before a checkbox with `$checkbox_id` is rendered.
19
+ *
20
+ * @since 2.0.0
21
+ *
22
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
23
+ */
24
+ do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox_id}", $checkbox );
25
  ?>
26
 
27
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" style="<?php echo esc_attr( $checkbox->get_html_style() ); ?>">
templates/checkout/order-submit.php CHANGED
@@ -22,7 +22,16 @@ if ( ! defined( 'ABSPATH' ) ) {
22
 
23
  <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
24
 
25
- <?php do_action( 'woocommerce_gzd_review_order_before_submit' ); ?>
 
 
 
 
 
 
 
 
 
26
 
27
  <?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); ?>
28
 
22
 
23
  <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
24
 
25
+ <?php
26
+ /**
27
+ * Before review order submit button.
28
+ *
29
+ * This hooks fires right before outputting the order submit button.
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ do_action( 'woocommerce_gzd_review_order_before_submit' );
34
+ ?>
35
 
36
  <?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); ?>
37
 
templates/checkout/review-order-product-table.php CHANGED
@@ -7,9 +7,18 @@
7
  * @version 1.0.0
8
  */
9
 
10
- if ( ! defined( 'ABSPATH' ) )
11
  exit;
 
12
 
 
 
 
 
 
 
 
 
13
  do_action( 'woocommerce_gzd_review_order_before_cart_contents' );
14
 
15
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
7
  * @version 1.0.0
8
  */
9
 
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
+ }
13
 
14
+ /**
15
+ * Before review order product table.
16
+ *
17
+ * Fires before rendering the checkout review order product table.
18
+ * This additional template replaces Woo's default product table within review-order.php.
19
+ *
20
+ * @since 1.0.0
21
+ */
22
  do_action( 'woocommerce_gzd_review_order_before_cart_contents' );
23
 
24
  foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
templates/checkout/terms-sepa.php CHANGED
@@ -10,7 +10,18 @@ if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
 
13
- do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox->get_id()}", $checkbox );
 
 
 
 
 
 
 
 
 
 
 
14
  ?>
15
 
16
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" style="<?php echo esc_attr( $checkbox->get_html_style() ); ?>" data-checkbox="<?php echo esc_attr( $checkbox->get_id() ); ?>">
10
  exit;
11
  }
12
 
13
+ $checkbox_id = $checkbox->get_id();
14
+
15
+ /**
16
+ * Before render checkbox template.
17
+ *
18
+ * Fires before a checkbox with `$checkbox_id` is rendered.
19
+ *
20
+ * @since 2.0.0
21
+ *
22
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
23
+ */
24
+ do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox_id}", $checkbox );
25
  ?>
26
 
27
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" style="<?php echo esc_attr( $checkbox->get_html_style() ); ?>" data-checkbox="<?php echo esc_attr( $checkbox->get_id() ); ?>">
templates/checkout/terms.php CHANGED
@@ -14,21 +14,31 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  if ( ! isset( $gzd_checkbox ) || ! $gzd_checkbox )
15
  return;
16
 
17
- do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox->get_id()}", $checkbox );
 
 
 
 
 
 
 
 
 
 
 
18
  ?>
19
 
20
- <?php if ( apply_filters( 'woocommerce_germanized_checkout_show_terms', true ) ) : ?>
 
 
 
 
 
 
 
 
21
 
22
- <?php
23
- /**
24
- * Terms and conditions hook used to inject content.
25
- *
26
- * @since 3.4.0.
27
- * @hooked wc_privacy_policy_text() Shows custom privacy policy text. Priority 20.
28
- * @hooked wc_terms_and_conditions_page_content() Shows t&c page content. Priority 30.
29
- */
30
- do_action( 'woocommerce_checkout_terms_and_conditions' );
31
- ?>
32
 
33
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" data-checkbox="<?php echo esc_attr( $checkbox->get_id() ); ?>">
34
  <label for="<?php echo esc_attr( $checkbox->get_html_id() ); ?>" class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
14
  if ( ! isset( $gzd_checkbox ) || ! $gzd_checkbox )
15
  return;
16
 
17
+ $checkbox_id = $checkbox->get_id();
18
+
19
+ /**
20
+ * Before render checkbox template.
21
+ *
22
+ * Fires before a checkbox with `$checkbox_id` is rendered.
23
+ *
24
+ * @since 2.0.0
25
+ *
26
+ * @param WC_GZD_Legal_Checkbox $checkbox The checkbox instance.
27
+ */
28
+ do_action( "woocommerce_gzd_before_legal_checkbox_{$checkbox_id}", $checkbox );
29
  ?>
30
 
31
+ <?php
32
+ /**
33
+ * Filter that allows hiding the terms checkbox in checkout.
34
+ *
35
+ * @since 2.0.0
36
+ *
37
+ * @param bool $hide Whether to hide the terms checkbox.
38
+ */
39
+ if ( apply_filters( 'woocommerce_germanized_checkout_show_terms', true ) ) : ?>
40
 
41
+ <?php do_action( 'woocommerce_checkout_terms_and_conditions' ); ?>
 
 
 
 
 
 
 
 
 
42
 
43
  <p class="<?php $checkbox->render_classes( $checkbox->get_html_wrapper_classes() ); ?>" data-checkbox="<?php echo esc_attr( $checkbox->get_id() ); ?>">
44
  <label for="<?php echo esc_attr( $checkbox->get_html_id() ); ?>" class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
templates/emails/email-footer-attachment.php CHANGED
@@ -31,16 +31,22 @@ if ( substr( trim( $content ), 0, 2 ) == '<h' )
31
 
32
  <?php the_content(); ?>
33
 
34
- <?php else :
35
- $apply_content_filters = apply_filters( 'woocommerce_gzd_apply_optional_content_filter_email_attachment', true, $content );
36
- $plain_content = htmlspecialchars_decode( get_post_meta( $post->ID, '_legal_text', true ) );
37
- $content = $apply_content_filters ? apply_filters( 'the_content', $plain_content ) : $plain_content;
 
 
 
 
 
 
 
38
  ?>
39
 
40
  <?php echo $content; ?>
41
 
42
  <?php endif; ?>
43
-
44
  </div>
45
  </div>
46
 
31
 
32
  <?php the_content(); ?>
33
 
34
+ <?php else : ?>
35
+ <?php
36
+ /**
37
+ * Filter that allows disabling the `the_content` filter for optional legal page content.
38
+ *
39
+ * @param bool $enable Enable or disable the `the_content` filter.
40
+ * @param string $content The content.
41
+ */
42
+ $apply_content_filters = apply_filters( 'woocommerce_gzd_apply_optional_content_filter_email_attachment', true, $content );
43
+ $plain_content = htmlspecialchars_decode( get_post_meta( $post->ID, '_legal_text', true ) );
44
+ $content = $apply_content_filters ? apply_filters( 'the_content', $plain_content ) : $plain_content;
45
  ?>
46
 
47
  <?php echo $content; ?>
48
 
49
  <?php endif; ?>
 
50
  </div>
51
  </div>
52
 
templates/forms/revocation-form.php CHANGED
@@ -24,7 +24,16 @@ $fields = WC_GZD_Revocation::get_fields();
24
  <?php endforeach; ?>
25
  <?php endif; ?>
26
 
27
- <?php do_action( 'woocommerce_gzd_after_revocation_form_fields' ); ?>
 
 
 
 
 
 
 
 
 
28
 
29
  <div class="form-row submit-revocation checkout-btn-wrap">
30
  <?php wp_nonce_field( 'woocommerce-revocation' ); ?>
24
  <?php endforeach; ?>
25
  <?php endif; ?>
26
 
27
+ <?php
28
+ /**
29
+ * After revocation form fields.
30
+ *
31
+ * Executes after outputting revocation form fields.
32
+ *
33
+ * @since 1.8.11
34
+ */
35
+ do_action( 'woocommerce_gzd_after_revocation_form_fields' );
36
+ ?>
37
 
38
  <div class="form-row submit-revocation checkout-btn-wrap">
39
  <?php wp_nonce_field( 'woocommerce-revocation' ); ?>
templates/trusted-shops/thankyou.php CHANGED
@@ -24,25 +24,56 @@ $order = wc_get_order( $order_id );
24
  <?php if ( $plugin->is_product_reviews_enabled() ) : ?>
25
  <?php foreach( $order->get_items() as $item_id => $item ) :
26
 
27
- $org_product = $order->get_product_from_item( $item );
28
  $parent_product = $org_product;
29
 
30
- if ( ! $org_product )
31
  continue;
 
32
 
33
  // Currently not supporting reviews for variations
34
- if ( $org_product->is_type( 'variation' ) )
35
- $parent_product = wc_get_product( wc_ts_get_crud_data( $org_product, 'parent' ) );
 
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ?>
38
  <span class="tsCheckoutProductItem">
39
  <span class="tsCheckoutProductUrl"><?php echo get_permalink( wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
40
  <span class="tsCheckoutProductImageUrl"><?php echo $plugin->get_product_image( $org_product ); ?></span>
41
  <span class="tsCheckoutProductName"><?php echo get_the_title( wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
42
  <span class="tsCheckoutProductSKU"><?php echo ( $parent_product->get_sku() ? $parent_product->get_sku() : wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
43
- <span class="tsCheckoutProductGTIN"><?php echo apply_filters( 'woocommerce_gzd_trusted_shops_product_gtin', $plugin->get_product_gtin( $org_product ), $org_product ); ?></span>
44
- <span class="tsCheckoutProductBrand"><?php echo apply_filters( 'woocommerce_gzd_trusted_shops_product_brand', $plugin->get_product_brand( $parent_product ), $parent_product ); ?></span>
45
- <span class="tsCheckoutProductMPN"><?php echo apply_filters( 'woocommerce_gzd_trusted_shops_product_mpn', $plugin->get_product_mpn( $org_product ), $org_product ); ?></span>
46
  </span>
47
  <?php endforeach; ?>
48
  <?php endif; ?>
24
  <?php if ( $plugin->is_product_reviews_enabled() ) : ?>
25
  <?php foreach( $order->get_items() as $item_id => $item ) :
26
 
27
+ $org_product = ( is_callable( array( $item, 'get_product' ) ) ) ? $item->get_product() : $order->get_product_from_item( $item );
28
  $parent_product = $org_product;
29
 
30
+ if ( ! $org_product ) {
31
  continue;
32
+ }
33
 
34
  // Currently not supporting reviews for variations
35
+ if ( $org_product->is_type( 'variation' ) ) {
36
+ $parent_product = wc_get_product( wc_ts_get_crud_data( $org_product, 'parent' ) );
37
+ }
38
 
39
+ /**
40
+ * Filter to adjust Trusted Shops product gtin.
41
+ *
42
+ * @since 2.0.0
43
+ *
44
+ * @param string $gtin The gtin data.
45
+ * @param WC_Product $product The product object.
46
+ */
47
+ $product_gtin = apply_filters( 'woocommerce_gzd_trusted_shops_product_gtin', $plugin->get_product_gtin( $org_product ), $org_product );
48
+
49
+ /**
50
+ * Filter to adjust Trusted Shops product brand.
51
+ *
52
+ * @since 2.0.0
53
+ *
54
+ * @param string $gtin The brand data.
55
+ * @param WC_Product $product The product object.
56
+ */
57
+ $product_brand = apply_filters( 'woocommerce_gzd_trusted_shops_product_brand', $plugin->get_product_brand( $parent_product ), $parent_product );
58
+
59
+ /**
60
+ * Filter to adjust Trusted Shops product mpn.
61
+ *
62
+ * @since 2.0.0
63
+ *
64
+ * @param string $gtin The mpn data.
65
+ * @param WC_Product $product The product object.
66
+ */
67
+ $product_mpn = apply_filters( 'woocommerce_gzd_trusted_shops_product_mpn', $plugin->get_product_mpn( $org_product ), $org_product );
68
  ?>
69
  <span class="tsCheckoutProductItem">
70
  <span class="tsCheckoutProductUrl"><?php echo get_permalink( wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
71
  <span class="tsCheckoutProductImageUrl"><?php echo $plugin->get_product_image( $org_product ); ?></span>
72
  <span class="tsCheckoutProductName"><?php echo get_the_title( wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
73
  <span class="tsCheckoutProductSKU"><?php echo ( $parent_product->get_sku() ? $parent_product->get_sku() : wc_ts_get_crud_data( $parent_product, 'id' ) ); ?></span>
74
+ <span class="tsCheckoutProductGTIN"><?php echo $product_gtin; ?></span>
75
+ <span class="tsCheckoutProductBrand"><?php echo $product_brand; ?></span>
76
+ <span class="tsCheckoutProductMPN"><?php echo $product_mpn; ?></span>
77
  </span>
78
  <?php endforeach; ?>
79
  <?php endif; ?>
woocommerce-germanized.php CHANGED
@@ -3,15 +3,15 @@
3
  * Plugin Name: Germanized for WooCommerce
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Germanized for WooCommerce extends WooCommerce to become a legally compliant store in the german market.
6
- * Version: 2.3.2
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
10
  * Tested up to: 5.2
11
- * WC requires at least: 2.4.0
12
- * WC tested up to: 3.6.0
13
  * Requires at least WooCommerce: 2.4
14
- * Tested up to WooCommerce: 3.6
15
  *
16
  * Text Domain: woocommerce-germanized
17
  * Domain Path: /i18n/languages/
@@ -31,7 +31,7 @@ final class WooCommerce_Germanized {
31
  *
32
  * @var string
33
  */
34
- public $version = '2.3.1';
35
 
36
  /**
37
  * Single instance of WooCommerce Germanized Main Class
@@ -129,13 +129,26 @@ final class WooCommerce_Germanized {
129
 
130
  spl_autoload_register( array( $this, 'autoload' ) );
131
 
 
 
 
 
 
 
 
132
  $dependencies = apply_filters( 'woocommerce_gzd_dependencies_instance', WC_GZD_Dependencies::instance( $this ) );
133
 
134
  if ( ! $dependencies->is_loadable() ) {
135
  return;
136
  }
137
 
138
- // Loaded action
 
 
 
 
 
 
139
  do_action( 'woocommerce_germanized_before_load' );
140
 
141
  $this->includes();
@@ -158,7 +171,13 @@ final class WooCommerce_Germanized {
158
  $this->units = new WC_GZD_Units();
159
  $this->price_labels = new WC_GZD_Price_Labels();
160
 
161
- // Loaded action
 
 
 
 
 
 
162
  do_action( 'woocommerce_germanized_loaded' );
163
 
164
  if ( did_action( 'woocommerce_loaded' ) ) {
@@ -181,7 +200,14 @@ final class WooCommerce_Germanized {
181
  * Init WooCommerceGermanized when WordPress initializes.
182
  */
183
  public function init() {
184
- // Before init action
 
 
 
 
 
 
 
185
  do_action( 'before_woocommerce_germanized_init' );
186
 
187
  $this->load_plugin_textdomain();
@@ -222,7 +248,14 @@ final class WooCommerce_Germanized {
222
 
223
  $this->emails = new WC_GZD_Emails();
224
 
225
- // Init action
 
 
 
 
 
 
 
226
  do_action( 'woocommerce_germanized_init' );
227
  }
228
 
@@ -303,6 +336,19 @@ final class WooCommerce_Germanized {
303
  * @return string
304
  */
305
  public function template_path() {
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  return apply_filters( 'woocommerce_gzd_template_path', 'woocommerce-germanized/' );
307
  }
308
 
@@ -440,6 +486,18 @@ final class WooCommerce_Germanized {
440
  }
441
 
442
  public function setup_compatibility() {
 
 
 
 
 
 
 
 
 
 
 
 
443
  $plugins = apply_filters( 'woocommerce_gzd_compatibilities',
444
  array(
445
  'wpml',
@@ -507,15 +565,42 @@ final class WooCommerce_Germanized {
507
  trailingslashit( $template_path ) . $template_name,
508
  ) );
509
 
 
 
 
 
 
 
 
510
  $template_name = apply_filters( 'woocommerce_gzd_template_name', $template_name );
511
 
512
- // Load Default
513
  if ( ! $theme_template && file_exists( apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name ) ) ) {
514
- $template = apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name );
 
 
 
 
 
 
 
 
 
515
  } elseif ( $theme_template ) {
516
  $template = $theme_template;
517
  }
518
 
 
 
 
 
 
 
 
 
 
 
 
519
  return apply_filters( 'woocommerce_germanized_filter_template', $template, $template_name, $template_path );
520
  }
521
 
@@ -525,6 +610,13 @@ final class WooCommerce_Germanized {
525
  * @return array
526
  */
527
  public function get_critical_templates() {
 
 
 
 
 
 
 
528
  return apply_filters( 'woocommerce_gzd_important_templates', array() );
529
  }
530
 
@@ -710,6 +802,18 @@ final class WooCommerce_Germanized {
710
  wp_register_style( 'woocommerce-gzd-layout', $assets_path . 'css/woocommerce-gzd-layout' . $suffix . '.css', array(), WC_GERMANIZED_VERSION );
711
  wp_enqueue_style( 'woocommerce-gzd-layout' );
712
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  do_action( 'woocommerce_gzd_registered_scripts', $suffix, $frontend_script_path, $assets_path );
714
  }
715
 
@@ -739,6 +843,13 @@ final class WooCommerce_Germanized {
739
 
740
  $this->localized_scripts[] = 'wc-gzd-revocation';
741
 
 
 
 
 
 
 
 
742
  wp_localize_script( 'wc-gzd-revocation', 'wc_gzd_revocation_params', apply_filters( 'wc_gzd_revocation_params', array(
743
  'ajax_url' => WC()->ajax_url(),
744
  'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
@@ -750,6 +861,13 @@ final class WooCommerce_Germanized {
750
 
751
  $this->localized_scripts[] = 'wc-gzd-add-to-cart-variation';
752
 
 
 
 
 
 
 
 
753
  wp_localize_script( 'wc-gzd-add-to-cart-variation', 'wc_gzd_add_to_cart_variation_params', apply_filters( 'woocommerce_gzd_add_to_cart_variation_params', array(
754
  'wrapper' => '.type-product',
755
  'price_selector' => '.price',
@@ -763,6 +881,13 @@ final class WooCommerce_Germanized {
763
 
764
  $this->localized_scripts[] = 'wc-gzd-force-pay-order';
765
 
 
 
 
 
 
 
 
766
  wp_localize_script( 'wc-gzd-force-pay-order', 'wc_gzd_force_pay_order_params', apply_filters( 'wc_gzd_force_pay_order_params', array(
767
  'order_id' => $order_id,
768
  'gateway' => wc_gzd_get_crud_data( $order, 'payment_method' ),
@@ -781,6 +906,13 @@ final class WooCommerce_Germanized {
781
  $hide_input = $checkbox->hide_input();
782
  }
783
 
 
 
 
 
 
 
 
784
  wp_localize_script( 'wc-gzd-checkout', 'wc_gzd_checkout_params', apply_filters( 'wc_gzd_checkout_params', array(
785
  'adjust_heading' => true,
786
  'checkbox_id' => $html_id,
@@ -788,6 +920,15 @@ final class WooCommerce_Germanized {
788
  ) ) );
789
  }
790
 
 
 
 
 
 
 
 
 
 
791
  do_action( 'woocommerce_gzd_localized_scripts', $assets_path );
792
  }
793
 
@@ -868,6 +1009,15 @@ final class WooCommerce_Germanized {
868
  $core_file = $this->plugin_path() . '/templates/' . $template;
869
  }
870
 
 
 
 
 
 
 
 
 
 
871
  return apply_filters( 'woocommerce_germanized_email_template_hook', $core_file, $template, $template_base );
872
  }
873
 
@@ -900,6 +1050,7 @@ final class WooCommerce_Germanized {
900
  if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) && 'incl' == get_option( 'woocommerce_tax_display_cart' ) ) {
901
 
902
  $tax_array = array();
 
903
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
904
 
905
  foreach ( $order->get_tax_totals() as $code => $tax ) {
@@ -908,8 +1059,8 @@ final class WooCommerce_Germanized {
908
 
909
  if ( ! isset( $tax_array[ $tax->rate ] ) ) {
910
  $tax_array[ $tax->rate ] = array(
911
- 'tax' => $tax,
912
- 'amount' => $tax->amount,
913
  'contains' => array( $tax ),
914
  );
915
  } else {
@@ -919,32 +1070,31 @@ final class WooCommerce_Germanized {
919
  }
920
  } else {
921
 
922
- $base_rate = WC_Tax::get_shop_base_rate();
923
 
924
- $rate = reset($base_rate);
925
  $rate_id = key($base_rate);
926
 
927
  $base_rate = (object) $rate;
928
- $base_rate->rate = $base_rate->rate;
929
  $base_rate->rate_id = $rate_id;
930
 
931
  $tax_array[] = array(
932
- 'tax' => $base_rate,
933
  'contains' => array( $base_rate ),
934
- 'amount' => $order->get_total_tax(),
935
  );
936
  }
937
 
938
  if ( ! empty( $tax_array ) ) {
939
  foreach ( $tax_array as $tax ) {
940
 
941
- $order_totals[ 'tax_' . WC_Tax::get_rate_code( $tax['tax']->rate_id ) ] = array(
942
- 'label' => ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), wc_gzd_format_tax_rate_percentage( $tax['tax']->rate ) ) : __( 'incl. VAT', 'woocommerce-germanized' ) ),
943
  'value' => wc_price( $tax['amount'] ),
944
  );
945
  }
946
  }
947
- }// End if().
948
 
949
  return $order_totals;
950
  }
3
  * Plugin Name: Germanized for WooCommerce
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Germanized for WooCommerce extends WooCommerce to become a legally compliant store in the german market.
6
+ * Version: 2.3.3
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
10
  * Tested up to: 5.2
11
+ * WC requires at least: 2.4
12
+ * WC tested up to: 3.7
13
  * Requires at least WooCommerce: 2.4
14
+ * Tested up to WooCommerce: 3.7
15
  *
16
  * Text Domain: woocommerce-germanized
17
  * Domain Path: /i18n/languages/
31
  *
32
  * @var string
33
  */
34
+ public $version = '2.3.3';
35
 
36
  /**
37
  * Single instance of WooCommerce Germanized Main Class
129
 
130
  spl_autoload_register( array( $this, 'autoload' ) );
131
 
132
+ /**
133
+ * Filter the Germanized dependency manager instance.
134
+ *
135
+ * @since 1.0.0
136
+ *
137
+ * @param WC_GZD_Dependencies $dependency The dependency manager instance.
138
+ */
139
  $dependencies = apply_filters( 'woocommerce_gzd_dependencies_instance', WC_GZD_Dependencies::instance( $this ) );
140
 
141
  if ( ! $dependencies->is_loadable() ) {
142
  return;
143
  }
144
 
145
+ /**
146
+ * Before startup.
147
+ *
148
+ * This hook fires right before Germanized includes relevant files for startup.
149
+ *
150
+ * @since 1.0.0
151
+ */
152
  do_action( 'woocommerce_germanized_before_load' );
153
 
154
  $this->includes();
171
  $this->units = new WC_GZD_Units();
172
  $this->price_labels = new WC_GZD_Price_Labels();
173
 
174
+ /**
175
+ * After startup.
176
+ *
177
+ * This hook fires right after all relevant files for Germanized has been loaded.
178
+ *
179
+ * @since 1.0.0
180
+ */
181
  do_action( 'woocommerce_germanized_loaded' );
182
 
183
  if ( did_action( 'woocommerce_loaded' ) ) {
200
  * Init WooCommerceGermanized when WordPress initializes.
201
  */
202
  public function init() {
203
+
204
+ /**
205
+ * Initialize Germanized
206
+ *
207
+ * This hook fires as soon as Germanized initializes.
208
+ *
209
+ * @since 1.0.0
210
+ */
211
  do_action( 'before_woocommerce_germanized_init' );
212
 
213
  $this->load_plugin_textdomain();
248
 
249
  $this->emails = new WC_GZD_Emails();
250
 
251
+ /**
252
+ * Initialized Germanized
253
+ *
254
+ * This hook fires after Germanized has been initialized e.g. textdomain has been loaded and relevant
255
+ * have been placed.
256
+ *
257
+ * @since 1.0.0
258
+ */
259
  do_action( 'woocommerce_germanized_init' );
260
  }
261
 
336
  * @return string
337
  */
338
  public function template_path() {
339
+ /**
340
+ * Filter the default Germanized template path folder.
341
+ *
342
+ * ```php
343
+ * function ex_filter_template_path( $path ) {
344
+ * return 'woocommerce-germanized-test/';
345
+ * }
346
+ * add_filter( 'woocommerce_gzd_template_path', 'ex_filter_template_path', 10, 1 );
347
+ *
348
+ * @since 1.0.0
349
+ *
350
+ * @param string $path The relative path within your theme directory.
351
+ */
352
  return apply_filters( 'woocommerce_gzd_template_path', 'woocommerce-germanized/' );
353
  }
354
 
486
  }
487
 
488
  public function setup_compatibility() {
489
+
490
+ /**
491
+ * Filter compatibility classes.
492
+ *
493
+ * This filter allows third party developers to register compatibility scripts
494
+ * for certain plugins or themes. Class prefix: `WC_GZD_Compatibility_` is expected.
495
+ * Make sure to include your class accordingly.
496
+ *
497
+ * @since 1.9.1
498
+ *
499
+ * @param array[string] $comp Array containing the compatibilities.
500
+ */
501
  $plugins = apply_filters( 'woocommerce_gzd_compatibilities',
502
  array(
503
  'wpml',
565
  trailingslashit( $template_path ) . $template_name,
566
  ) );
567
 
568
+ /**
569
+ * Filters the template name.
570
+ *
571
+ * @since 1.0.0
572
+ *
573
+ * @param string $template_name The template name e.g. checkboxes/default.php
574
+ */
575
  $template_name = apply_filters( 'woocommerce_gzd_template_name', $template_name );
576
 
577
+ /** This filter is documented in woocommerce-germanized.php */
578
  if ( ! $theme_template && file_exists( apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name ) ) ) {
579
+ /**
580
+ * Filter the default plugin template file.
581
+ *
582
+ * This file is being loaded as a default template if no theme template was found.
583
+ *
584
+ * @since 1.0.0
585
+ *
586
+ * @params string $path The absolute path to the template.
587
+ */
588
+ $template = apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name );
589
  } elseif ( $theme_template ) {
590
  $template = $theme_template;
591
  }
592
 
593
+ /**
594
+ * Filters the actual loaded template.
595
+ *
596
+ * This filter allows filtering the located template path (whether theme or plugin).
597
+ *
598
+ * @since 1.0.0
599
+ *
600
+ * @params string $template The path to the template.
601
+ * @params string $template_name The template name e.g. checkboxes/default.php.
602
+ * @params string $template_path Germanized template path.
603
+ */
604
  return apply_filters( 'woocommerce_germanized_filter_template', $template, $template_name, $template_path );
605
  }
606
 
610
  * @return array
611
  */
612
  public function get_critical_templates() {
613
+ /**
614
+ * Filters critical template which should be prevented from overriding.
615
+ *
616
+ * @since 1.0.0
617
+ *
618
+ * @param array $templates Array containing the template names.
619
+ */
620
  return apply_filters( 'woocommerce_gzd_important_templates', array() );
621
  }
622
 
802
  wp_register_style( 'woocommerce-gzd-layout', $assets_path . 'css/woocommerce-gzd-layout' . $suffix . '.css', array(), WC_GERMANIZED_VERSION );
803
  wp_enqueue_style( 'woocommerce-gzd-layout' );
804
 
805
+ /**
806
+ * Register frontend scripts and styles.
807
+ *
808
+ * This hook executes right after Germanized has registered and enqueued relevant scripts and styles for the
809
+ * frontend.
810
+ *
811
+ * @since 1.0.0
812
+ *
813
+ * @param string $suffix The asset suffix e.g. .min in non-debugging mode.
814
+ * @param string $frontend_script_path The absolute URL to the plugins JS files.
815
+ * @param string $assets_path The absolute URL to the plugins asset files.
816
+ */
817
  do_action( 'woocommerce_gzd_registered_scripts', $suffix, $frontend_script_path, $assets_path );
818
  }
819
 
843
 
844
  $this->localized_scripts[] = 'wc-gzd-revocation';
845
 
846
+ /**
847
+ * Filters script localization paramaters for the `wc-gzd-revocation` script.
848
+ *
849
+ * @since 1.0.0
850
+ *
851
+ * @param array $params Key => value array containing parameter name and value.
852
+ */
853
  wp_localize_script( 'wc-gzd-revocation', 'wc_gzd_revocation_params', apply_filters( 'wc_gzd_revocation_params', array(
854
  'ajax_url' => WC()->ajax_url(),
855
  'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
861
 
862
  $this->localized_scripts[] = 'wc-gzd-add-to-cart-variation';
863
 
864
+ /**
865
+ * Filters script localization paramaters for the `wc-gzd-add-to-cart-variation` script.
866
+ *
867
+ * @since 1.0.0
868
+ *
869
+ * @param array $params Key => value array containing parameter name and value.
870
+ */
871
  wp_localize_script( 'wc-gzd-add-to-cart-variation', 'wc_gzd_add_to_cart_variation_params', apply_filters( 'woocommerce_gzd_add_to_cart_variation_params', array(
872
  'wrapper' => '.type-product',
873
  'price_selector' => '.price',
881
 
882
  $this->localized_scripts[] = 'wc-gzd-force-pay-order';
883
 
884
+ /**
885
+ * Filters script localization paramaters for the `wc-gzd-force-pay-order` script.
886
+ *
887
+ * @since 1.0.0
888
+ *
889
+ * @param array $params Key => value array containing parameter name and value.
890
+ */
891
  wp_localize_script( 'wc-gzd-force-pay-order', 'wc_gzd_force_pay_order_params', apply_filters( 'wc_gzd_force_pay_order_params', array(
892
  'order_id' => $order_id,
893
  'gateway' => wc_gzd_get_crud_data( $order, 'payment_method' ),
906
  $hide_input = $checkbox->hide_input();
907
  }
908
 
909
+ /**
910
+ * Filters script localization paramaters for the `wc-gzd-checkout` script.
911
+ *
912
+ * @since 1.0.0
913
+ *
914
+ * @param array $params Key => value array containing parameter name and value.
915
+ */
916
  wp_localize_script( 'wc-gzd-checkout', 'wc_gzd_checkout_params', apply_filters( 'wc_gzd_checkout_params', array(
917
  'adjust_heading' => true,
918
  'checkbox_id' => $html_id,
920
  ) ) );
921
  }
922
 
923
+ /**
924
+ * Localized scripts.
925
+ *
926
+ * This hook fires after Germanized has localized it's scripts.
927
+ *
928
+ * @since 1.0.0
929
+ *
930
+ * @param string $assets_path The absolute URL to the plugins assets.
931
+ */
932
  do_action( 'woocommerce_gzd_localized_scripts', $assets_path );
933
  }
934
 
1009
  $core_file = $this->plugin_path() . '/templates/' . $template;
1010
  }
1011
 
1012
+ /**
1013
+ * Filters email templates.
1014
+ *
1015
+ * @since 1.0.0
1016
+ *
1017
+ * @param string $core_file The core template file.
1018
+ * @param string $template The template name.
1019
+ * @param string $template_base The template base folder.
1020
+ */
1021
  return apply_filters( 'woocommerce_germanized_email_template_hook', $core_file, $template, $template_base );
1022
  }
1023
 
1050
  if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) && 'incl' == get_option( 'woocommerce_tax_display_cart' ) ) {
1051
 
1052
  $tax_array = array();
1053
+
1054
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
1055
 
1056
  foreach ( $order->get_tax_totals() as $code => $tax ) {
1059
 
1060
  if ( ! isset( $tax_array[ $tax->rate ] ) ) {
1061
  $tax_array[ $tax->rate ] = array(
1062
+ 'tax' => $tax,
1063
+ 'amount' => $tax->amount,
1064
  'contains' => array( $tax ),
1065
  );
1066
  } else {
1070
  }
1071
  } else {
1072
 
1073
+ $base_rate = ( is_callable( array( 'WC_Tax', 'get_base_tax_rates' ) ) ? WC_Tax::get_base_tax_rates() : WC_Tax::get_shop_base_rate() );
1074
 
1075
+ $rate = reset($base_rate);
1076
  $rate_id = key($base_rate);
1077
 
1078
  $base_rate = (object) $rate;
 
1079
  $base_rate->rate_id = $rate_id;
1080
 
1081
  $tax_array[] = array(
1082
+ 'tax' => $base_rate,
1083
  'contains' => array( $base_rate ),
1084
+ 'amount' => $order->get_total_tax(),
1085
  );
1086
  }
1087
 
1088
  if ( ! empty( $tax_array ) ) {
1089
  foreach ( $tax_array as $tax ) {
1090
 
1091
+ $order_totals['tax_' . WC_Tax::get_rate_code( $tax['tax']->rate_id ) ] = array(
1092
+ 'label' => wc_gzd_get_tax_rate_label( $tax['tax']->rate ),
1093
  'value' => wc_price( $tax['amount'] ),
1094
  );
1095
  }
1096
  }
1097
+ }
1098
 
1099
  return $order_totals;
1100
  }