WooCommerce Germanized - Version 1.1.1

Version Description

  • Feature - Optionally choose to hide the edit order button on checkout
  • Fix - Crucial bug which led to blank screens after upgrading to 1.1.0
  • Fix - Even better third party compatibility
  • Fix - Small business notification legal text update
Download this release

Release Info

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

Code changes from version 1.1.0 to 1.1.1

i18n/languages/woocommerce-germanized-de_DE.mo CHANGED
Binary file
i18n/languages/woocommerce-germanized-de_DE.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WooCommerce Germanized v1.0.5\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-09-29 12:26+0100\n"
6
- "PO-Revision-Date: 2015-01-24 16:31:30+0000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -75,19 +75,6 @@ msgstr "ml"
75
  msgid "l"
76
  msgstr "l"
77
 
78
- #: includes/abstracts/abstract-wc-gzd-product.php:91
79
- #: woocommerce-germanized.php:741
80
- #, php-format
81
- #@ woocommerce-germanized
82
- msgid "incl. %s VAT"
83
- msgstr "inkl. %s MwSt."
84
-
85
- #: includes/abstracts/abstract-wc-gzd-product.php:91
86
- #, php-format
87
- #@ woocommerce-germanized
88
- msgid "excl. %s VAT"
89
- msgstr "exkl. %s MwSt."
90
-
91
  #: includes/admin/class-wc-gzd-admin-welcome.php:53
92
  #@ woocommerce-germanized
93
  msgid "About WooCommerce Germanized"
@@ -105,8 +92,8 @@ msgstr "zu den WooCommerce Germanized Einstellungen"
105
 
106
  #: includes/admin/class-wc-gzd-admin.php:28
107
  #: includes/admin/class-wc-gzd-admin.php:37
108
- #: includes/class-wc-gzd-checkout.php:23
109
- #: includes/class-wc-gzd-checkout.php:32
110
  #: woocommerce-germanized.php:83
111
  #: woocommerce-germanized.php:92
112
  #@ woocommerce-germanized
@@ -510,67 +497,67 @@ msgstr "MwSt. Hinweis"
510
  msgid "Checkout & Cart"
511
  msgstr "Checkout & Warenkorb"
512
 
513
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:468
514
  #@ woocommerce-germanized
515
  msgid "Checkout Legal Display"
516
  msgstr "Checkbox oder Text"
517
 
518
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:469
519
  #@ woocommerce-germanized
520
  msgid "Use Text without Checkbox"
521
  msgstr "Rechtshinweis ohne Checkbox"
522
 
523
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:471
524
  #@ woocommerce-germanized
525
  msgid "This version will remove checkboxes from Checkout and display a text instead. This seems to be legally compliant (Zalando & Co are using this option)."
526
  msgstr "Diese Option nutzt anstatt einer Checkbox einen ausformulierten Text direkt überhalb des Kauf abschließen Buttons (Zalando und Andere Shops verwenden diese Form)"
527
 
528
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:477
529
  #@ woocommerce-germanized
530
  msgid "Legal Text"
531
  msgstr "Rechtlicher Hinweistext"
532
 
533
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:478
534
  #@ woocommerce-germanized
535
  msgid "Choose a Plain Text which will be shown right above checkout submit button. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
536
  msgstr "Geben Sie hier den Text ein, den Sie als Hinweistext überhalb des \"Kaufen\" - Buttons darstellen möchten. Nutzen Sie die Platzhalter {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} um die jeweiligen Links zu den Seiten einzufügen."
537
 
538
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:480
539
  #@ woocommerce-germanized
540
  msgid "With your order, you agree to have read and understood our {term_link}Terms and Conditions{/term_link} and your {revocation_link}Right of Recission{/revocation_link}."
541
  msgstr "Mit Ihrer Bestellung erklären Sie sich mit unseren {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link} einverstanden."
542
 
543
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:487
544
  #@ woocommerce-germanized
545
  msgid "Legal Text Error"
546
  msgstr "Fehlermeldung der Checkbox"
547
 
548
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:488
549
  #@ woocommerce-germanized
550
  msgid "If you have chosen to use checkbox validation please choose a error message which will be shown if the user doesn't check checkbox. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
551
  msgstr "Falls Sie sich dazu entschieden haben, eine Checkbox zu nutzen, können Sie hier die Fehlermeldung eingeben, die angezeigt wird, wenn ein Benutzer die Checkbox nicht aktiviert hat. Nutzen Sie die Platzhalter um Links zu den jeweiligen Hinweisseiten einzufügen: {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link}"
552
 
553
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:490
554
  #@ woocommerce-germanized
555
  msgid "To finish the order you have to accept to our {term_link}Terms and Conditions{/term_link} and {revocation_link}Right of Recission{/revocation_link}."
556
  msgstr "Bitte akzeptieren Sie unsere {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link}."
557
 
558
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:516
559
  #@ woocommerce-germanized
560
  msgid "Order Success Text"
561
  msgstr "Bestellung eingegangen"
562
 
563
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:517
564
  #@ woocommerce-germanized
565
  msgid "Choose a custom text to display on order success page."
566
  msgstr "Hier können Sie einen individuellen kurzen Text eingeben, der nach der Bestellung ausgegeben wird."
567
 
568
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:525
569
  #@ woocommerce-germanized
570
  msgid "Order Success Data"
571
  msgstr "Bestellbestätigungs-Daten"
572
 
573
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:526
574
  #@ woocommerce-germanized
575
  msgid "Hide product table and customer data on order success page"
576
  msgstr "Zusätzliche Produktdetails (Tabelle, Kundeninformationen) von der Bestellbestätigungs-Seite entfernen"
@@ -639,8 +626,8 @@ msgctxt "revocation-form"
639
  msgid "Thank you. We have received your Revocation Request. You will receive a conformation email within a few minutes."
640
  msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze eine E-Mail mit Ihre Daten als Bestätigung."
641
 
642
- #: includes/class-wc-gzd-checkout.php:42
643
- #: includes/class-wc-gzd-checkout.php:53
644
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
645
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
646
  #@ woocommerce-germanized
@@ -648,14 +635,14 @@ msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze ei
648
  msgid "Title"
649
  msgstr "Anrede"
650
 
651
- #: includes/class-wc-gzd-checkout.php:43
652
- #: includes/class-wc-gzd-checkout.php:51
653
  #@ woocommerce-germanized
654
  msgid "Sir"
655
  msgstr "Herr"
656
 
657
- #: includes/class-wc-gzd-checkout.php:43
658
- #: includes/class-wc-gzd-checkout.php:51
659
  #@ woocommerce-germanized
660
  msgid "Madam"
661
  msgstr "Frau"
@@ -1073,71 +1060,63 @@ msgstr "Diese E-Mail wird als Bestätigung an den Kunden weitergeleitet, sobald
1073
  msgid "Your Revocation"
1074
  msgstr "Ihr Widerruf"
1075
 
1076
- #: includes/gateways/bacs/class-wc-gzd-gateway-bacs.php:41
1077
- #@ woocommerce-germanized
1078
- msgid "Print instructions?"
1079
- msgstr "Instruktionen ausgeben?"
1080
-
1081
- #: includes/gateways/bacs/class-wc-gzd-gateway-bacs.php:43
1082
- #@ woocommerce-germanized
1083
- msgid "Show instructions"
1084
- msgstr "Instruktionen ausgeben"
1085
-
1086
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:78
1087
  #, php-format
1088
  #@ woocommerce-germanized
1089
  msgid "plus %s payment charge"
1090
  msgstr "zzgl. %s Zahlungsgebühr"
1091
 
1092
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:18
1093
  #, php-format
1094
  #@ woocommerce-germanized
1095
  msgid "Plus %s payment charge."
1096
  msgstr "Zzgl. %s Zahlungsgebühr."
1097
 
1098
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:40
1099
  #@ woocommerce-germanized
1100
  msgid "Fee"
1101
  msgstr "Zahlungsgebühr"
1102
 
1103
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:42
1104
  #@ woocommerce-germanized
1105
  msgid "This fee is being added if customer selects payment method within checkout."
1106
  msgstr "Diese Gebühr wird während der Bestellung hinzugefügt, falls der Kunde diese Zahlungsart aktiviert."
1107
 
1108
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:47
1109
  #@ woocommerce-germanized
1110
  msgid "Fee is taxable?"
1111
  msgstr "Mwst. berechnen?"
1112
 
1113
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:66
1114
  #@ woocommerce-germanized
1115
  msgid "Payment charge"
1116
  msgstr "Zahlungsgebühr"
1117
 
1118
- #: includes/wc-gzd-cart-functions.php:69
 
 
1119
  #, php-format
1120
  #@ woocommerce-germanized
1121
  msgid "incl. %s%% VAT"
1122
  msgstr "inkl. %s%% MwSt."
1123
 
1124
- #: includes/wc-gzd-template-functions.php:161
1125
  #@ woocommerce-germanized
1126
  msgid "Edit Order"
1127
  msgstr "Bestellung bearbeiten"
1128
 
1129
- #: includes/wc-gzd-template-functions.php:172
1130
  #@ woocommerce-germanized
1131
  msgid "Choose a Payment Gateway"
1132
  msgstr "Zahlungsmethode auswählen"
1133
 
1134
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:509
1135
- #: includes/wc-gzd-cart-functions.php:104
1136
  #@ woocommerce-germanized
1137
  msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
1138
  msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
1139
 
1140
- #: includes/wc-gzd-template-functions.php:230
1141
  #@ woocommerce-germanized
1142
  msgid "To get immediate access to digital content you have to agree to the losal of your right to cancel."
1143
  msgstr "Um direkten Zugang zu den digitalen Inhalte zu erhalten, müssen Sie auf das Widerrufsrecht verzichten."
@@ -1276,7 +1255,7 @@ msgstr "Alle Preise exkl. der gesetzlichen MwSt."
1276
  #: templates/global/small-business-info.php:13
1277
  #@ woocommerce-germanized
1278
  msgid "Because of the small business owner state according to §19 UStG the seller charge no sales tax, and therefore do not show it."
1279
- msgstr "Als Kleinunternehmer im Sinne von § 19 Abs. 1 UStG wird die Umsatzsteuer nicht berechnet."
1280
 
1281
  #: templates/forms/revocation-form.php:18
1282
  #@ woocommerce-germanized
@@ -1290,17 +1269,18 @@ msgctxt "revocation-form"
1290
  msgid "Forward Revocation"
1291
  msgstr "Widerruf erklären"
1292
 
 
1293
  #: templates/single-product/small-business-info.php:14
1294
  #@ woocommerce-germanized
1295
  msgid "VAT free based on §19 UStG"
1296
- msgstr "Umsatzsteuerbefreit nach §19 UStG"
1297
 
1298
- #: woocommerce-germanized.php:528
1299
  #@ woocommerce
1300
  msgid "Settings"
1301
  msgstr "Einstellungen"
1302
 
1303
- #: woocommerce-germanized.php:719
1304
  #@ woocommerce
1305
  msgid "Order Total:"
1306
  msgstr "Gesamtsumme"
@@ -1465,7 +1445,7 @@ msgctxt "trusted-shops"
1465
  msgid "About Trusted Shops"
1466
  msgstr "Über Trusted Shops"
1467
 
1468
- #: includes/wc-gzd-template-functions.php:141
1469
  #@ woocommerce
1470
  msgid "Proceed to Checkout"
1471
  msgstr ""
@@ -1490,12 +1470,12 @@ msgctxt "trusted-shops"
1490
  msgid "%s of %s based on %s <a href=\"%s\" target=\"_blank\">ratings</a>."
1491
  msgstr "%s von %s basierend auf %s <a href=\"%s\" target=\"_blank\">Bewertungen</a>."
1492
 
1493
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:460
1494
  #@ woocommerce-germanized
1495
  msgid "Checkout Table Color"
1496
  msgstr "Hintergrundfarbe der Tabelle"
1497
 
1498
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:462
1499
  #@ woocommerce-germanized
1500
  msgid "Choose the color of your checkout product table. This table should be highlighted within your checkout page."
1501
  msgstr "Wähle die Farbe des Hintergrundes deiner Produkt-Tabelle im Checkout. Die Tabelle sollte sich farblich vom Rest des Inhalts abheben."
@@ -1535,17 +1515,17 @@ msgstr "Theme ist noch für WooCommerce Germanized optimiert"
1535
  msgid "It seems like your theme is not yet ready for WooCommerce Germanized. Please check your theme's styles. Some things might look weird - WooCommerce Germanized can only offer basic styles. See <a href=\"%s\" target=\"_blank\">making your theme compatible</a> or check out our Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> for 100&#37; compatibility."
1536
  msgstr "Wir haben festgestellt, dass dein Theme scheinbar noch nicht für WooCommerce Germanized optimiert ist. Bitte überprüfe die Style-Angaben deines Themes bzw. das Aussehen deines Shops. Manche Elemente werden möglicherweise falsch dargestellt - WooCommerce Germanized kann nur grundlegende Style-Angaben machen. Lies dir dazu <a href=\"%s\" target=\"_blank\">wie mache ich mein Theme kompatibel</a> durch oder nutze das von uns entwickelte Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> für 100&#37; Kompatibilität."
1537
 
1538
- #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:49
1539
  #@ woocommerce-germanized
1540
  msgid "Check if fee is taxable."
1541
  msgstr "MwSt.-Berechnung für Gebühr aktivieren."
1542
 
1543
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:506
1544
  #@ woocommerce-germanized
1545
  msgid "Legal Digital Text"
1546
  msgstr "Hinweis Digital"
1547
 
1548
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:507
1549
  #@ woocommerce-germanized
1550
  msgid "Choose a Plain Text which will be shown right above checkout submit button if a user has picked a digital product. See legal text option for possible placeholders."
1551
  msgstr "Passen Sie hier optional den Hinweistext an, der angezeigt wird, wenn ein Kunde ein digitales Produkt im Warenkorb hat. Sie können hier die gleichen Platzhalter verwenden wie beim Rechtlichen Hinweistext"
@@ -1685,7 +1665,8 @@ msgid "Select this option if you want to display shipping costs notice for virtu
1685
  msgstr "Versandkosten-Hinweis auch für virtuelle Produkte aktivieren?"
1686
 
1687
  #: includes/abstracts/abstract-wc-gzd-product.php:90
1688
- #: includes/wc-gzd-cart-functions.php:69
 
1689
  #@ woocommerce-germanized
1690
  msgid "incl. VAT"
1691
  msgstr "inkl. MwSt."
@@ -1758,7 +1739,7 @@ msgstr "Dieser Text wird verwendet um den Einheitspreis darzustellen. Nutze {pri
1758
  msgid "{price}"
1759
  msgstr "{price}"
1760
 
1761
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:640
1762
  #@ woocommerce-germanized
1763
  msgid "Sorry, but the new Virtual VAT rules cannot be applied to small business."
1764
  msgstr "Sorry aber die neuen USt-Regelungen für virtuelle Produkte lassen sich leider nicht mit dem Kleinunternehmer vereinbaren. Bitte kontaktiere deinen Steuerberater für weitere Informationen."
@@ -1773,23 +1754,17 @@ msgstr "Anrede im Checkout"
1773
  msgid "Add a title field to the address within checkout?"
1774
  msgstr "Fügt ein Feld \"Anrede\" im Checkout hinzu."
1775
 
1776
- #. translators: plugin header field 'Version'
1777
- #: woocommerce-germanized.php:0
1778
- #@ woocommerce-germanized
1779
- msgid "1.0.5"
1780
- msgstr "1.0.5"
1781
-
1782
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:497
1783
  #@ woocommerce-germanized
1784
  msgid "Show digital notice"
1785
  msgstr "Checkbox digitale Produkte"
1786
 
1787
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:498
1788
  #@ woocommerce-germanized
1789
  msgid "Show checkbox for digital products."
1790
  msgstr "Checkbox bei digitalen Produkten anzeigen"
1791
 
1792
- #: includes/admin/settings/class-wc-gzd-settings-germanized.php:499
1793
  #@ woocommerce-germanized
1794
  msgid "Disable this option if you want your customers to obtain their right of recission even if digital products are being bought."
1795
  msgstr "Diese Option setzt im Checkout eine Checkbox falls sich im Warenkorb digitale Produkte befinden. Hier können Kunden darauf aufmerksam gemacht werden, dass im Falle von digitalen Produkten das Widerrufsrecht erlischt."
@@ -1839,3 +1814,30 @@ msgstr "Den Hinweis \"Versandkosten und Steuern werden geschätzt\" entfernen?"
1839
  msgid "By default WooCommerce adds a \"taxes and shipping estimated\" text to your cart. This might puzzle your customers and may not meet german law."
1840
  msgstr "Der Hinweistext im Warenkorb zur Schätzung von Steuern und Versandkosten kann für Verwirrung beim Kunden sorgen und scheint nicht für den deutschen Markt geeignet."
1841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WooCommerce Germanized v1.1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-09-29 12:26+0100\n"
6
+ "PO-Revision-Date: 2015-01-28 19:08:37+0000\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
75
  msgid "l"
76
  msgstr "l"
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  #: includes/admin/class-wc-gzd-admin-welcome.php:53
79
  #@ woocommerce-germanized
80
  msgid "About WooCommerce Germanized"
92
 
93
  #: includes/admin/class-wc-gzd-admin.php:28
94
  #: includes/admin/class-wc-gzd-admin.php:37
95
+ #: includes/class-wc-gzd-checkout.php:22
96
+ #: includes/class-wc-gzd-checkout.php:31
97
  #: woocommerce-germanized.php:83
98
  #: woocommerce-germanized.php:92
99
  #@ woocommerce-germanized
497
  msgid "Checkout & Cart"
498
  msgstr "Checkout & Warenkorb"
499
 
500
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:477
501
  #@ woocommerce-germanized
502
  msgid "Checkout Legal Display"
503
  msgstr "Checkbox oder Text"
504
 
505
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:478
506
  #@ woocommerce-germanized
507
  msgid "Use Text without Checkbox"
508
  msgstr "Rechtshinweis ohne Checkbox"
509
 
510
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:480
511
  #@ woocommerce-germanized
512
  msgid "This version will remove checkboxes from Checkout and display a text instead. This seems to be legally compliant (Zalando & Co are using this option)."
513
  msgstr "Diese Option nutzt anstatt einer Checkbox einen ausformulierten Text direkt überhalb des Kauf abschließen Buttons (Zalando und Andere Shops verwenden diese Form)"
514
 
515
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:486
516
  #@ woocommerce-germanized
517
  msgid "Legal Text"
518
  msgstr "Rechtlicher Hinweistext"
519
 
520
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:487
521
  #@ woocommerce-germanized
522
  msgid "Choose a Plain Text which will be shown right above checkout submit button. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
523
  msgstr "Geben Sie hier den Text ein, den Sie als Hinweistext überhalb des \"Kaufen\" - Buttons darstellen möchten. Nutzen Sie die Platzhalter {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} um die jeweiligen Links zu den Seiten einzufügen."
524
 
525
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:489
526
  #@ woocommerce-germanized
527
  msgid "With your order, you agree to have read and understood our {term_link}Terms and Conditions{/term_link} and your {revocation_link}Right of Recission{/revocation_link}."
528
  msgstr "Mit Ihrer Bestellung erklären Sie sich mit unseren {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link} einverstanden."
529
 
530
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:496
531
  #@ woocommerce-germanized
532
  msgid "Legal Text Error"
533
  msgstr "Fehlermeldung der Checkbox"
534
 
535
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:497
536
  #@ woocommerce-germanized
537
  msgid "If you have chosen to use checkbox validation please choose a error message which will be shown if the user doesn't check checkbox. Use {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link} as Placeholders for the links to legal pages."
538
  msgstr "Falls Sie sich dazu entschieden haben, eine Checkbox zu nutzen, können Sie hier die Fehlermeldung eingeben, die angezeigt wird, wenn ein Benutzer die Checkbox nicht aktiviert hat. Nutzen Sie die Platzhalter um Links zu den jeweiligen Hinweisseiten einzufügen: {term_link}{/term_link}, {data_security_link}{/data_security_link}, {revocation_link}{/revocation_link}"
539
 
540
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:499
541
  #@ woocommerce-germanized
542
  msgid "To finish the order you have to accept to our {term_link}Terms and Conditions{/term_link} and {revocation_link}Right of Recission{/revocation_link}."
543
  msgstr "Bitte akzeptieren Sie unsere {term_link}Allgemeinen Geschäftsbedingungen{/term_link} und {revocation_link}Widerrufsbestimmungen{/revocation_link}."
544
 
545
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:525
546
  #@ woocommerce-germanized
547
  msgid "Order Success Text"
548
  msgstr "Bestellung eingegangen"
549
 
550
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:526
551
  #@ woocommerce-germanized
552
  msgid "Choose a custom text to display on order success page."
553
  msgstr "Hier können Sie einen individuellen kurzen Text eingeben, der nach der Bestellung ausgegeben wird."
554
 
555
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:534
556
  #@ woocommerce-germanized
557
  msgid "Order Success Data"
558
  msgstr "Bestellbestätigungs-Daten"
559
 
560
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:535
561
  #@ woocommerce-germanized
562
  msgid "Hide product table and customer data on order success page"
563
  msgstr "Zusätzliche Produktdetails (Tabelle, Kundeninformationen) von der Bestellbestätigungs-Seite entfernen"
626
  msgid "Thank you. We have received your Revocation Request. You will receive a conformation email within a few minutes."
627
  msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze eine E-Mail mit Ihre Daten als Bestätigung."
628
 
629
+ #: includes/class-wc-gzd-checkout.php:60
630
+ #: includes/class-wc-gzd-checkout.php:71
631
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
632
  #: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
633
  #@ woocommerce-germanized
635
  msgid "Title"
636
  msgstr "Anrede"
637
 
638
+ #: includes/class-wc-gzd-checkout.php:61
639
+ #: includes/class-wc-gzd-checkout.php:69
640
  #@ woocommerce-germanized
641
  msgid "Sir"
642
  msgstr "Herr"
643
 
644
+ #: includes/class-wc-gzd-checkout.php:61
645
+ #: includes/class-wc-gzd-checkout.php:69
646
  #@ woocommerce-germanized
647
  msgid "Madam"
648
  msgstr "Frau"
1060
  msgid "Your Revocation"
1061
  msgstr "Ihr Widerruf"
1062
 
1063
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:84
 
 
 
 
 
 
 
 
 
 
1064
  #, php-format
1065
  #@ woocommerce-germanized
1066
  msgid "plus %s payment charge"
1067
  msgstr "zzgl. %s Zahlungsgebühr"
1068
 
1069
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:19
1070
  #, php-format
1071
  #@ woocommerce-germanized
1072
  msgid "Plus %s payment charge."
1073
  msgstr "Zzgl. %s Zahlungsgebühr."
1074
 
1075
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:44
1076
  #@ woocommerce-germanized
1077
  msgid "Fee"
1078
  msgstr "Zahlungsgebühr"
1079
 
1080
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:46
1081
  #@ woocommerce-germanized
1082
  msgid "This fee is being added if customer selects payment method within checkout."
1083
  msgstr "Diese Gebühr wird während der Bestellung hinzugefügt, falls der Kunde diese Zahlungsart aktiviert."
1084
 
1085
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:51
1086
  #@ woocommerce-germanized
1087
  msgid "Fee is taxable?"
1088
  msgstr "Mwst. berechnen?"
1089
 
1090
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:72
1091
  #@ woocommerce-germanized
1092
  msgid "Payment charge"
1093
  msgstr "Zahlungsgebühr"
1094
 
1095
+ #: includes/abstracts/abstract-wc-gzd-product.php:91
1096
+ #: includes/wc-gzd-cart-functions.php:68
1097
+ #: woocommerce-germanized.php:739
1098
  #, php-format
1099
  #@ woocommerce-germanized
1100
  msgid "incl. %s%% VAT"
1101
  msgstr "inkl. %s%% MwSt."
1102
 
1103
+ #: includes/wc-gzd-template-functions.php:151
1104
  #@ woocommerce-germanized
1105
  msgid "Edit Order"
1106
  msgstr "Bestellung bearbeiten"
1107
 
1108
+ #: includes/wc-gzd-template-functions.php:162
1109
  #@ woocommerce-germanized
1110
  msgid "Choose a Payment Gateway"
1111
  msgstr "Zahlungsmethode auswählen"
1112
 
1113
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:518
1114
+ #: includes/wc-gzd-cart-functions.php:103
1115
  #@ woocommerce-germanized
1116
  msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
1117
  msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
1118
 
1119
+ #: includes/wc-gzd-template-functions.php:220
1120
  #@ woocommerce-germanized
1121
  msgid "To get immediate access to digital content you have to agree to the losal of your right to cancel."
1122
  msgstr "Um direkten Zugang zu den digitalen Inhalte zu erhalten, müssen Sie auf das Widerrufsrecht verzichten."
1255
  #: templates/global/small-business-info.php:13
1256
  #@ woocommerce-germanized
1257
  msgid "Because of the small business owner state according to &#167;19 UStG the seller charge no sales tax, and therefore do not show it."
1258
+ msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
1259
 
1260
  #: templates/forms/revocation-form.php:18
1261
  #@ woocommerce-germanized
1269
  msgid "Forward Revocation"
1270
  msgstr "Widerruf erklären"
1271
 
1272
+ #: templates/single-product/legal-info.php:19
1273
  #: templates/single-product/small-business-info.php:14
1274
  #@ woocommerce-germanized
1275
  msgid "VAT free based on &#167;19 UStG"
1276
+ msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
1277
 
1278
+ #: woocommerce-germanized.php:529
1279
  #@ woocommerce
1280
  msgid "Settings"
1281
  msgstr "Einstellungen"
1282
 
1283
+ #: woocommerce-germanized.php:717
1284
  #@ woocommerce
1285
  msgid "Order Total:"
1286
  msgstr "Gesamtsumme"
1445
  msgid "About Trusted Shops"
1446
  msgstr "Über Trusted Shops"
1447
 
1448
+ #: includes/wc-gzd-template-functions.php:131
1449
  #@ woocommerce
1450
  msgid "Proceed to Checkout"
1451
  msgstr ""
1470
  msgid "%s of %s based on %s <a href=\"%s\" target=\"_blank\">ratings</a>."
1471
  msgstr "%s von %s basierend auf %s <a href=\"%s\" target=\"_blank\">Bewertungen</a>."
1472
 
1473
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:469
1474
  #@ woocommerce-germanized
1475
  msgid "Checkout Table Color"
1476
  msgstr "Hintergrundfarbe der Tabelle"
1477
 
1478
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:471
1479
  #@ woocommerce-germanized
1480
  msgid "Choose the color of your checkout product table. This table should be highlighted within your checkout page."
1481
  msgstr "Wähle die Farbe des Hintergrundes deiner Produkt-Tabelle im Checkout. Die Tabelle sollte sich farblich vom Rest des Inhalts abheben."
1515
  msgid "It seems like your theme is not yet ready for WooCommerce Germanized. Please check your theme's styles. Some things might look weird - WooCommerce Germanized can only offer basic styles. See <a href=\"%s\" target=\"_blank\">making your theme compatible</a> or check out our Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> for 100&#37; compatibility."
1516
  msgstr "Wir haben festgestellt, dass dein Theme scheinbar noch nicht für WooCommerce Germanized optimiert ist. Bitte überprüfe die Style-Angaben deines Themes bzw. das Aussehen deines Shops. Manche Elemente werden möglicherweise falsch dargestellt - WooCommerce Germanized kann nur grundlegende Style-Angaben machen. Lies dir dazu <a href=\"%s\" target=\"_blank\">wie mache ich mein Theme kompatibel</a> durch oder nutze das von uns entwickelte Theme <a href=\"%s\" target=\"_blank\">VendiPro</a> für 100&#37; Kompatibilität."
1517
 
1518
+ #: includes/abstracts/abstract-wc-gzd-payment-gateway.php:53
1519
  #@ woocommerce-germanized
1520
  msgid "Check if fee is taxable."
1521
  msgstr "MwSt.-Berechnung für Gebühr aktivieren."
1522
 
1523
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:515
1524
  #@ woocommerce-germanized
1525
  msgid "Legal Digital Text"
1526
  msgstr "Hinweis Digital"
1527
 
1528
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:516
1529
  #@ woocommerce-germanized
1530
  msgid "Choose a Plain Text which will be shown right above checkout submit button if a user has picked a digital product. See legal text option for possible placeholders."
1531
  msgstr "Passen Sie hier optional den Hinweistext an, der angezeigt wird, wenn ein Kunde ein digitales Produkt im Warenkorb hat. Sie können hier die gleichen Platzhalter verwenden wie beim Rechtlichen Hinweistext"
1665
  msgstr "Versandkosten-Hinweis auch für virtuelle Produkte aktivieren?"
1666
 
1667
  #: includes/abstracts/abstract-wc-gzd-product.php:90
1668
+ #: includes/wc-gzd-cart-functions.php:68
1669
+ #: woocommerce-germanized.php:739
1670
  #@ woocommerce-germanized
1671
  msgid "incl. VAT"
1672
  msgstr "inkl. MwSt."
1739
  msgid "{price}"
1740
  msgstr "{price}"
1741
 
1742
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:649
1743
  #@ woocommerce-germanized
1744
  msgid "Sorry, but the new Virtual VAT rules cannot be applied to small business."
1745
  msgstr "Sorry aber die neuen USt-Regelungen für virtuelle Produkte lassen sich leider nicht mit dem Kleinunternehmer vereinbaren. Bitte kontaktiere deinen Steuerberater für weitere Informationen."
1754
  msgid "Add a title field to the address within checkout?"
1755
  msgstr "Fügt ein Feld \"Anrede\" im Checkout hinzu."
1756
 
1757
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:506
 
 
 
 
 
 
1758
  #@ woocommerce-germanized
1759
  msgid "Show digital notice"
1760
  msgstr "Checkbox digitale Produkte"
1761
 
1762
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:507
1763
  #@ woocommerce-germanized
1764
  msgid "Show checkbox for digital products."
1765
  msgstr "Checkbox bei digitalen Produkten anzeigen"
1766
 
1767
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:508
1768
  #@ woocommerce-germanized
1769
  msgid "Disable this option if you want your customers to obtain their right of recission even if digital products are being bought."
1770
  msgstr "Diese Option setzt im Checkout eine Checkbox falls sich im Warenkorb digitale Produkte befinden. Hier können Kunden darauf aufmerksam gemacht werden, dass im Falle von digitalen Produkten das Widerrufsrecht erlischt."
1814
  msgid "By default WooCommerce adds a \"taxes and shipping estimated\" text to your cart. This might puzzle your customers and may not meet german law."
1815
  msgstr "Der Hinweistext im Warenkorb zur Schätzung von Steuern und Versandkosten kann für Verwirrung beim Kunden sorgen und scheint nicht für den deutschen Markt geeignet."
1816
 
1817
+ #: includes/abstracts/abstract-wc-gzd-product.php:91
1818
+ #, php-format
1819
+ #@ woocommerce-germanized
1820
+ msgid "excl. %s%% VAT"
1821
+ msgstr "exkl. %s%% MwSt."
1822
+
1823
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:460
1824
+ #@ woocommerce-germanized
1825
+ msgid "Show back to cart button"
1826
+ msgstr "Bestellung bearbeiten"
1827
+
1828
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:461
1829
+ #@ woocommerce-germanized
1830
+ msgid "Show back to cart button within your checkout table?"
1831
+ msgstr "Einen \"Bestellung bearbeiten\" Button in der Bestellübersicht anzeigen?"
1832
+
1833
+ #: includes/admin/settings/class-wc-gzd-settings-germanized.php:465
1834
+ #@ woocommerce-germanized
1835
+ msgid "This button may let your customer edit their order before submitting. Some people state that this button should be hidden to avoid legal problems."
1836
+ msgstr "Dieser Button ermöglicht es deinen Kunden etwaige Falscheingaben (d.h. fälschlich ausgewählte Produkte) zu korrigieren und zurück zum Warenkorb zu gelangen. Je nach Darstellung in deinem Theme könnte es allerdings auch das Risiko für Abmahnungen erhöhen, da zwischen Pflichtangaben und Kaufen-Button keine weitere Informationen abgedruckt werden sollten."
1837
+
1838
+ #. translators: plugin header field 'Version'
1839
+ #: woocommerce-germanized.php:0
1840
+ #@ woocommerce-germanized
1841
+ msgid "1.1.1"
1842
+ msgstr ""
1843
+
includes/abstracts/abstract-wc-gzd-payment-gateway.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Adds payment method fee to applicable payment methods
4
  *
5
  * @class WC_GZD_Payment_Gateway
6
  * @version 1.0.0
@@ -9,6 +9,7 @@
9
  class WC_GZD_Payment_Gateway {
10
 
11
  public $gateway;
 
12
 
13
  public function __construct( WC_Payment_Gateway $gateway ) {
14
  $this->gateway = $gateway;
@@ -17,6 +18,9 @@ class WC_GZD_Payment_Gateway {
17
  add_filter( 'woocommerce_gateway_title', array( $this, 'manipulate_title' ), 0, 2 );
18
  $this->description .= ' ' . sprintf( __( 'Plus %s payment charge.', 'woocommerce-germanized' ), wc_price( $this->get_option( 'fee' ) ) );
19
  }
 
 
 
20
  }
21
 
22
  public function __get( $key ) {
@@ -36,19 +40,21 @@ class WC_GZD_Payment_Gateway {
36
  * Add default form fields to enable fee within payment method settings page
37
  */
38
  public function init_form_fields() {
39
- $this->gateway->form_fields[ 'fee' ] = array(
40
  'title' => __( 'Fee', 'woocommerce-germanized' ),
41
  'type' => 'decimal',
42
  'description' => __( 'This fee is being added if customer selects payment method within checkout.', 'woocommerce-germanized' ),
43
  'default' => 0,
44
  'desc_tip' => true,
45
  );
46
- $this->gateway->form_fields[ 'fee_is_taxable' ] = array(
47
  'title' => __( 'Fee is taxable?', 'woocommerce-germanized' ),
48
  'type' => 'checkbox',
49
  'label' => __( 'Check if fee is taxable.', 'woocommerce-germanized' ),
50
  'default' => 'no',
51
  );
 
 
52
  }
53
 
54
  /**
1
  <?php
2
  /**
3
+ * Adds payment method fee to WC_Payment_Gateway
4
  *
5
  * @class WC_GZD_Payment_Gateway
6
  * @version 1.0.0
9
  class WC_GZD_Payment_Gateway {
10
 
11
  public $gateway;
12
+ public $extra_fields = array();
13
 
14
  public function __construct( WC_Payment_Gateway $gateway ) {
15
  $this->gateway = $gateway;
18
  add_filter( 'woocommerce_gateway_title', array( $this, 'manipulate_title' ), 0, 2 );
19
  $this->description .= ' ' . sprintf( __( 'Plus %s payment charge.', 'woocommerce-germanized' ), wc_price( $this->get_option( 'fee' ) ) );
20
  }
21
+ add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this->gateway, 'process_admin_options' ), PHP_INT_MAX );
22
+ if ( ! isset( $this->gateway->force_order_button_text ) || ! $this->gateway->force_order_button_text )
23
+ $this->gateway->order_button_text = __( get_option( 'woocommerce_gzd_order_submit_btn_text' ), 'woocommerce-germanized' );
24
  }
25
 
26
  public function __get( $key ) {
40
  * Add default form fields to enable fee within payment method settings page
41
  */
42
  public function init_form_fields() {
43
+ $this->extra_fields[ 'fee' ] = array(
44
  'title' => __( 'Fee', 'woocommerce-germanized' ),
45
  'type' => 'decimal',
46
  'description' => __( 'This fee is being added if customer selects payment method within checkout.', 'woocommerce-germanized' ),
47
  'default' => 0,
48
  'desc_tip' => true,
49
  );
50
+ $this->extra_fields[ 'fee_is_taxable' ] = array(
51
  'title' => __( 'Fee is taxable?', 'woocommerce-germanized' ),
52
  'type' => 'checkbox',
53
  'label' => __( 'Check if fee is taxable.', 'woocommerce-germanized' ),
54
  'default' => 'no',
55
  );
56
+ foreach( $this->extra_fields as $key => $field )
57
+ $this->gateway->form_fields[ $key ] = $field;
58
  }
59
 
60
  /**
includes/abstracts/abstract-wc-gzd-product.php CHANGED
@@ -51,6 +51,8 @@ class WC_GZD_Product {
51
  public function __get( $key ) {
52
  if ( $this->child->$key )
53
  return $this->child->$key;
 
 
54
  return false;
55
  }
56
 
@@ -88,7 +90,7 @@ class WC_GZD_Product {
88
  $tax_rates = array_values( $tax_rates );
89
  if ( $this->is_virtual_vat_exception() )
90
  return ( $tax_display_mode == 'incl' ? __( 'incl. VAT', 'woocommerce-germanized' ) : __( 'excl. VAT', 'woocommerce-germanized' ) );
91
- return ( $tax_display_mode == 'incl' ? sprintf( __( 'incl. %s VAT', 'woocommerce-germanized' ), ( (int) $tax_rates[0][ 'rate' ] ) . '%' ) : sprintf( __( 'excl. %s VAT', 'woocommerce-germanized' ), ( (int) $tax_rates[0][ 'rate' ] ) . '%' ) );
92
  }
93
  }
94
  return false;
@@ -200,13 +202,25 @@ class WC_GZD_Product {
200
  return ( $this->has_unit() ) ? str_replace( '{price}', $price_html . $this->child->get_price_suffix() . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(), get_option( 'woocommerce_gzd_unit_price_text' ) ) : '';
201
  }
202
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  /**
204
  * Returns current product's delivery time term. If none has been set and a default delivery time has been set, returns that instead.
205
  *
206
  * @return object
207
  */
208
  public function get_delivery_time_term() {
209
- $delivery_time = $this->child->delivery_time;
210
  if ( empty( $delivery_time ) && get_option( 'woocommerce_gzd_default_delivery_time' ) && ! $this->child->is_downloadable() ) {
211
  $delivery_time = array( get_term_by( 'id', get_option( 'woocommerce_gzd_default_delivery_time' ), 'product_delivery_time' ) );
212
  if ( is_array( $delivery_time ) ) {
@@ -214,8 +228,6 @@ class WC_GZD_Product {
214
  $delivery_time = $delivery_time[0];
215
  }
216
  }
217
- if ( is_array( $delivery_time ) )
218
- $delivery_time = $delivery_time[0];
219
  return ( ! is_wp_error( $delivery_time ) && ! empty( $delivery_time ) ) ? $delivery_time : false;
220
  }
221
 
51
  public function __get( $key ) {
52
  if ( $this->child->$key )
53
  return $this->child->$key;
54
+ else if ( $key == 'delivery_time' )
55
+ return $this->get_delivery_time();
56
  return false;
57
  }
58
 
90
  $tax_rates = array_values( $tax_rates );
91
  if ( $this->is_virtual_vat_exception() )
92
  return ( $tax_display_mode == 'incl' ? __( 'incl. VAT', 'woocommerce-germanized' ) : __( 'excl. VAT', 'woocommerce-germanized' ) );
93
+ return ( $tax_display_mode == 'incl' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), ( wc_gzd_format_tax_rate_percentage( $tax_rates[0][ 'rate' ] ) ) ) : sprintf( __( 'excl. %s%% VAT', 'woocommerce-germanized' ), ( wc_gzd_format_tax_rate_percentage( $tax_rates[0][ 'rate' ] ) ) ) );
94
  }
95
  }
96
  return false;
202
  return ( $this->has_unit() ) ? str_replace( '{price}', $price_html . $this->child->get_price_suffix() . apply_filters( 'wc_gzd_unit_price_seperator', ' / ' ) . $this->get_unit_base(), get_option( 'woocommerce_gzd_unit_price_text' ) ) : '';
203
  }
204
 
205
+ /**
206
+ * Returns the current products delivery time term without falling back to default term
207
+ *
208
+ * @return bool|object false returns false if term does not exist otherwise returns term object
209
+ */
210
+ public function get_delivery_time() {
211
+ $terms = wp_get_post_terms( $this->id, 'product_delivery_time' );
212
+ if ( is_wp_error( $terms ) || empty( $terms ) )
213
+ return false;
214
+ return $terms[ 0 ];
215
+ }
216
+
217
  /**
218
  * Returns current product's delivery time term. If none has been set and a default delivery time has been set, returns that instead.
219
  *
220
  * @return object
221
  */
222
  public function get_delivery_time_term() {
223
+ $delivery_time = $this->delivery_time;
224
  if ( empty( $delivery_time ) && get_option( 'woocommerce_gzd_default_delivery_time' ) && ! $this->child->is_downloadable() ) {
225
  $delivery_time = array( get_term_by( 'id', get_option( 'woocommerce_gzd_default_delivery_time' ), 'product_delivery_time' ) );
226
  if ( is_array( $delivery_time ) ) {
228
  $delivery_time = $delivery_time[0];
229
  }
230
  }
 
 
231
  return ( ! is_wp_error( $delivery_time ) && ! empty( $delivery_time ) ) ? $delivery_time : false;
232
  }
233
 
includes/admin/settings/class-wc-gzd-settings-germanized.php CHANGED
@@ -456,6 +456,15 @@ class WC_GZD_Settings_Germanized extends WC_Settings_Page {
456
  'desc_tip' => __( 'This option will hide shipping rate selection from checkout. By then customers will only be able to change their shipping rate on cart page.', 'woocommerce-germanized' ),
457
  ),
458
 
 
 
 
 
 
 
 
 
 
459
  array(
460
  'title' => __( 'Checkout Table Color', 'woocommerce-germanized' ),
461
  'id' => 'woocommerce_gzd_display_checkout_table_color',
456
  'desc_tip' => __( 'This option will hide shipping rate selection from checkout. By then customers will only be able to change their shipping rate on cart page.', 'woocommerce-germanized' ),
457
  ),
458
 
459
+ array(
460
+ 'title' => __( 'Show back to cart button', 'woocommerce-germanized' ),
461
+ 'desc' => __( 'Show back to cart button within your checkout table?', 'woocommerce-germanized' ),
462
+ 'id' => 'woocommerce_gzd_display_checkout_back_to_cart_button',
463
+ 'default' => 'no',
464
+ 'type' => 'checkbox',
465
+ 'desc_tip' => __( 'This button may let your customer edit their order before submitting. Some people state that this button should be hidden to avoid legal problems.', 'woocommerce-germanized' ),
466
+ ),
467
+
468
  array(
469
  'title' => __( 'Checkout Table Color', 'woocommerce-germanized' ),
470
  'id' => 'woocommerce_gzd_display_checkout_table_color',
includes/class-wc-gzd-checkout.php CHANGED
@@ -8,9 +8,8 @@ class WC_GZD_Checkout {
8
  protected static $_instance = null;
9
 
10
  public static function instance() {
11
- if ( is_null( self::$_instance ) ) {
12
  self::$_instance = new self();
13
- }
14
  return self::$_instance;
15
  }
16
 
@@ -33,7 +32,26 @@ class WC_GZD_Checkout {
33
  }
34
 
35
  public function __construct() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
 
37
  if ( get_option( 'woocommerce_gzd_checkout_address_field' ) == 'yes' ) {
38
 
39
  $this->custom_fields[ 'title' ] = array(
@@ -65,23 +83,6 @@ class WC_GZD_Checkout {
65
  );
66
 
67
  }
68
-
69
- add_filter( 'woocommerce_billing_fields', array( $this, 'set_custom_fields' ), 0, 1 );
70
- add_filter( 'woocommerce_shipping_fields', array( $this, 'set_custom_fields_shipping' ), 0, 1 );
71
- // Add Fields to Order Edit Page
72
- add_filter( 'woocommerce_admin_billing_fields', array( $this, 'set_custom_fields_admin' ), 0, 1 );
73
- add_filter( 'woocommerce_admin_shipping_fields', array( $this, 'set_custom_fields_admin' ), 0, 1 );
74
- // Save Fields on order
75
- add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_fields' ) );
76
- // Add Title to billing address format
77
- add_filter( 'woocommerce_order_formatted_billing_address', array( $this, 'set_formatted_billing_address' ), 0, 2 );
78
- add_filter( 'woocommerce_order_formatted_shipping_address', array( $this, 'set_formatted_shipping_address' ), 0, 2 );
79
- add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'set_formatted_address' ), 0, 2 );
80
- // Add item desc to order
81
- add_action( 'woocommerce_order_add_product', array( $this, 'set_item_desc_order_meta' ), 0, 5 );
82
- add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'set_item_desc_order_meta_hidden' ), 0 );
83
- // Deactivate checkout shipping selection
84
- add_action( 'woocommerce_review_order_before_shipping', array( $this, 'remove_shipping_rates' ), 0 );
85
  }
86
 
87
  /**
8
  protected static $_instance = null;
9
 
10
  public static function instance() {
11
+ if ( is_null( self::$_instance ) )
12
  self::$_instance = new self();
 
13
  return self::$_instance;
14
  }
15
 
32
  }
33
 
34
  public function __construct() {
35
+ add_action( 'init', array( $this, 'init_fields' ) );
36
+ add_filter( 'woocommerce_billing_fields', array( $this, 'set_custom_fields' ), 0, 1 );
37
+ add_filter( 'woocommerce_shipping_fields', array( $this, 'set_custom_fields_shipping' ), 0, 1 );
38
+ // Add Fields to Order Edit Page
39
+ add_filter( 'woocommerce_admin_billing_fields', array( $this, 'set_custom_fields_admin' ), 0, 1 );
40
+ add_filter( 'woocommerce_admin_shipping_fields', array( $this, 'set_custom_fields_admin' ), 0, 1 );
41
+ // Save Fields on order
42
+ add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_fields' ) );
43
+ // Add Title to billing address format
44
+ add_filter( 'woocommerce_order_formatted_billing_address', array( $this, 'set_formatted_billing_address' ), 0, 2 );
45
+ add_filter( 'woocommerce_order_formatted_shipping_address', array( $this, 'set_formatted_shipping_address' ), 0, 2 );
46
+ add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'set_formatted_address' ), 0, 2 );
47
+ // Add item desc to order
48
+ add_action( 'woocommerce_order_add_product', array( $this, 'set_item_desc_order_meta' ), 0, 5 );
49
+ add_filter( 'woocommerce_hidden_order_itemmeta', array( $this, 'set_item_desc_order_meta_hidden' ), 0 );
50
+ // Deactivate checkout shipping selection
51
+ add_action( 'woocommerce_review_order_before_shipping', array( $this, 'remove_shipping_rates' ), 0 );
52
+ }
53
 
54
+ public function init_fields() {
55
  if ( get_option( 'woocommerce_gzd_checkout_address_field' ) == 'yes' ) {
56
 
57
  $this->custom_fields[ 'title' ] = array(
83
  );
84
 
85
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
  /**
includes/class-wc-gzd-payment-gateways.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WooCommerce Payment Gateways class
4
+ *
5
+ * Loads payment gateways via hooks for use in the store.
6
+ *
7
+ * @class WC_Payment_Gateways
8
+ * @version 2.2.0
9
+ * @package WooCommerce/Classes/Payment
10
+ * @category Class
11
+ * @author WooThemes
12
+ */
13
+ class WC_GZD_Payment_Gateways extends WC_Payment_Gateways {
14
+
15
+ public static function instance() {
16
+ if ( is_null( self::$_instance ) )
17
+ self::$_instance = new self();
18
+ return self::$_instance;
19
+ }
20
+
21
+ public function __construct() {
22
+ $this->init();
23
+ }
24
+
25
+ public function init() {
26
+ parent::init();
27
+ if ( ! empty( $this->payment_gateways ) ) {
28
+ foreach ( $this->payment_gateways as $gateway ) {
29
+ $gateway->parent = new WC_GZD_Payment_Gateway( $gateway );
30
+ }
31
+ }
32
+ do_action( 'woocommerce_gzd_payment_gateways_loaded' );
33
+ }
34
+
35
+ }
includes/class-wc-gzd-product-variation.php CHANGED
@@ -19,7 +19,6 @@ class WC_GZD_Product_Variation extends WC_Product_Variation {
19
  */
20
  public function __construct( $product ) {
21
  parent::__construct( $product );
22
- $this->variation_level_meta_data[ 'delivery_time' ] = '';
23
  $this->variation_level_meta_data[ 'unit' ] = 0;
24
  $this->variation_level_meta_data[ 'unit_price' ] = 0;
25
  $this->variation_level_meta_data[ 'unit_base' ] = '';
@@ -29,6 +28,18 @@ class WC_GZD_Product_Variation extends WC_Product_Variation {
29
  $this->variation_level_meta_data[ 'gzd_product' ] = NULL;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Implement getter to grab delivery time
34
  *
@@ -36,10 +47,9 @@ class WC_GZD_Product_Variation extends WC_Product_Variation {
36
  * @return mixed
37
  */
38
  public function __get( $key ) {
39
- $value = parent::__get($key);
40
  if ( $key == 'delivery_time' )
41
- $value = get_the_terms( $this->variation_id, 'product_delivery_time' );
42
- return $value;
43
  }
44
 
45
  }
19
  */
20
  public function __construct( $product ) {
21
  parent::__construct( $product );
 
22
  $this->variation_level_meta_data[ 'unit' ] = 0;
23
  $this->variation_level_meta_data[ 'unit_price' ] = 0;
24
  $this->variation_level_meta_data[ 'unit_base' ] = '';
28
  $this->variation_level_meta_data[ 'gzd_product' ] = NULL;
29
  }
30
 
31
+ /**
32
+ * Returns the current products delivery time term without falling back to default terms
33
+ *
34
+ * @return bool|object false returns false if term does not exist otherwise returns term object
35
+ */
36
+ public function get_delivery_time() {
37
+ $terms = wp_get_post_terms( $this->variation_id, 'product_delivery_time' );
38
+ if ( is_wp_error( $terms ) || empty( $terms ) )
39
+ return false;
40
+ return $terms[ 0 ];
41
+ }
42
+
43
  /**
44
  * Implement getter to grab delivery time
45
  *
47
  * @return mixed
48
  */
49
  public function __get( $key ) {
 
50
  if ( $key == 'delivery_time' )
51
+ return $this->get_delivery_time();
52
+ return parent::__get( $key );
53
  }
54
 
55
  }
includes/class-wc-gzd-shipping-rate.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WC_GZD_Shipping_Rate extends WC_Shipping_Rate {
4
+
5
+ public $tax_shares = array();
6
+
7
+ public function __construct( WC_Shipping_Rate $rate ) {
8
+ parent::__construct( $rate->id, $rate->label, $rate->cost, $rate->taxes, $rate->method_id );
9
+ if ( ! get_option( 'woocommerce_shipping_tax_class' ) )
10
+ $this->set_taxes();
11
+ $this->set_costs();
12
+ }
13
+
14
+ public function set_taxes() {
15
+ $cart = WC()->cart->get_cart();
16
+ $item_totals = 0;
17
+ // Get tax classes and tax amounts
18
+ if ( ! empty( $cart ) ) {
19
+ foreach ( $cart as $key => $item ) {
20
+ $class = $item['data']->get_tax_class();
21
+ if ( ! isset( $this->tax_shares[ $class ] ) ) {
22
+ $this->tax_shares[ $class ] = array();
23
+ $this->tax_shares[ $class ][ 'total' ] = 0;
24
+ $this->tax_shares[ $class ][ 'key' ] = '';
25
+ }
26
+ $this->tax_shares[ $class ][ 'total' ] += $item[ 'line_total' ];
27
+ $this->tax_shares[ $class ][ 'key' ] = key( $item[ 'line_tax_data' ][ 'total' ] );
28
+ $item_totals += $item[ 'line_total' ];
29
+ }
30
+ }
31
+ // Calculate tax class share
32
+ if ( ! empty( $this->tax_shares ) ) {
33
+ foreach ( $this->tax_shares as $key => $class )
34
+ $this->tax_shares[ $key ][ 'share' ] = $class[ 'total' ] / $item_totals;
35
+ foreach ( $this->tax_shares as $rate => $class ) {
36
+ $tax_rates = WC_Tax::get_rates( $rate );
37
+ $this->tax_shares[ $rate ][ 'shipping_tax_share' ] = $this->cost * $class[ 'share' ];
38
+ $this->tax_shares[ $rate ][ 'shipping_tax' ] = WC_Tax::calc_tax( ( $this->cost * $class[ 'share' ] ), $tax_rates, true );
39
+ }
40
+ $this->taxes = array();
41
+ foreach ( $this->tax_shares as $rate => $class ) {
42
+ $this->taxes = $this->taxes + $class[ 'shipping_tax' ];
43
+ }
44
+ }
45
+ }
46
+
47
+ public function set_costs() {
48
+ $this->cost = $this->cost - array_sum( $this->taxes );
49
+ }
50
+
51
+ public function get_taxes() {
52
+ return $this->taxes;
53
+ }
54
+
55
+ }
56
+
57
+ ?>
includes/gateways/bacs/class-wc-gzd-gateway-bacs.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
- }
6
-
7
- /**
8
- * Bank Transfer Payment Gateway
9
- *
10
- * Provides a Bank Transfer Payment Gateway. Extends base class to allow empty instructions.
11
- *
12
- * @class WC_GZD_Gateway_BACS
13
- * @extends WC_Gateway_BACS
14
- * @version 1.0.0
15
- * @author Vendidero
16
- */
17
- class WC_GZD_Gateway_BACS extends WC_Gateway_BACS {
18
-
19
- public $parent;
20
-
21
- public function __construct() {
22
- parent::__construct();
23
- if ( $this->get_option( 'has_instructions' ) == 'no' )
24
- $this->instructions = '';
25
- $this->parent = new WC_GZD_Payment_Gateway( $this );
26
- }
27
-
28
- public function __call( $method, $arguments ) {
29
- if ( method_exists( $this->parent, $method ) )
30
- return call_user_func_array( array( $this->parent, $method), $arguments );
31
- }
32
-
33
- public function __get( $key ) {
34
- if ( isset( $this->parent->$key ) )
35
- return $this->parent->$key;
36
- }
37
-
38
- public function init_form_fields() {
39
- parent::init_form_fields();
40
- $this->form_fields[ 'has_instructions' ] = array(
41
- 'title' => __( 'Print instructions?', 'woocommerce-germanized' ),
42
- 'type' => 'checkbox',
43
- 'label' => __( 'Show instructions', 'woocommerce-germanized' ),
44
- 'default' => 'no'
45
- );
46
- }
47
-
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/gateways/cod/class-wc-gzd-gateway-cod.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
- }
6
-
7
- /**
8
- * Cash on Delivery Gateway
9
- *
10
- * Provides a Cash on Delivery Payment Gateway. Extends base class to enable payment fee.
11
- *
12
- * @class WC_GZD_Gateway_COD
13
- * @extends WC_Gateway_COD
14
- * @version 1.0.0
15
- * @author Vendidero
16
- */
17
- class WC_GZD_Gateway_COD extends WC_Gateway_COD {
18
-
19
- public $parent;
20
-
21
- public function __construct() {
22
- parent::__construct();
23
- $this->parent = new WC_GZD_Payment_Gateway( $this );
24
- }
25
-
26
- public function __call( $method, $arguments ) {
27
- if ( method_exists( $this->parent, $method ) )
28
- return call_user_func_array( array( $this->parent, $method), $arguments );
29
- }
30
-
31
- public function __get( $key ) {
32
- if ( isset( $this->parent->$key ) )
33
- return $this->parent->$key;
34
- }
35
-
36
- public function init_form_fields() {
37
- parent::init_form_fields();
38
- }
39
-
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/gateways/paypal/class-wc-gzd-gateway-paypal.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
- }
6
-
7
- /**
8
- * PayPal Standard Payment Gateway
9
- *
10
- * Provides a PayPal Standard Payment Gateway.
11
- *
12
- * @class WC_Paypal
13
- * @extends WC_Gateway_Paypal
14
- * @version 2.0.0
15
- * @package WooCommerce/Classes/Payment
16
- * @author WooThemes
17
- */
18
- class WC_GZD_Gateway_Paypal extends WC_Gateway_Paypal {
19
-
20
- public $parent;
21
-
22
- public function __construct() {
23
- parent::__construct();
24
- $this->parent = new WC_GZD_Payment_Gateway( $this );
25
- }
26
-
27
- public function __call( $method, $arguments ) {
28
- if ( method_exists( $this->parent, $method ) )
29
- return call_user_func_array( array( $this->parent, $method), $arguments );
30
- }
31
-
32
- public function __get( $key ) {
33
- if ( isset( $this->parent->$key ) )
34
- return $this->parent->$key;
35
- }
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wc-gzd-cart-functions.php CHANGED
@@ -63,10 +63,9 @@ function wc_gzd_cart_totals_order_total_tax_html() {
63
  }
64
  if ( ! empty( $tax_array ) ) {
65
  foreach ( $tax_array as $tax ) {
66
- $rate = (int) $tax[ 'tax' ]->rate;
67
  echo '
68
  <tr class="order-tax">
69
- <th>' . ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ? sprintf( __( 'incl. %s%% VAT', 'woocommerce-germanized' ), $rate ) : __( 'incl. VAT', 'woocommerce-germanized' ) ) . '</th>
70
  <td>' . $tax[ 'amount' ] . '</td>
71
  </tr>';
72
  }
63
  }
64
  if ( ! empty( $tax_array ) ) {
65
  foreach ( $tax_array as $tax ) {
 
66
  echo '
67
  <tr class="order-tax">
68
+ <th>' . ( 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' ) ) . '</th>
69
  <td>' . $tax[ 'amount' ] . '</td>
70
  </tr>';
71
  }
includes/wc-gzd-core-functions.php CHANGED
@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12
 
13
  /**
14
  * Gets WC_GZD_Product by WC_Product
 
15
  * @param WC_Product|int $the_product
16
  * @return WC_GZD_Product
17
  */
@@ -24,4 +25,15 @@ function wc_gzd_get_product( $the_product = false ) {
24
  if ( isset( $the_product ) )
25
  return WC_GZD_Product::instance( $the_product );
26
  return false;
 
 
 
 
 
 
 
 
 
 
 
27
  }
12
 
13
  /**
14
  * Gets WC_GZD_Product by WC_Product
15
+ *
16
  * @param WC_Product|int $the_product
17
  * @return WC_GZD_Product
18
  */
25
  if ( isset( $the_product ) )
26
  return WC_GZD_Product::instance( $the_product );
27
  return false;
28
+ }
29
+
30
+ /**
31
+ * Format tax rate percentage for output in frontend
32
+ *
33
+ * @param float $rate
34
+ * @param boolean $percent show percentage after number
35
+ * @return string
36
+ */
37
+ function wc_gzd_format_tax_rate_percentage( $rate, $percent = false ) {
38
+ return str_replace( '.', ',', wc_format_decimal( str_replace( '%', '', $rate ), true, true ) ) . ( $percent ? '%' : '' );
39
  }
includes/wc-gzd-template-functions.php CHANGED
@@ -61,16 +61,6 @@ if ( ! function_exists( 'woocommerce_gzd_template_single_tax_info' ) ) {
61
  function woocommerce_gzd_template_single_tax_info() {
62
  wc_get_template( 'single-product/tax-info.php' );
63
  }
64
- }
65
-
66
- if ( ! function_exists( 'woocommerce_gzd_template_single_small_business_info' ) ) {
67
-
68
- /**
69
- * Single Product small business info
70
- */
71
- function woocommerce_gzd_template_single_small_business_info() {
72
- wc_get_template( 'single-product/small-business-info.php' );
73
- }
74
  }
75
 
76
  if ( ! function_exists( 'woocommerce_gzd_template_small_business_info' ) ) {
61
  function woocommerce_gzd_template_single_tax_info() {
62
  wc_get_template( 'single-product/tax-info.php' );
63
  }
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  if ( ! function_exists( 'woocommerce_gzd_template_small_business_info' ) ) {
includes/wc-gzd-template-hooks.php CHANGED
@@ -17,8 +17,6 @@ if ( get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ||
17
  if ( get_option( 'woocommerce_gzd_display_product_detail_delivery_time' ) == 'yes' )
18
  add_action( 'woocommerce_single_product_summary', 'woocommerce_gzd_template_single_delivery_time_info', 27 );
19
  if ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) {
20
- if ( get_option( 'woocommerce_gzd_display_product_detail_small_enterprise' ) == 'yes' )
21
- add_action( 'woocommerce_single_product_summary', 'woocommerce_gzd_template_single_small_business_info', 28 );
22
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info' );
23
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', 25 );
24
  }
@@ -51,7 +49,8 @@ add_filter( 'woocommerce_cart_item_name', 'wc_gzd_product_item_desc', 0, 2 );
51
  /**
52
  * Checkout
53
  */
54
- add_action( 'woocommerce_review_order_after_cart_contents', 'woocommerce_gzd_template_checkout_back_to_cart' );
 
55
  add_action( 'woocommerce_review_order_before_payment', 'woocommerce_gzd_template_checkout_payment_title' );
56
  add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_legal' );
57
  add_filter( 'woocommerce_checkout_show_terms', 'woocommerce_gzd_remove_term_checkbox' );
17
  if ( get_option( 'woocommerce_gzd_display_product_detail_delivery_time' ) == 'yes' )
18
  add_action( 'woocommerce_single_product_summary', 'woocommerce_gzd_template_single_delivery_time_info', 27 );
19
  if ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) {
 
 
20
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info' );
21
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', 25 );
22
  }
49
  /**
50
  * Checkout
51
  */
52
+ if ( get_option( 'woocommerce_gzd_display_checkout_back_to_cart_button' ) == 'yes' )
53
+ add_action( 'woocommerce_review_order_after_cart_contents', 'woocommerce_gzd_template_checkout_back_to_cart' );
54
  add_action( 'woocommerce_review_order_before_payment', 'woocommerce_gzd_template_checkout_payment_title' );
55
  add_action( 'woocommerce_gzd_before_shop_table', 'woocommerce_gzd_template_checkout_legal' );
56
  add_filter( 'woocommerce_checkout_show_terms', 'woocommerce_gzd_remove_term_checkbox' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
- Stable tag: 1.1.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -123,6 +123,12 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns
123
 
124
  == Changelog ==
125
 
 
 
 
 
 
 
126
  = 1.1 =
127
  * Feature - Hide shipping method select from checkout
128
  * Feature - Hide "taxes and shipping estimated" from cart
@@ -133,7 +139,7 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns
133
 
134
  = 1.0.5 =
135
  * Feature - Optionally remove address field from checkout
136
- * Fix - Shipping time bug within checkouts
137
  * Fix - Better theme compatibility for variations
138
 
139
  = 1.0.4 =
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
+ Stable tag: 1.1.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
123
 
124
  == Changelog ==
125
 
126
+ = 1.1.1 =
127
+ * Feature - Optionally choose to hide the edit order button on checkout
128
+ * Fix - Crucial bug which led to blank screens after upgrading to 1.1.0
129
+ * Fix - Even better third party compatibility
130
+ * Fix - Small business notification legal text update
131
+
132
  = 1.1 =
133
  * Feature - Hide shipping method select from checkout
134
  * Feature - Hide "taxes and shipping estimated" from cart
139
 
140
  = 1.0.5 =
141
  * Feature - Optionally remove address field from checkout
142
+ * Fix - Shipping time bug within checkout
143
  * Fix - Better theme compatibility for variations
144
 
145
  = 1.0.4 =
templates/single-product/legal-info.php CHANGED
@@ -15,6 +15,8 @@ global $product;
15
  <p class="wc-gzd-additional-info">
16
  <?php if ( $product->gzd_product->get_tax_info() && get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ) : ?>
17
  <span class="wc-gzd-additional-info tax-info"><?php echo $product->gzd_product->get_tax_info(); ?></span>
 
 
18
  <?php endif; ?>
19
  <?php if ( $product->gzd_product->get_shipping_costs_html() && get_option( 'woocommerce_gzd_display_product_detail_shipping_costs' ) == 'yes' ) : ?>
20
  <span class="wc-gzd-additional-info shipping-costs-info"><?php echo $product->gzd_product->get_shipping_costs_html();?></span>
15
  <p class="wc-gzd-additional-info">
16
  <?php if ( $product->gzd_product->get_tax_info() && get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ) : ?>
17
  <span class="wc-gzd-additional-info tax-info"><?php echo $product->gzd_product->get_tax_info(); ?></span>
18
+ <?php elseif ( ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' && get_option( 'woocommerce_gzd_display_product_detail_small_enterprise' ) == 'yes' ) ) : ?>
19
+ <span class="wc-gzd-additional-info small-business-info"><?php _e( 'VAT free based on &#167;19 UStG', 'woocommerce-germanized' );?></span>
20
  <?php endif; ?>
21
  <?php if ( $product->gzd_product->get_shipping_costs_html() && get_option( 'woocommerce_gzd_display_product_detail_shipping_costs' ) == 'yes' ) : ?>
22
  <span class="wc-gzd-additional-info shipping-costs-info"><?php echo $product->gzd_product->get_shipping_costs_html();?></span>
templates/single-product/small-business-info.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
- /**
3
- * Single Product Shipping Costs Info
4
- *
5
- * @author Vendidero
6
- * @package WooCommerceGermanized/Templates
7
- * @version 1.0
8
- */
9
-
10
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
-
12
- ?>
13
-
14
- <p class="wc-gzd-additional-info small-business-info"><?php _e( 'VAT free based on &#167;19 UStG', 'woocommerce-germanized' );?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/single-product/tax-info.php CHANGED
@@ -14,4 +14,6 @@ global $product;
14
 
15
  <?php if ( $product->gzd_product->get_tax_info() ) : ?>
16
  <p class="wc-gzd-additional-info tax-info"><?php echo $product->gzd_product->get_tax_info(); ?></p>
 
 
17
  <?php endif; ?>
14
 
15
  <?php if ( $product->gzd_product->get_tax_info() ) : ?>
16
  <p class="wc-gzd-additional-info tax-info"><?php echo $product->gzd_product->get_tax_info(); ?></p>
17
+ <?php elseif ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) : ?>
18
+ <p class="wc-gzd-additional-info small-business-info"><?php _e( 'VAT free based on &#167;19 UStG', 'woocommerce-germanized' );?></p>
19
  <?php endif; ?>
woocommerce-germanized.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: http://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
- * Version: 1.1.0
7
  * Author: Vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 3.8
@@ -26,7 +26,7 @@ final class WooCommerce_Germanized {
26
  *
27
  * @var string
28
  */
29
- public $version = '1.1.0';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
@@ -68,9 +68,8 @@ final class WooCommerce_Germanized {
68
  * @return WooCommerceGermanized - Main instance
69
  */
70
  public static function instance() {
71
- if ( is_null( self::$_instance ) ) {
72
  self::$_instance = new self();
73
- }
74
  return self::$_instance;
75
  }
76
 
@@ -108,15 +107,19 @@ final class WooCommerce_Germanized {
108
  public function __construct() {
109
 
110
  // Auto-load classes on demand
111
- if ( function_exists( "__autoload" ) ) {
112
  spl_autoload_register( "__autoload" );
113
- }
114
  spl_autoload_register( array( $this, 'autoload' ) );
115
 
 
 
 
 
 
116
  // Define constants
117
  $this->define_constants();
118
 
119
- include_once 'includes/class-wc-gzd-install.php';
120
 
121
  // Hooks
122
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'action_links' ) );
@@ -126,13 +129,11 @@ final class WooCommerce_Germanized {
126
  add_action( 'widgets_init', array( $this, 'include_widgets' ), 25 );
127
  add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
128
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_cart' ), 0 );
129
- add_action( 'woocommerce_init', array( $this, 'set_order_button_gateway_text' ), 1 );
130
-
131
- // Payment Gateway Filter
132
- add_filter( 'woocommerce_payment_gateways', array( $this, 'payment_gateway_filter' ), PHP_INT_MAX, 1 );
133
 
134
  // Loaded action
135
  do_action( 'woocommerce_germanized_loaded' );
 
136
  }
137
 
138
  public function deactivate() {
@@ -159,55 +160,76 @@ final class WooCommerce_Germanized {
159
  * Init WooCommerceGermanized when WordPress initializes.
160
  */
161
  public function init() {
162
- if ( $this->is_woocommerce_activated() ) {
163
- // Before init action
164
- do_action( 'before_woocommerce_germanized_init' );
165
- // Include required files
166
- $this->includes();
167
- add_filter( 'woocommerce_locate_template', array( $this, 'filter_templates' ), PHP_INT_MAX, 3 );
168
- add_filter( 'woocommerce_product_class', array( $this, 'filter_product_classes' ), PHP_INT_MAX, 4 );
169
- add_filter( 'woocommerce_get_settings_pages', array( $this, 'add_settings' ) );
170
- add_filter( 'woocommerce_enqueue_styles', array( $this, 'add_styles' ) );
171
- add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts' ) );
172
- add_action( 'wp_enqueue_scripts', array( $this, 'add_inline_styles' ) );
173
- add_action( 'admin_enqueue_scripts', array( $this, 'add_admin_styles' ) );
174
- add_action( 'wp_print_scripts', array( $this, 'localize_scripts' ), 5 );
175
- add_filter( 'woocommerce_email_classes', array( $this, 'add_emails' ) );
176
- add_filter( 'woocommerce_locate_core_template', array( $this, 'email_templates' ), 0, 3 );
177
- add_action( 'woocommerce_email_order_meta', array( $this, 'email_small_business_notice' ), 1 );
178
- // Add better tax display to order totals
179
- add_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 0, 2 );
180
- add_action( 'woocommerce_cart_calculate_fees', array( $this, 'add_fee_cart' ), 0 );
181
- // Adjust virtual Product Price and tax class
182
- add_filter( 'woocommerce_get_price_including_tax', array( $this, 'set_virtual_product_price' ), PHP_INT_MAX, 3 );
183
- add_filter( 'get_post_metadata', array( $this, 'inject_gzd_product' ), 0, 4 );
184
- // Hide cart estimated text if chosen
185
- add_action( 'woocommerce_cart_totals_after_order_total', array( $this, 'hide_cart_estimated_text' ) );
186
- add_action( 'woocommerce_after_cart_totals', array( $this, 'remove_cart_tax_zero_filter' ) );
187
-
188
- // Send order notice directly after new order is being added - use these filters because order status has to be updated already
189
- add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
190
- add_filter( 'woocommerce_checkout_no_payment_needed_redirect', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
191
-
192
- // Remove processing + on-hold default order confirmation mails
193
- $mailer = WC()->mailer();
194
- $mails = $mailer->get_emails();
195
- remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $mails[ 'WC_Email_Customer_Processing_Order' ], 'trigger' ) );
196
- remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $mails[ 'WC_Email_Customer_Processing_Order' ], 'trigger' ) );
197
- remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
198
- remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
199
- remove_action( 'woocommerce_order_status_pending_to_completed_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
200
-
201
- $this->units = new WC_GZD_Units();
202
- $this->trusted_shops = new WC_GZD_Trusted_Shops();
203
- $this->ekomi = new WC_GZD_Ekomi();
204
- $this->emails = new WC_GZD_Emails();
205
-
206
- // Init action
207
- do_action( 'woocommerce_germanized_init' );
208
- } else {
209
- add_action( 'admin_init', array( $this, 'deactivate' ), 0 );
210
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  }
212
 
213
  /**
@@ -221,13 +243,11 @@ final class WooCommerce_Germanized {
221
  $class = strtolower( $class );
222
  $file = 'class-' . str_replace( '_', '-', $class ) . '.php';
223
 
224
- if ( strpos( $class, 'wc_gzd_shipping_' ) === 0 )
225
- $path = $this->plugin_path() . '/includes/shipping/' . trailingslashit( substr( str_replace( '_', '-', $class ), 16 ) );
226
- else if ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
227
  $path = $this->plugin_path() . '/includes/gateways/' . trailingslashit( substr( str_replace( '_', '-', $class ), 15 ) );
228
 
229
  if ( $path && is_readable( $path . $file ) ) {
230
- include_once $path . $file;
231
  return;
232
  }
233
  }
@@ -272,30 +292,32 @@ final class WooCommerce_Germanized {
272
  */
273
  private function includes() {
274
 
 
 
 
275
  if ( is_admin() ) {
276
- include_once 'includes/admin/class-wc-gzd-admin.php';
277
- include_once 'includes/admin/class-wc-gzd-admin-welcome.php';
278
- include_once 'includes/admin/class-wc-gzd-admin-notices.php';
279
- include_once 'includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php';
280
- include_once 'includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php';
281
  }
282
 
283
  if ( defined( 'DOING_AJAX' ) )
284
  $this->ajax_includes();
285
 
286
  if ( ! is_admin() || defined( 'DOING_AJAX' ) )
287
- $this->frontend_includes();
288
 
289
  // Post types
290
- include_once 'includes/class-wc-gzd-post-types.php';
291
 
292
  // Abstracts
293
- include_once 'includes/abstracts/abstract-wc-gzd-product.php';
294
- include_once 'includes/abstracts/abstract-wc-gzd-payment-gateway.php';
295
 
296
- include_once 'includes/wc-gzd-core-functions.php';
297
- include_once 'includes/wc-gzd-cart-functions.php';
298
- include_once 'includes/class-wc-gzd-checkout.php';
299
 
300
  }
301
 
@@ -303,14 +325,14 @@ final class WooCommerce_Germanized {
303
  * Include required ajax files.
304
  */
305
  public function ajax_includes() {
306
- include_once 'includes/class-wc-gzd-ajax.php';
307
  }
308
 
309
  /**
310
  * Include required frontend files.
311
  */
312
  public function frontend_includes() {
313
- include_once 'includes/wc-gzd-template-hooks.php';
314
  }
315
 
316
  /**
@@ -318,7 +340,7 @@ final class WooCommerce_Germanized {
318
  */
319
  public function include_template_functions() {
320
  if ( ! is_admin() || defined( 'DOING_AJAX' ) )
321
- include_once 'includes/wc-gzd-template-functions.php';
322
  }
323
 
324
  /**
@@ -375,28 +397,6 @@ final class WooCommerce_Germanized {
375
  return true;
376
  }
377
 
378
- /**
379
- * Filter payment gateway classes to load WC_GZD_Gateway_BACS.
380
- *
381
- * @param array $gateways
382
- * @return array filtered gateway array
383
- */
384
- public function payment_gateway_filter( $gateways ) {
385
- // Needs to be included because filter is applied before WC_Germanized load
386
- include_once 'includes/abstracts/abstract-wc-gzd-payment-gateway.php';
387
- if ( ! empty( $gateways ) ) {
388
- foreach ( $gateways as $key => $gateway ) {
389
- if ( $gateway == 'WC_Gateway_BACS' )
390
- $gateways[ $key ] = 'WC_GZD_Gateway_BACS';
391
- else if ( $gateway == 'WC_Gateway_COD' )
392
- $gateways[ $key ] = 'WC_GZD_Gateway_COD';
393
- else if ( $gateway == 'WC_Gateway_Paypal' )
394
- $gateways[ $key ] = 'WC_GZD_Gateway_Paypal';
395
- }
396
- }
397
- return $gateways;
398
- }
399
-
400
  /**
401
  * Inject WC_GZD_Product into WC_Product by filtering postmeta
402
  *
@@ -512,9 +512,9 @@ final class WooCommerce_Germanized {
512
  */
513
  public function include_widgets() {
514
  if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_rich_snippets_enabled() )
515
- include_once 'includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php';
516
  if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_review_widget_enabled() )
517
- include_once 'includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php';
518
  }
519
 
520
  /**
@@ -603,7 +603,7 @@ final class WooCommerce_Germanized {
603
  * @return array
604
  */
605
  public function add_settings( $integrations ) {
606
- include_once 'includes/admin/settings/class-wc-gzd-settings-germanized.php';
607
  $integrations[] = new WC_GZD_Settings_Germanized();
608
  return $integrations;
609
  }
@@ -691,20 +691,17 @@ final class WooCommerce_Germanized {
691
  return $product->get_price() * $qty;
692
  return $price;
693
  }
694
-
695
  /**
696
  * Update fee for cart if feeable gateway has been selected as payment method
697
  */
698
  public function add_fee_cart() {
699
- if ( in_array( WC()->session->get('chosen_payment_method'), $this->get_payment_gateways_feeable() ) ) {
700
- $key = WC()->session->get('chosen_payment_method');
701
- $gateways = WC()->payment_gateways()->get_available_payment_gateways();
702
- if ( isset( $gateways[ $key ] ) ) {
703
- $gateway = $gateways[ $key ];
704
- if ( is_callable( array( $gateway, 'add_fee' ) ) )
705
- $gateway->add_fee();
706
- }
707
- }
708
  }
709
 
710
  /**
@@ -731,14 +728,14 @@ final class WooCommerce_Germanized {
731
  } else {
732
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
733
  $base_rate = (object) $base_rate[0];
734
- $base_rate->rate = $base_rate->rate . '%';
735
  $tax_array[] = array( 'tax' => $base_rate, 'amount' => wc_price( $order->get_total_tax() ) );
736
  }
737
 
738
  if ( ! empty( $tax_array ) ) {
739
  foreach ( $tax_array as $tax ) {
740
  $order_totals['tax_' . $tax['tax']->label] = array(
741
- 'label' => '<span class="tax small tax-label">' . sprintf( __( 'incl. %s VAT', 'woocommerce-germanized' ), $tax[ 'tax' ]->rate ) . '</span>',
742
  'value' => '<span class="tax small tax-value">' . $tax[ 'amount' ] . '</span>'
743
  );
744
  }
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: http://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
+ * Version: 1.1.1
7
  * Author: Vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 3.8
26
  *
27
  * @var string
28
  */
29
+ public $version = '1.1.1';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
68
  * @return WooCommerceGermanized - Main instance
69
  */
70
  public static function instance() {
71
+ if ( is_null( self::$_instance ) )
72
  self::$_instance = new self();
 
73
  return self::$_instance;
74
  }
75
 
107
  public function __construct() {
108
 
109
  // Auto-load classes on demand
110
+ if ( function_exists( "__autoload" ) )
111
  spl_autoload_register( "__autoload" );
 
112
  spl_autoload_register( array( $this, 'autoload' ) );
113
 
114
+ if ( ! $this->is_woocommerce_activated() ) {
115
+ add_action( 'admin_init', array( $this, 'deactivate' ), 0 );
116
+ return;
117
+ }
118
+
119
  // Define constants
120
  $this->define_constants();
121
 
122
+ $this->includes();
123
 
124
  // Hooks
125
  add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'action_links' ) );
129
  add_action( 'widgets_init', array( $this, 'include_widgets' ), 25 );
130
  add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
131
  add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_cart' ), 0 );
132
+ add_action( 'woocommerce_init', array( $this, 'replace_woocommerce_payment_gateways' ), 0 );
 
 
 
133
 
134
  // Loaded action
135
  do_action( 'woocommerce_germanized_loaded' );
136
+
137
  }
138
 
139
  public function deactivate() {
160
  * Init WooCommerceGermanized when WordPress initializes.
161
  */
162
  public function init() {
163
+ // Before init action
164
+ do_action( 'before_woocommerce_germanized_init' );
165
+
166
+ add_filter( 'woocommerce_locate_template', array( $this, 'filter_templates' ), PHP_INT_MAX, 3 );
167
+ add_filter( 'woocommerce_product_class', array( $this, 'filter_product_classes' ), PHP_INT_MAX, 4 );
168
+ add_filter( 'woocommerce_get_settings_pages', array( $this, 'add_settings' ) );
169
+ add_filter( 'woocommerce_enqueue_styles', array( $this, 'add_styles' ) );
170
+ add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts' ) );
171
+ add_action( 'wp_enqueue_scripts', array( $this, 'add_inline_styles' ) );
172
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_admin_styles' ) );
173
+ add_action( 'wp_print_scripts', array( $this, 'localize_scripts' ), 5 );
174
+ add_filter( 'woocommerce_email_classes', array( $this, 'add_emails' ) );
175
+ add_filter( 'woocommerce_locate_core_template', array( $this, 'email_templates' ), 0, 3 );
176
+ add_action( 'woocommerce_email_order_meta', array( $this, 'email_small_business_notice' ), 1 );
177
+
178
+ // Add better tax display to order totals
179
+ add_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 0, 2 );
180
+ add_action( 'woocommerce_cart_calculate_fees', array( $this, 'add_fee_cart' ), 0 );
181
+
182
+ // Adjust virtual Product Price and tax class
183
+ add_filter( 'woocommerce_get_price_including_tax', array( $this, 'set_virtual_product_price' ), PHP_INT_MAX, 3 );
184
+ add_filter( 'get_post_metadata', array( $this, 'inject_gzd_product' ), 0, 4 );
185
+
186
+ // Hide cart estimated text if chosen
187
+ add_action( 'woocommerce_cart_totals_after_order_total', array( $this, 'hide_cart_estimated_text' ) );
188
+ add_action( 'woocommerce_after_cart_totals', array( $this, 'remove_cart_tax_zero_filter' ) );
189
+
190
+ // Add better WooCommerce shipping taxation
191
+ // add_filter( 'woocommerce_package_rates', array( $this, 'replace_shipping_rate_class' ), 0, 2 );
192
+
193
+ // Send order notice directly after new order is being added - use these filters because order status has to be updated already
194
+ add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
195
+ add_filter( 'woocommerce_checkout_no_payment_needed_redirect', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
196
+
197
+ // Remove processing + on-hold default order confirmation mails
198
+ $mailer = WC()->mailer();
199
+ $mails = $mailer->get_emails();
200
+ remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $mails[ 'WC_Email_Customer_Processing_Order' ], 'trigger' ) );
201
+ remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $mails[ 'WC_Email_Customer_Processing_Order' ], 'trigger' ) );
202
+ remove_action( 'woocommerce_order_status_pending_to_processing_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
203
+ remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
204
+ remove_action( 'woocommerce_order_status_pending_to_completed_notification', array( $mails[ 'WC_Email_New_Order' ], 'trigger' ) );
205
+
206
+ $this->units = new WC_GZD_Units();
207
+ $this->trusted_shops = new WC_GZD_Trusted_Shops();
208
+ $this->ekomi = new WC_GZD_Ekomi();
209
+ $this->emails = new WC_GZD_Emails();
210
+
211
+ // Init action
212
+ do_action( 'woocommerce_germanized_init' );
213
+ }
214
+
215
+ /**
216
+ * Replaces default WC_Payment_Gateways to enable dependency injection
217
+ */
218
+ public function replace_woocommerce_payment_gateways() {
219
+ WC()->payment_gateways = WC_GZD_Payment_Gateways::instance();
220
+ }
221
+
222
+ /**
223
+ * Replace default WC_Shipping_Rate to enable exact taxation for shipping costs
224
+ *
225
+ * @param array $rates containing WC_Shipping_Rate objects
226
+ * @param WC_Shipping_Rate $rate current object
227
+ * @return array
228
+ */
229
+ public function replace_shipping_rate_class( $rates, $rate ) {
230
+ foreach ( $rates as $key => $rate )
231
+ $rates[ $key ] = new WC_GZD_Shipping_Rate( $rate );
232
+ return $rates;
233
  }
234
 
235
  /**
243
  $class = strtolower( $class );
244
  $file = 'class-' . str_replace( '_', '-', $class ) . '.php';
245
 
246
+ if ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
 
 
247
  $path = $this->plugin_path() . '/includes/gateways/' . trailingslashit( substr( str_replace( '_', '-', $class ), 15 ) );
248
 
249
  if ( $path && is_readable( $path . $file ) ) {
250
+ include_once( $path . $file );
251
  return;
252
  }
253
  }
292
  */
293
  private function includes() {
294
 
295
+ include_once ( 'includes/wc-gzd-core-functions.php' );
296
+ include_once ( 'includes/class-wc-gzd-install.php' );
297
+
298
  if ( is_admin() ) {
299
+ include_once( 'includes/admin/class-wc-gzd-admin.php' );
300
+ include_once( 'includes/admin/class-wc-gzd-admin-welcome.php' );
301
+ include_once( 'includes/admin/class-wc-gzd-admin-notices.php' );
302
+ include_once( 'includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data.php' );
303
+ include_once( 'includes/admin/meta-boxes/class-wc-gzd-meta-box-product-data-variable.php' );
304
  }
305
 
306
  if ( defined( 'DOING_AJAX' ) )
307
  $this->ajax_includes();
308
 
309
  if ( ! is_admin() || defined( 'DOING_AJAX' ) )
310
+ add_action( 'init', array( $this, 'frontend_includes' ), 5 );
311
 
312
  // Post types
313
+ include_once ( 'includes/class-wc-gzd-post-types.php' );
314
 
315
  // Abstracts
316
+ include_once ( 'includes/abstracts/abstract-wc-gzd-product.php' );
317
+ include_once ( 'includes/abstracts/abstract-wc-gzd-payment-gateway.php' );
318
 
319
+ include_once ( 'includes/wc-gzd-cart-functions.php' );
320
+ include_once ( 'includes/class-wc-gzd-checkout.php' );
 
321
 
322
  }
323
 
325
  * Include required ajax files.
326
  */
327
  public function ajax_includes() {
328
+ include_once( 'includes/class-wc-gzd-ajax.php' );
329
  }
330
 
331
  /**
332
  * Include required frontend files.
333
  */
334
  public function frontend_includes() {
335
+ include_once( 'includes/wc-gzd-template-hooks.php' );
336
  }
337
 
338
  /**
340
  */
341
  public function include_template_functions() {
342
  if ( ! is_admin() || defined( 'DOING_AJAX' ) )
343
+ include_once( 'includes/wc-gzd-template-functions.php' );
344
  }
345
 
346
  /**
397
  return true;
398
  }
399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  /**
401
  * Inject WC_GZD_Product into WC_Product by filtering postmeta
402
  *
512
  */
513
  public function include_widgets() {
514
  if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_rich_snippets_enabled() )
515
+ include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php' );
516
  if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_review_widget_enabled() )
517
+ include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php' );
518
  }
519
 
520
  /**
603
  * @return array
604
  */
605
  public function add_settings( $integrations ) {
606
+ include_once( 'includes/admin/settings/class-wc-gzd-settings-germanized.php' );
607
  $integrations[] = new WC_GZD_Settings_Germanized();
608
  return $integrations;
609
  }
691
  return $product->get_price() * $qty;
692
  return $price;
693
  }
694
+
695
  /**
696
  * Update fee for cart if feeable gateway has been selected as payment method
697
  */
698
  public function add_fee_cart() {
699
+ $gateways = WC()->payment_gateways()->get_available_payment_gateways();
700
+ if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) )
701
+ return;
702
+ $gateway = $gateways[ $key ];
703
+ if ( isset( $gateway->parent ) && is_callable( array( $gateway->parent, 'add_fee' ) ) )
704
+ $gateway->parent->add_fee();
 
 
 
705
  }
706
 
707
  /**
728
  } else {
729
  $base_rate = array_values( WC_Tax::get_shop_base_rate() );
730
  $base_rate = (object) $base_rate[0];
731
+ $base_rate->rate = $base_rate->rate;
732
  $tax_array[] = array( 'tax' => $base_rate, 'amount' => wc_price( $order->get_total_tax() ) );
733
  }
734
 
735
  if ( ! empty( $tax_array ) ) {
736
  foreach ( $tax_array as $tax ) {
737
  $order_totals['tax_' . $tax['tax']->label] = array(
738
+ 'label' => '<span class="tax small tax-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' ) ) . '</span>',
739
  'value' => '<span class="tax small tax-value">' . $tax[ 'amount' ] . '</span>'
740
  );
741
  }