WooCommerce Germanized - Version 3.1.9

Version Description

  • Feature: Trusted Shops - Allow selecting multiple order statuses to send review reminder
  • Improvement: Added wc_gzd_is_small_business function
  • Improvement: Third party shipping costs compatibility for Shipments & DHL
  • Improvement: Better customer title support for Flexible Checkout Fields Plugin
  • Improvement: Use order item get_rate_percent if available
  • Improvement: Small business single product page tax notice shopmark
  • Improvement: Tax rate install adjustments
  • Improvement: Better SEPA XML error prevention
  • Fix: Remove queued Woo notices on deactivation
  • Fix: Prefer order item meta over product data
Download this release

Release Info

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

Code changes from version 3.1.8 to 3.1.9

Files changed (43) hide show
  1. includes/admin/class-wc-gzd-admin-welcome.php +17 -31
  2. includes/admin/settings/class-wc-gzd-settings-tab-general.php +2 -12
  3. includes/admin/settings/class-wc-gzd-settings-tab-taxes.php +3 -3
  4. includes/admin/views/html-page-status-germanized.php +1 -1
  5. includes/class-wc-gzd-checkout.php +7 -2
  6. includes/class-wc-gzd-install.php +23 -4
  7. includes/compatibility/class-wc-gzd-compatibility-flexible-checkout-fields.php +57 -0
  8. includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php +54 -44
  9. includes/updates/woocommerce-gzd-update-3.1.9.php +19 -0
  10. includes/wc-gzd-cart-functions.php +14 -14
  11. includes/wc-gzd-core-functions.php +41 -0
  12. includes/wc-gzd-template-functions.php +7 -0
  13. includes/wc-gzd-template-hooks.php +12 -1
  14. packages/woocommerce-germanized-dhl/src/Package.php +1 -1
  15. packages/woocommerce-germanized-dhl/src/ParcelLocator.php +24 -12
  16. packages/woocommerce-germanized-dhl/woocommerce-germanized-dhl.php +1 -1
  17. packages/woocommerce-germanized-shipments/assets/js/admin-shipment-label-backbone.min.js +1 -1
  18. packages/woocommerce-germanized-shipments/assets/js/admin-shipment.min.js +1 -1
  19. packages/woocommerce-germanized-shipments/assets/js/admin-shipments.min.js +1 -1
  20. packages/woocommerce-germanized-shipments/assets/js/admin-shipping-provider-method.js +4 -0
  21. packages/woocommerce-germanized-shipments/assets/js/admin-shipping-provider-method.min.js +1 -1
  22. packages/woocommerce-germanized-shipments/assets/js/admin-shipping-providers.min.js +1 -1
  23. packages/woocommerce-germanized-shipments/includes/wc-gzd-shipment-functions.php +15 -2
  24. packages/woocommerce-germanized-shipments/src/Admin/Admin.php +1 -1
  25. packages/woocommerce-germanized-shipments/src/Package.php +5 -1
  26. packages/woocommerce-germanized-shipments/woocommerce-germanized-shipments.php +1 -1
  27. packages/woocommerce-trusted-shops/includes/class-wc-trusted-shops-admin.php +2 -2
  28. packages/woocommerce-trusted-shops/includes/class-wc-trusted-shops-schedule.php +11 -2
  29. packages/woocommerce-trusted-shops/includes/class-wc-ts-install.php +2 -1
  30. packages/woocommerce-trusted-shops/includes/updates/woocommerce-ts-update-4.0.6.php +14 -0
  31. packages/woocommerce-trusted-shops/src/Package.php +1 -1
  32. packages/woocommerce-trusted-shops/woocommerce-trusted-shops.php +1 -1
  33. readme.txt +13 -1
  34. templates/footer/vat-info.php +2 -2
  35. templates/single-product/legal-info.php +2 -2
  36. templates/single-product/tax-info.php +2 -2
  37. vendor/autoload.php +1 -1
  38. vendor/autoload_packages.php +2 -2
  39. vendor/composer/autoload_classmap_package.php +68 -68
  40. vendor/composer/autoload_real.php +4 -4
  41. vendor/composer/autoload_static.php +4 -4
  42. vendor/composer/installed.json +21 -21
  43. woocommerce-germanized.php +10 -17
includes/admin/class-wc-gzd-admin-welcome.php CHANGED
@@ -136,38 +136,24 @@ class WC_GZD_Admin_Welcome {
136
  </p>
137
 
138
  <div class="changelog new-feature">
139
- <h3>Neu: Rücksendeanträge von Kunden entgegennehmen</h3>
140
-
141
- <div class="columns two-col">
142
- <div class="col">
143
- <p>
144
- Germanized ermöglicht über das <a href="<?php echo admin_url( 'admin.php?page=wc-gzd-return-shipments' ); ?>" target="_blank">Retouren-Dashboard</a> eine übersichtliche Abwicklung von Retouren.
145
- Mit dem neuesten Update gehen wir den nächsten Schritt: Du kannst nun optional Rücksendeanträge von Kunden und Gästen entgegennehmen.
146
- </p>
147
- <p>
148
- Damit lässt sich die <strong>Abwicklung von Retouren komplett automatisieren</strong>. Der Kunde kann seine Retoure über den Kundenbereich aufgeben
149
- und dabei die gewünschten Produkte samt Anzahl und Rücksendegrund aus der Bestellung auswählen. Du kannst den Rücksendeantrag dann im Retouren-Dashboard
150
- einsehen und freigeben. Falls du unsere DHL-Integration verwendest, kannst du zu Retouren automatisch Labels erzeugen lassen und das Label dem Kunden als Anhang der
151
- Bestätigungs-Mail bzw. als Download bereitstellen.
152
- </p>
153
-
154
- <div class="wc-germanized-welcome-pro">
155
- <a href="https://vendidero.de/woocommerce-germanized" target="_blank"
156
- class="button button-primary wc-gzd-button"><span class="wc-gzd-pro">pro</span> Version
157
- entdecken</a>
158
- <p class="price smaller">ab 69 € inkl. MwSt. - inkl. 1 Jahr Updates & Premium
159
- Support!</p>
160
- </div>
161
 
162
- <div class="wc-gzd-actions">
163
- <a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=germanized-shipments#shipments_return_options-description' ); ?>"
164
- class="button button-primary" target="_blank">Einstellungen anpassen</a>
165
- <a href="https://vendidero.de/dokument/retouren-konfigurieren-und-verwalten" class="button button-primary" target="_blank">Mehr erfahren</a>
166
- </div>
167
- </div>
168
- <div class="col align-center">
169
- <img src="<?php echo WC_germanized()->plugin_url(); ?>/assets/images/add-return-request.png"/>
170
- </div>
171
  </div>
172
  </div>
173
 
136
  </p>
137
 
138
  <div class="changelog new-feature">
139
+ <h3>Hinweis: Mehrwertsteuersenkung in Deutschland</h3>
140
+
141
+ <p>
142
+ Damit ihr, was die Mehrwertsteuersenkung im Rahmen der Corona-Pandemie angeht, nicht in Zeitnot geratet, haben wir euch in unserem <a href="https://vendidero.de/senkung-der-mehrwertsteuer-in-woocommerce-im-rahmen-der-corona-pandemie" target="_blank">Blog-Eintrag</a> einige
143
+ Möglichkeiten zur <a href="https://vendidero.de/senkung-der-mehrwertsteuer-in-woocommerce-im-rahmen-der-corona-pandemie#automatisches-update-der-steuersaetze" target="_blank">automatischen</a> oder manuellen Anpassung der Mehrwertsteuersätze in WooCommerce bereitgestellt.
144
+ Mit Hilfe unseres kleinen Zusatz-Plugins könnt ihr eure Steuersätze einfach über Nacht automatisch anpassen lassen und damit hoffentlich ruhig(er) schlafen. Wir wünschen euch weiterhin viel Erfolg!
145
+ </p>
146
+
147
+ <div class="wc-germanized-welcome-pro">
148
+ <a href="https://vendidero.de/woocommerce-germanized" target="_blank"
149
+ class="button button-primary wc-gzd-button"><span class="wc-gzd-pro">pro</span> Version
150
+ entdecken</a>
151
+ <p class="price smaller">ab 69 € inkl. MwSt. - inkl. 1 Jahr Updates & Premium
152
+ Support!</p>
153
+ </div>
 
 
 
 
 
 
 
154
 
155
+ <div class="wc-gzd-actions">
156
+ <a href="https://vendidero.de/senkung-der-mehrwertsteuer-in-woocommerce-im-rahmen-der-corona-pandemie" class="button button-primary" target="_blank">Mehr erfahren</a>
 
 
 
 
 
 
 
157
  </div>
158
  </div>
159
 
includes/admin/settings/class-wc-gzd-settings-tab-general.php CHANGED
@@ -205,16 +205,6 @@ class WC_GZD_Settings_Tab_General extends WC_GZD_Settings_Tab {
205
  'default' => 'no',
206
  'type' => 'gzd_toggle',
207
  ),
208
- array(
209
- 'title' => __( 'No VAT notice', 'woocommerce-germanized' ),
210
- 'desc' => __( 'Show no VAT &#167;19 UStG notice on single product page.', 'woocommerce-germanized' ),
211
- 'id' => 'woocommerce_gzd_display_product_detail_small_enterprise',
212
- 'type' => 'gzd_toggle',
213
- 'custom_attributes' => array(
214
- 'data-show_if_woocommerce_gzd_small_enterprise' => '',
215
- ),
216
- 'default' => 'no',
217
- ),
218
  array(
219
  'title' => __( 'Notice Text', 'woocommerce-germanized' ),
220
  'desc' => __( 'You may want to adjust the small buisness notice text to meet your criteria.', 'woocommerce-germanized' ),
@@ -412,9 +402,9 @@ class WC_GZD_Settings_Tab_General extends WC_GZD_Settings_Tab {
412
 
413
  protected function before_save( $settings, $current_section = '' ) {
414
  if ( 'small_business' === $current_section ) {
415
- if ( 'no' === get_option( 'woocommerce_gzd_small_enterprise' ) && ! empty( $_POST['woocommerce_gzd_small_enterprise'] ) ) {
416
  WC_GZD_Admin::instance()->enable_small_business_options();
417
- } elseif ( 'yes' === get_option( 'woocommerce_gzd_small_enterprise' ) && ! isset( $_POST['woocommerce_gzd_small_enterprise'] ) ) {
418
  WC_GZD_Admin::instance()->disable_small_business_options();
419
  }
420
  }
205
  'default' => 'no',
206
  'type' => 'gzd_toggle',
207
  ),
 
 
 
 
 
 
 
 
 
 
208
  array(
209
  'title' => __( 'Notice Text', 'woocommerce-germanized' ),
210
  'desc' => __( 'You may want to adjust the small buisness notice text to meet your criteria.', 'woocommerce-germanized' ),
402
 
403
  protected function before_save( $settings, $current_section = '' ) {
404
  if ( 'small_business' === $current_section ) {
405
+ if ( ! wc_gzd_is_small_business() && ! empty( $_POST['woocommerce_gzd_small_enterprise'] ) ) {
406
  WC_GZD_Admin::instance()->enable_small_business_options();
407
+ } elseif ( wc_gzd_is_small_business() && ! isset( $_POST['woocommerce_gzd_small_enterprise'] ) ) {
408
  WC_GZD_Admin::instance()->disable_small_business_options();
409
  }
410
  }
includes/admin/settings/class-wc-gzd-settings-tab-taxes.php CHANGED
@@ -34,7 +34,7 @@ class WC_GZD_Settings_Tab_Taxes extends WC_GZD_Settings_Tab {
34
  }
35
 
36
  protected function get_vat_settings() {
37
- $virtual_vat = 'yes' === get_option( 'woocommerce_gzd_small_enterprise' ) ? array() : array(
38
  'title' => __( 'Virtual VAT', 'woocommerce-germanized' ),
39
  'desc' => __( 'Enable if you want to charge your customer\'s countries\' VAT for virtual products.', 'woocommerce-germanized' ) . '<div class="wc-gzd-additional-desc">' . sprintf( __( 'New EU VAT rule applies on 01.01.2015. Make sure that every digital or virtual product has chosen the right tax class (Virtual Rate or Virtual Reduced Rate). Gross prices will not differ from the prices you have chosen for affected products. In fact the net price will differ depending on the VAT rate of your customers\' country. Shop settings will be adjusted to show prices including tax. More information can be found <a href="%s" target="_blank">here</a>.', 'woocommerce-germanized' ), 'http://ec.europa.eu/taxation_customs/taxation/vat/how_vat_works/telecom/index_de.htm#new_rules' ) . '</div>',
40
  'id' => 'woocommerce_gzd_enable_virtual_vat',
@@ -196,7 +196,7 @@ class WC_GZD_Settings_Tab_Taxes extends WC_GZD_Settings_Tab {
196
  protected function before_save( $settings, $current_section = '' ) {
197
  if ( '' === $current_section ) {
198
  if ( 'yes' !== get_option( 'woocommerce_gzd_enable_virtual_vat' ) && ! empty( $_POST['woocommerce_gzd_enable_virtual_vat'] ) ) {
199
- if ( 'no' === get_option( 'woocommerce_gzd_small_enterprise' ) ) {
200
  // Update WooCommerce options to show prices including taxes
201
  update_option( 'woocommerce_prices_include_tax', 'yes' );
202
  update_option( 'woocommerce_tax_display_shop', 'incl' );
@@ -211,7 +211,7 @@ class WC_GZD_Settings_Tab_Taxes extends WC_GZD_Settings_Tab {
211
 
212
  protected function after_save( $settings, $current_section = '' ) {
213
  if ( '' === $current_section ) {
214
- if ( 'yes' === get_option( 'woocommerce_gzd_small_enterprise' ) ) {
215
  if ( ! empty( $_POST['woocommerce_gzd_enable_virtual_vat'] ) ) {
216
  update_option( 'woocommerce_gzd_enable_virtual_vat', 'no' );
217
  WC_Admin_Settings::add_error( __( 'Sorry, but the new Virtual VAT rules cannot be applied to small business.', 'woocommerce-germanized' ) );
34
  }
35
 
36
  protected function get_vat_settings() {
37
+ $virtual_vat = wc_gzd_is_small_business() ? array() : array(
38
  'title' => __( 'Virtual VAT', 'woocommerce-germanized' ),
39
  'desc' => __( 'Enable if you want to charge your customer\'s countries\' VAT for virtual products.', 'woocommerce-germanized' ) . '<div class="wc-gzd-additional-desc">' . sprintf( __( 'New EU VAT rule applies on 01.01.2015. Make sure that every digital or virtual product has chosen the right tax class (Virtual Rate or Virtual Reduced Rate). Gross prices will not differ from the prices you have chosen for affected products. In fact the net price will differ depending on the VAT rate of your customers\' country. Shop settings will be adjusted to show prices including tax. More information can be found <a href="%s" target="_blank">here</a>.', 'woocommerce-germanized' ), 'http://ec.europa.eu/taxation_customs/taxation/vat/how_vat_works/telecom/index_de.htm#new_rules' ) . '</div>',
40
  'id' => 'woocommerce_gzd_enable_virtual_vat',
196
  protected function before_save( $settings, $current_section = '' ) {
197
  if ( '' === $current_section ) {
198
  if ( 'yes' !== get_option( 'woocommerce_gzd_enable_virtual_vat' ) && ! empty( $_POST['woocommerce_gzd_enable_virtual_vat'] ) ) {
199
+ if ( ! wc_gzd_is_small_business() ) {
200
  // Update WooCommerce options to show prices including taxes
201
  update_option( 'woocommerce_prices_include_tax', 'yes' );
202
  update_option( 'woocommerce_tax_display_shop', 'incl' );
211
 
212
  protected function after_save( $settings, $current_section = '' ) {
213
  if ( '' === $current_section ) {
214
+ if ( wc_gzd_is_small_business() ) {
215
  if ( ! empty( $_POST['woocommerce_gzd_enable_virtual_vat'] ) ) {
216
  update_option( 'woocommerce_gzd_enable_virtual_vat', 'no' );
217
  WC_Admin_Settings::add_error( __( 'Sorry, but the new Virtual VAT rules cannot be applied to small business.', 'woocommerce-germanized' ) );
includes/admin/views/html-page-status-germanized.php CHANGED
@@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) {
44
  :
45
  </td>
46
  <td class="help">&nbsp;</td>
47
- <td><?php echo 'yes' === get_option( 'woocommerce_gzd_small_enterprise' ) ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">' . '&ndash;' . '</mark>'; ?></td>
48
  </tr>
49
  <tr>
50
  <td data-export-label="Default Delivery Time"><?php _e( 'Default Delivery Time', 'woocommerce-germanized' ); ?>
44
  :
45
  </td>
46
  <td class="help">&nbsp;</td>
47
+ <td><?php echo ( wc_gzd_is_small_business() ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">' . '&ndash;' . '</mark>' ); ?></td>
48
  </tr>
49
  <tr>
50
  <td data-export-label="Default Delivery Time"><?php _e( 'Default Delivery Time', 'woocommerce-germanized' ); ?>
includes/class-wc-gzd-checkout.php CHANGED
@@ -38,6 +38,7 @@ class WC_GZD_Checkout {
38
  public function __construct() {
39
 
40
  add_action( 'init', array( $this, 'init_fields' ), 30 );
 
41
  add_filter( 'woocommerce_billing_fields', array( $this, 'set_custom_fields' ), 0, 1 );
42
  add_filter( 'woocommerce_shipping_fields', array( $this, 'set_custom_fields_shipping' ), 0, 1 );
43
 
@@ -57,6 +58,7 @@ class WC_GZD_Checkout {
57
  $this,
58
  'set_formatted_shipping_address'
59
  ), 0, 2 );
 
60
  add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'set_formatted_address' ), 0, 2 );
61
 
62
  // Support Checkout Field Managers (which are unable to map options to values)
@@ -856,8 +858,11 @@ class WC_GZD_Checkout {
856
  if ( isset( $args['title'] ) ) {
857
  $placeholder['{title}'] = $args['title'];
858
  $placeholder['{title_upper}'] = strtoupper( $args['title'] );
859
- $placeholder['{name}'] = $placeholder['{title}'] . ' ' . $placeholder['{name}'];
860
- $placeholder['{name_upper}'] = $placeholder['{title_upper}'] . ' ' . $placeholder['{name_upper}'];
 
 
 
861
  }
862
 
863
  return $placeholder;
38
  public function __construct() {
39
 
40
  add_action( 'init', array( $this, 'init_fields' ), 30 );
41
+
42
  add_filter( 'woocommerce_billing_fields', array( $this, 'set_custom_fields' ), 0, 1 );
43
  add_filter( 'woocommerce_shipping_fields', array( $this, 'set_custom_fields_shipping' ), 0, 1 );
44
 
58
  $this,
59
  'set_formatted_shipping_address'
60
  ), 0, 2 );
61
+
62
  add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'set_formatted_address' ), 0, 2 );
63
 
64
  // Support Checkout Field Managers (which are unable to map options to values)
858
  if ( isset( $args['title'] ) ) {
859
  $placeholder['{title}'] = $args['title'];
860
  $placeholder['{title_upper}'] = strtoupper( $args['title'] );
861
+
862
+ if ( strpos( $placeholder['{name}'], '{title}' ) === false ) {
863
+ $placeholder['{name}'] = $placeholder['{title}'] . ' ' . $placeholder['{name}'];
864
+ $placeholder['{name_upper}'] = $placeholder['{title_upper}'] . ' ' . $placeholder['{name_upper}'];
865
+ }
866
  }
867
 
868
  return $placeholder;
includes/class-wc-gzd-install.php CHANGED
@@ -35,7 +35,8 @@ if ( ! class_exists( 'WC_GZD_Install' ) ) :
35
  '3.0.1' => 'updates/woocommerce-gzd-update-3.0.1.php',
36
  '3.0.6' => 'updates/woocommerce-gzd-update-3.0.6.php',
37
  '3.0.8' => 'updates/woocommerce-gzd-update-3.0.8.php',
38
- '3.1.6' => 'updates/woocommerce-gzd-update-3.1.6.php'
 
39
  );
40
 
41
  /**
@@ -302,6 +303,15 @@ if ( ! class_exists( 'WC_GZD_Install' ) ) :
302
  $tools_controller = new WC_REST_System_Status_Tools_Controller;
303
  $tools_controller->execute_tool( 'clear_sessions' );
304
  }
 
 
 
 
 
 
 
 
 
305
  }
306
 
307
  /**
@@ -554,18 +564,27 @@ if ( ! class_exists( 'WC_GZD_Install' ) ) :
554
  }
555
  }
556
 
557
- public static function create_tax_rates() {
558
  $countries = WC()->countries->get_european_union_countries();
559
 
 
 
 
 
 
 
 
 
560
  foreach ( $countries as $key => $country ) {
561
- $countries[ $country ] = WC()->countries->get_base_country() === 'AT' ? 20 : 19;
 
562
  unset( $countries[ $key ] );
563
  }
564
 
565
  self::import_rates( $countries, '' );
566
 
567
  foreach ( $countries as $key => $country ) {
568
- $countries[ $key ] = WC()->countries->get_base_country() === 'AT' ? 10 : 7;
569
  }
570
 
571
  self::import_rates( $countries, 'reduced-rate' );
35
  '3.0.1' => 'updates/woocommerce-gzd-update-3.0.1.php',
36
  '3.0.6' => 'updates/woocommerce-gzd-update-3.0.6.php',
37
  '3.0.8' => 'updates/woocommerce-gzd-update-3.0.8.php',
38
+ '3.1.6' => 'updates/woocommerce-gzd-update-3.1.6.php',
39
+ '3.1.9' => 'updates/woocommerce-gzd-update-3.1.9.php'
40
  );
41
 
42
  /**
303
  $tools_controller = new WC_REST_System_Status_Tools_Controller;
304
  $tools_controller->execute_tool( 'clear_sessions' );
305
  }
306
+
307
+ /**
308
+ * Remove notices.
309
+ */
310
+ $notices = WC_GZD_Admin_Notices::instance();
311
+
312
+ foreach( $notices->get_notes() as $note ) {
313
+ $note->delete_note();
314
+ }
315
  }
316
 
317
  /**
564
  }
565
  }
566
 
567
+ public static function create_tax_rates( $tax_rate = '', $tax_rate_reduced = '' ) {
568
  $countries = WC()->countries->get_european_union_countries();
569
 
570
+ if ( empty( $tax_rate ) || ! is_numeric( $tax_rate ) ) {
571
+ $tax_rate = WC()->countries->get_base_country() === 'AT' ? 20 : 19;
572
+ }
573
+
574
+ if ( empty( $tax_rate_reduced ) || ! is_numeric( $tax_rate_reduced ) ) {
575
+ $tax_rate_reduced = WC()->countries->get_base_country() === 'AT' ? 10 : 7;
576
+ }
577
+
578
  foreach ( $countries as $key => $country ) {
579
+ $countries[ $country ] = $tax_rate;
580
+
581
  unset( $countries[ $key ] );
582
  }
583
 
584
  self::import_rates( $countries, '' );
585
 
586
  foreach ( $countries as $key => $country ) {
587
+ $countries[ $key ] = $tax_rate_reduced;
588
  }
589
 
590
  self::import_rates( $countries, 'reduced-rate' );
includes/compatibility/class-wc-gzd-compatibility-flexible-checkout-fields.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Compatibility script for https://wordpress.org/plugins/flexible-checkout-fields/
5
+ *
6
+ * @class WC_GZD_Compatibility_Flexible_Checkout_Fields
7
+ * @category Class
8
+ * @author vendidero
9
+ */
10
+ class WC_GZD_Compatibility_Flexible_Checkout_Fields extends WC_GZD_Compatibility {
11
+
12
+ public static function get_name() {
13
+ return 'Flexible Checkout Fields';
14
+ }
15
+
16
+ public static function get_path() {
17
+ return 'flexible-checkout-fields/flexible-checkout-fields.php';
18
+ }
19
+
20
+ public function load() {
21
+ /**
22
+ * Use a very high priority here to ensure we are hooking after Flexible Checkout Fields.
23
+ */
24
+ $priority = 999999;
25
+
26
+ // Add Title to billing address format
27
+ add_filter( 'woocommerce_order_formatted_billing_address', array(
28
+ WC_GZD_Checkout::instance(),
29
+ 'set_formatted_billing_address'
30
+ ), $priority, 2 );
31
+
32
+ add_filter( 'woocommerce_order_formatted_shipping_address', array(
33
+ WC_GZD_Checkout::instance(),
34
+ 'set_formatted_shipping_address'
35
+ ), $priority, 2 );
36
+
37
+ /**
38
+ * Prevent double-adding format.
39
+ */
40
+ remove_filter( 'woocommerce_formatted_address_replacements', array( WC_GZD_Checkout::instance(), 'set_formatted_address' ), 0, 2 );
41
+ add_filter( 'woocommerce_formatted_address_replacements', array( WC_GZD_Checkout::instance(), 'set_formatted_address' ), $priority, 2 );
42
+
43
+ /**
44
+ * Remove title from formatted customer address
45
+ */
46
+ add_filter( 'flexible_checkout_fields_user_meta_display_value', array( $this, 'filter_customer_title' ), 10, 2 );
47
+ }
48
+
49
+ public function filter_customer_title( $meta_value, $field ) {
50
+
51
+ if ( in_array( $field['name'], array( 'billing_title', 'shipping_title' ) ) ) {
52
+ return '';
53
+ }
54
+
55
+ return $meta_value;
56
+ }
57
+ }
includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php CHANGED
@@ -430,6 +430,11 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
430
  // Group orders by their mandate type to only add one payment per mandate type group.
431
  $mandate_type_groups = array();
432
 
 
 
 
 
 
433
  while ( $order_query->have_posts() ) {
434
 
435
  $order_query->next_post();
@@ -448,62 +453,71 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
448
  array_push( $mandate_type_groups[ $mandate_type ], $order );
449
  }
450
 
451
- foreach ( $mandate_type_groups as $mandate_type => $orders ) {
 
452
 
453
- $payment_id = 'PMT-ID-' . date( 'YmdHis', time() ) . '-' . strtolower( $mandate_type );
454
-
455
- /**
456
- * Filter that allows adjusting direct debit SEPA XML Export payment data.
457
- *
458
- * @param array $args Payment arguments.
459
- * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
460
- * @param string $mandate_type The mandate type.
461
- *
462
- * @since 1.8.5
463
- *
464
- */
465
- $directDebit->addPaymentInfo( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_payment_args', array(
466
- 'id' => $payment_id,
467
- 'creditorName' => $this->company_account_holder,
468
- 'creditorAccountIBAN' => strtoupper( $this->clean_whitespaces( $this->company_account_iban ) ),
469
- 'creditorAgentBIC' => strtoupper( $this->clean_whitespaces( $this->company_account_bic ) ),
470
- 'seqType' => $mandate_type,
471
- 'creditorId' => $this->clean_whitespaces( $this->company_identification_number ),
472
- 'dueDate' => date_i18n( 'Y-m-d', $this->get_debit_date( $order ) ),
473
- ), $this, $mandate_type ) );
474
-
475
- foreach ( $orders as $order ) {
476
 
477
  /**
478
- * Filter that allows adjusting direct debit SEPA XML Export transfer data per order.
479
  *
480
- * @param array $args Transfer data.
481
  * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
482
- * @param WC_Order $order The order object.
483
  *
484
  * @since 1.8.5
485
  *
486
  */
487
- $directDebit->addTransfer( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_transfer_args', array(
488
- 'amount' => $order->get_total(),
489
- 'debtorIban' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( $order->get_meta( '_direct_debit_iban' ) ) ) ),
490
- 'debtorBic' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( $order->get_meta( '_direct_debit_bic' ) ) ) ),
491
- 'debtorName' => $order->get_meta( '_direct_debit_holder' ),
492
- 'debtorMandate' => $this->get_mandate_id( $order ),
493
- 'debtorMandateSignDate' => date_i18n( 'Y-m-d', $this->get_mandate_sign_date( $order ) ),
 
 
 
 
 
494
  /**
495
- * Filter that allows adjusting the purpose of a SEPA direct debit.
496
  *
497
- * @param string $purpose The SEPA purpose.
 
498
  * @param WC_Order $order The order object.
499
  *
500
  * @since 1.8.5
501
  *
502
  */
503
- 'remittanceInformation' => apply_filters( 'woocommerce_germanized_direct_debit_purpose', sprintf( __( 'Order %s', 'woocommerce-germanized' ), $order->get_order_number() ), $order ),
504
- ), $this, $order ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
505
  }
506
- }
 
 
 
 
 
 
 
507
  }
508
 
509
  header( 'Content-Description: File Transfer' );
@@ -512,11 +526,7 @@ Please notice: Period for pre-information of the SEPA direct debit is shortened
512
  header( 'Cache-Control: no-cache, no-store, must-revalidate' );
513
  header( 'Pragma: no-cache' );
514
  header( 'Expires: 0' );
515
-
516
- if ( $directDebit ) {
517
- echo $directDebit->asXML();
518
- }
519
-
520
  exit();
521
  }
522
 
430
  // Group orders by their mandate type to only add one payment per mandate type group.
431
  $mandate_type_groups = array();
432
 
433
+ /**
434
+ * The XML to output
435
+ */
436
+ $direct_debit_xml = '';
437
+
438
  while ( $order_query->have_posts() ) {
439
 
440
  $order_query->next_post();
453
  array_push( $mandate_type_groups[ $mandate_type ], $order );
454
  }
455
 
456
+ try {
457
+ foreach ( $mandate_type_groups as $mandate_type => $orders ) {
458
 
459
+ $payment_id = 'PMT-ID-' . date( 'YmdHis', time() ) . '-' . strtolower( $mandate_type );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
 
461
  /**
462
+ * Filter that allows adjusting direct debit SEPA XML Export payment data.
463
  *
464
+ * @param array $args Payment arguments.
465
  * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
466
+ * @param string $mandate_type The mandate type.
467
  *
468
  * @since 1.8.5
469
  *
470
  */
471
+ $directDebit->addPaymentInfo( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_payment_args', array(
472
+ 'id' => $payment_id,
473
+ 'creditorName' => $this->company_account_holder,
474
+ 'creditorAccountIBAN' => strtoupper( $this->clean_whitespaces( $this->company_account_iban ) ),
475
+ 'creditorAgentBIC' => strtoupper( $this->clean_whitespaces( $this->company_account_bic ) ),
476
+ 'seqType' => $mandate_type,
477
+ 'creditorId' => $this->clean_whitespaces( $this->company_identification_number ),
478
+ 'dueDate' => date_i18n( 'Y-m-d', $this->get_debit_date( $order ) ),
479
+ ), $this, $mandate_type ) );
480
+
481
+ foreach ( $orders as $order ) {
482
+
483
  /**
484
+ * Filter that allows adjusting direct debit SEPA XML Export transfer data per order.
485
  *
486
+ * @param array $args Transfer data.
487
+ * @param WC_GZD_Gateway_Direct_Debit $gateway The gateway instance.
488
  * @param WC_Order $order The order object.
489
  *
490
  * @since 1.8.5
491
  *
492
  */
493
+ $directDebit->addTransfer( $payment_id, apply_filters( 'woocommerce_gzd_direct_debit_sepa_xml_exporter_transfer_args', array(
494
+ 'amount' => $order->get_total(),
495
+ 'debtorIban' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( $order->get_meta( '_direct_debit_iban' ) ) ) ),
496
+ 'debtorBic' => strtoupper( $this->clean_whitespaces( $this->maybe_decrypt( $order->get_meta( '_direct_debit_bic' ) ) ) ),
497
+ 'debtorName' => $order->get_meta( '_direct_debit_holder' ),
498
+ 'debtorMandate' => $this->get_mandate_id( $order ),
499
+ 'debtorMandateSignDate' => date_i18n( 'Y-m-d', $this->get_mandate_sign_date( $order ) ),
500
+ /**
501
+ * Filter that allows adjusting the purpose of a SEPA direct debit.
502
+ *
503
+ * @param string $purpose The SEPA purpose.
504
+ * @param WC_Order $order The order object.
505
+ *
506
+ * @since 1.8.5
507
+ *
508
+ */
509
+ 'remittanceInformation' => apply_filters( 'woocommerce_germanized_direct_debit_purpose', sprintf( __( 'Order %s', 'woocommerce-germanized' ), $order->get_order_number() ), $order ),
510
+ ), $this, $order ) );
511
+ }
512
  }
513
+
514
+ /**
515
+ * Generate XML
516
+ */
517
+ $direct_debit_xml = $directDebit->asXML();
518
+ } catch( Exception $e ) {
519
+ wp_die( $e->getMessage() );
520
+ }
521
  }
522
 
523
  header( 'Content-Description: File Transfer' );
526
  header( 'Cache-Control: no-cache, no-store, must-revalidate' );
527
  header( 'Pragma: no-cache' );
528
  header( 'Expires: 0' );
529
+ echo $direct_debit_xml;
 
 
 
 
530
  exit();
531
  }
532
 
includes/updates/woocommerce-gzd-update-3.1.9.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ // TS Option updates
8
+ $status = get_option( 'woocommerce_gzd_trusted_shops_review_reminder_status' );
9
+
10
+ if ( ! empty( $status ) && ! is_array( $status ) ) {
11
+ $status = array( $status );
12
+ update_option( 'woocommerce_gzd_trusted_shops_review_reminder_status', $status );
13
+ }
14
+
15
+ // Single product small business option
16
+ if ( 'yes' === get_option( 'woocommerce_gzd_small_enterprise' ) && 'yes' === get_option( 'woocommerce_gzd_display_product_detail_small_enterprise' ) ) {
17
+ update_option( 'woocommerce_gzd_display_product_detail_tax_info', 'yes' );
18
+ }
19
+ ?>
includes/wc-gzd-cart-functions.php CHANGED
@@ -102,9 +102,9 @@ function wc_gzd_cart_product_item_desc( $title, $cart_item, $cart_item_key = ''
102
  }
103
 
104
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
105
- $product = $cart_item->get_product();
106
-
107
- if ( is_a( $product, 'WC_Product' ) && wc_gzd_get_gzd_product( $product )->get_mini_desc() ) {
108
  $product_desc = wc_gzd_get_gzd_product( $product )->get_formatted_cart_description();
109
  }
110
  } elseif ( isset( $cart_item['data'] ) ) {
@@ -192,9 +192,9 @@ function wc_gzd_cart_product_delivery_time( $title, $cart_item, $cart_item_key =
192
  }
193
 
194
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
195
- $product = $cart_item->get_product();
196
-
197
- if ( $product && wc_gzd_get_product( $product )->get_delivery_time_term() ) {
198
  $delivery_time = wc_gzd_get_product( $product )->get_delivery_time_html();
199
  }
200
  } elseif ( isset( $cart_item['data'] ) ) {
@@ -239,11 +239,11 @@ function wc_gzd_cart_product_unit_price( $price, $cart_item, $cart_item_key = ''
239
  }
240
 
241
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
242
- $product = $cart_item->get_product();
243
-
244
- if ( $product && wc_gzd_get_product( $product )->has_unit() ) {
245
- $unit_price = wc_gzd_get_product( $product )->get_unit_price_html( false );
246
- }
247
  } elseif ( isset( $cart_item['data'] ) ) {
248
  $product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
249
 
@@ -285,9 +285,9 @@ function wc_gzd_cart_product_units( $title, $cart_item, $cart_item_key = '' ) {
285
  }
286
 
287
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
288
- $product = $cart_item->get_product();
289
-
290
- if ( $product && wc_gzd_get_product( $product )->has_unit_product() ) {
291
  $units = wc_gzd_get_product( $product )->get_unit_product_html();
292
  }
293
  } elseif ( isset( $cart_item['data'] ) ) {
102
  }
103
 
104
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
105
+ if ( $cart_item->get_meta( '_item_desc' ) ) {
106
+ $product_desc = $cart_item->get_meta( '_item_desc' );
107
+ } elseif( ( $product = $cart_item->get_product() ) && wc_gzd_get_gzd_product( $product )->get_mini_desc() ) {
108
  $product_desc = wc_gzd_get_gzd_product( $product )->get_formatted_cart_description();
109
  }
110
  } elseif ( isset( $cart_item['data'] ) ) {
192
  }
193
 
194
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
195
+ if ( $cart_item->get_meta( '_delivery_time' ) ) {
196
+ $delivery_time = $cart_item->get_meta( '_delivery_time' );
197
+ } elseif( ( $product = $cart_item->get_product() ) && wc_gzd_get_product( $product )->get_delivery_time_term() ) {
198
  $delivery_time = wc_gzd_get_product( $product )->get_delivery_time_html();
199
  }
200
  } elseif ( isset( $cart_item['data'] ) ) {
239
  }
240
 
241
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
242
+ if ( $cart_item->get_meta( '_unit_price' ) ) {
243
+ $unit_price = $cart_item->get_meta( '_unit_price' );
244
+ } elseif( ( $product = $cart_item->get_product() ) && wc_gzd_get_product( $product )->has_unit() ) {
245
+ $unit_price = wc_gzd_get_product( $product )->get_unit_price_html( false );
246
+ }
247
  } elseif ( isset( $cart_item['data'] ) ) {
248
  $product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
249
 
285
  }
286
 
287
  if ( is_a( $cart_item, 'WC_Order_Item_Product' ) ) {
288
+ if ( $cart_item->get_meta( '_units' ) ) {
289
+ $units = $cart_item->get_meta( '_units' );
290
+ } elseif( ( $product = $cart_item->get_product() ) && wc_gzd_get_product( $product )->has_unit_product() ) {
291
  $units = wc_gzd_get_product( $product )->get_unit_product_html();
292
  }
293
  } elseif ( isset( $cart_item['data'] ) ) {
includes/wc-gzd-core-functions.php CHANGED
@@ -297,6 +297,15 @@ function wc_gzd_get_page_permalink( $type ) {
297
  return apply_filters( 'woocommerce_gzd_legal_page_permalink', $link, $type );
298
  }
299
 
 
 
 
 
 
 
 
 
 
300
  function wc_gzd_get_small_business_notice() {
301
 
302
  /**
@@ -406,6 +415,38 @@ function wc_gzd_get_tax_rate_label( $rate_percentage ) {
406
  return apply_filters( 'woocommerce_gzd_tax_rate_label', $label, $rate_percentage );
407
  }
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  function wc_gzd_get_shipping_costs_text( $product = false ) {
410
  $replacements = array(
411
  '{link}' => '<a href="' . esc_url( wc_gzd_get_page_permalink( 'shipping_costs' ) ) . '" target="_blank">',
297
  return apply_filters( 'woocommerce_gzd_legal_page_permalink', $link, $type );
298
  }
299
 
300
+ /**
301
+ * @return bool
302
+ *
303
+ * @since 3.1.9
304
+ */
305
+ function wc_gzd_is_small_business() {
306
+ return 'yes' === get_option( 'woocommerce_gzd_small_enterprise' );
307
+ }
308
+
309
  function wc_gzd_get_small_business_notice() {
310
 
311
  /**
415
  return apply_filters( 'woocommerce_gzd_tax_rate_label', $label, $rate_percentage );
416
  }
417
 
418
+ /**
419
+ * @param $tax_rate_id
420
+ * @param WC_Order $order
421
+ *
422
+ * @return mixed|void
423
+ */
424
+ function wc_gzd_get_order_tax_rate_percentage( $tax_rate_id, $order ) {
425
+ $taxes = $order->get_taxes();
426
+ $percentage = 0;
427
+
428
+ foreach( $taxes as $tax ) {
429
+ if ( $tax->get_rate_id() == $tax_rate_id ) {
430
+ if ( is_callable( array( $tax, 'get_rate_percent' ) ) ) {
431
+ $percentage = $tax->get_rate_percent();
432
+ } else {
433
+ $percentage = WC_Tax::get_rate_percent( $tax_rate_id );
434
+ }
435
+ }
436
+ }
437
+
438
+ /**
439
+ * Allow adjusting the order tax rate percentage for a certain tax rate id.
440
+ *
441
+ * @param int $percentage The percentage e.g. 19.
442
+ * @param int $tax_rate_id The tax rate id.
443
+ * @param WC_Order $order The order object
444
+ *
445
+ * @since 3.1.9
446
+ */
447
+ return apply_filters( 'woocommerce_gzd_order_tax_rate_percentage', $percentage, $tax_rate_id, $order );
448
+ }
449
+
450
  function wc_gzd_get_shipping_costs_text( $product = false ) {
451
  $replacements = array(
452
  '{link}' => '<a href="' . esc_url( wc_gzd_get_page_permalink( 'shipping_costs' ) ) . '" target="_blank">',
includes/wc-gzd-template-functions.php CHANGED
@@ -548,6 +548,13 @@ if ( ! function_exists( 'woocommerce_gzd_template_small_business_total_vat_notic
548
 
549
  }
550
 
 
 
 
 
 
 
 
551
  if ( ! function_exists( 'woocommerce_gzd_template_differential_taxation_notice_cart' ) ) {
552
 
553
  function woocommerce_gzd_template_differential_taxation_notice_cart() {
548
 
549
  }
550
 
551
+ if ( ! function_exists( 'woocommerce_gzd_template_small_business_mini_cart_vat_notice' ) ) {
552
+
553
+ function woocommerce_gzd_template_small_business_mini_cart_vat_notice() {
554
+ echo ' <span class="includes_tax wc-gzd-small-business-includes-tax">' . __( 'incl. VAT', 'woocommerce-germanized' ) . '</span>';
555
+ }
556
+ }
557
+
558
  if ( ! function_exists( 'woocommerce_gzd_template_differential_taxation_notice_cart' ) ) {
559
 
560
  function woocommerce_gzd_template_differential_taxation_notice_cart() {
includes/wc-gzd-template-hooks.php CHANGED
@@ -77,11 +77,21 @@ foreach ( wc_gzd_get_cart_shopmarks() as $shopmark ) {
77
  }
78
 
79
  // Small enterprises
80
- if ( get_option( 'woocommerce_gzd_small_enterprise' ) === 'yes' ) {
81
 
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
  *
@@ -103,6 +113,7 @@ if ( get_option( 'woocommerce_gzd_small_enterprise' ) === 'yes' ) {
103
  if ( apply_filters( 'woocommerce_gzd_small_business_show_total_vat_notice', false ) ) {
104
  add_filter( 'woocommerce_get_formatted_order_total', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
105
  add_filter( 'woocommerce_cart_totals_order_total_html', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
 
106
  }
107
  }
108
 
77
  }
78
 
79
  // Small enterprises
80
+ if ( wc_gzd_is_small_business() ) {
81
 
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
+ /**
87
+ * Make sure to load woocommerce_gzd_maybe_add_small_business_vat_notice on init so that child-theme adjustments
88
+ * for woocommerce_gzd_small_business_show_total_vat_notice might work.
89
+ */
90
+ if ( wc_gzd_is_small_business() ) {
91
+ add_action( 'init', 'woocommerce_gzd_maybe_add_small_business_vat_notice', 20 );
92
+ }
93
 
94
+ function woocommerce_gzd_maybe_add_small_business_vat_notice() {
95
  /**
96
  * Filter to show incl. VAT for small business after order/cart total.
97
  *
113
  if ( apply_filters( 'woocommerce_gzd_small_business_show_total_vat_notice', false ) ) {
114
  add_filter( 'woocommerce_get_formatted_order_total', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
115
  add_filter( 'woocommerce_cart_totals_order_total_html', 'woocommerce_gzd_template_small_business_total_vat_notice', 10, 1 );
116
+ add_action( 'woocommerce_widget_shopping_cart_total', 'woocommerce_gzd_template_small_business_mini_cart_vat_notice', 12 );
117
  }
118
  }
119
 
packages/woocommerce-germanized-dhl/src/Package.php CHANGED
@@ -20,7 +20,7 @@ class Package {
20
  *
21
  * @var string
22
  */
23
- const VERSION = '1.2.6';
24
 
25
  public static $upload_dir_suffix = '';
26
 
20
  *
21
  * @var string
22
  */
23
+ const VERSION = '1.2.7';
24
 
25
  public static $upload_dir_suffix = '';
26
 
packages/woocommerce-germanized-dhl/src/ParcelLocator.php CHANGED
@@ -484,6 +484,14 @@ class ParcelLocator {
484
  return $fields;
485
  }
486
 
 
 
 
 
 
 
 
 
487
  public static function get_shipping_method_data( $from_session = false ) {
488
 
489
  if ( $from_session ) {
@@ -511,7 +519,7 @@ class ParcelLocator {
511
  }
512
  }
513
 
514
- $data[ $method->get_id() . ':' . $method->get_instance_id() ] = array(
515
  'supports' => $supports,
516
  'address_type_options' => self::get_address_types( $method ),
517
  'finder_button' => self::get_button( $method ),
@@ -746,10 +754,10 @@ class ParcelLocator {
746
  return $disable_method_check;
747
  }
748
 
749
- protected static function get_setting( $key ) {
750
  $option_key = 'parcel_pickup_' . $key;
751
 
752
- if ( $method = wc_gzd_dhl_get_current_shipping_method() ) {
753
  if ( $method->has_option( $option_key ) && ! self::disable_method_setting() ) {
754
  return $method->get_option( $option_key );
755
  }
@@ -764,20 +772,20 @@ class ParcelLocator {
764
  return Package::base_country_supports( 'pickup' );
765
  }
766
 
767
- public static function is_available() {
768
- return self::is_packstation_enabled() || self::is_parcelshop_enabled() || self::is_postoffice_enabled();
769
  }
770
 
771
- public static function is_postoffice_enabled() {
772
- return 'yes' === self::get_setting( 'postoffice_enable' );
773
  }
774
 
775
- public static function is_packstation_enabled() {
776
- return 'yes' === self::get_setting( 'packstation_enable' );
777
  }
778
 
779
- public static function is_parcelshop_enabled() {
780
- return 'yes' === self::get_setting( 'parcelshop_enable' );
781
  }
782
 
783
  public static function has_map() {
@@ -860,7 +868,11 @@ class ParcelLocator {
860
  }
861
 
862
  public static function add_shipping_fields( $fields ) {
863
- if ( self::is_available() ) {
 
 
 
 
864
  $fields['shipping_address_type'] = array(
865
  'label' => _x( 'Address Type', 'dhl', 'woocommerce-germanized' ),
866
  'required' => true,
484
  return $fields;
485
  }
486
 
487
+ protected static function get_rate_with_instance_id( $rate_id ) {
488
+ if ( strpos( $rate_id, ':' ) === false ) {
489
+ $rate_id = $rate_id . ':0';
490
+ }
491
+
492
+ return $rate_id;
493
+ }
494
+
495
  public static function get_shipping_method_data( $from_session = false ) {
496
 
497
  if ( $from_session ) {
519
  }
520
  }
521
 
522
+ $data[ self::get_rate_with_instance_id( $rate->id ) ] = array(
523
  'supports' => $supports,
524
  'address_type_options' => self::get_address_types( $method ),
525
  'finder_button' => self::get_button( $method ),
754
  return $disable_method_check;
755
  }
756
 
757
+ protected static function get_setting( $key, $check_method = true ) {
758
  $option_key = 'parcel_pickup_' . $key;
759
 
760
+ if ( $check_method && ( $method = wc_gzd_dhl_get_current_shipping_method() ) ) {
761
  if ( $method->has_option( $option_key ) && ! self::disable_method_setting() ) {
762
  return $method->get_option( $option_key );
763
  }
772
  return Package::base_country_supports( 'pickup' );
773
  }
774
 
775
+ public static function is_available( $check_shipping_method = true ) {
776
+ return self::is_packstation_enabled( $check_shipping_method ) || self::is_parcelshop_enabled( $check_shipping_method ) || self::is_postoffice_enabled( $check_shipping_method );
777
  }
778
 
779
+ public static function is_postoffice_enabled( $check_shipping_method = true ) {
780
+ return 'yes' === self::get_setting( 'postoffice_enable', $check_shipping_method );
781
  }
782
 
783
+ public static function is_packstation_enabled( $check_shipping_method = true ) {
784
+ return 'yes' === self::get_setting( 'packstation_enable', $check_shipping_method );
785
  }
786
 
787
+ public static function is_parcelshop_enabled( $check_shipping_method = true ) {
788
+ return 'yes' === self::get_setting( 'parcelshop_enable', $check_shipping_method );
789
  }
790
 
791
  public static function has_map() {
868
  }
869
 
870
  public static function add_shipping_fields( $fields ) {
871
+ /**
872
+ * On initial render make sure to not check the actual shipping method options for availability.
873
+ * Otherwise if the initial shipping method does not support DHL the fields are not even added to the checkout form.
874
+ */
875
+ if ( self::is_available( false ) ) {
876
  $fields['shipping_address_type'] = array(
877
  'label' => _x( 'Address Type', 'dhl', 'woocommerce-germanized' ),
878
  'required' => true,
packages/woocommerce-germanized-dhl/woocommerce-germanized-dhl.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The Germanized DHL integration, installed as a feature plugin for development and testing purposes.
6
  * Author: vendidero
7
  * Author URI: https://vendidero.de
8
- * Version: 1.2.6
9
  * Requires PHP: 5.6
10
  * License: GPLv3
11
  *
5
  * Description: The Germanized DHL integration, installed as a feature plugin for development and testing purposes.
6
  * Author: vendidero
7
  * Author URI: https://vendidero.de
8
+ * Version: 1.2.7
9
  * Requires PHP: 5.6
10
  * License: GPLv3
11
  *
packages/woocommerce-germanized-shipments/assets/js/admin-shipment-label-backbone.min.js CHANGED
@@ -1 +1 @@
1
- window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(c){window.germanized.admin.shipment_label_backbone={params:{},init:function(){var e=germanized.admin.shipment_label_backbone;e.params=wc_gzd_admin_shipment_label_backbone_params,c(document).on("click",".germanized-create-label .show-further-services",e.onExpandServices).on("click",".germanized-create-label .show-fewer-services",e.onHideServices).on("change",".germanized-create-label input.show-if-trigger",e.onShowIf).on("click",".germanized-create-label .notice .notice-dismiss",e.onRemoveNotice),c(document.body).on("wc_backbone_modal_loaded",e.backbone.init).on("wc_backbone_modal_response",e.backbone.response)},onRemoveNotice:function(){c(this).parents(".notice").slideUp(150,function(){c(this).remove()})},onShowIf:function(){var e=c(this).parents(".germanized-create-label").find(c(this).data("show-if")),n=c(this);0<e.length&&(n.is(":checked")?e.show():e.hide())},onExpandServices:function(){var e=c(this).parents(".germanized-create-label").find(".show-if-further-services"),n=c(this).parents(".show-services-trigger");return e.show(),n.find(".show-further-services").hide(),n.find(".show-fewer-services").show(),!1},onHideServices:function(){var e=c(this).parents(".germanized-create-label").find(".show-if-further-services"),n=c(this).parents(".show-services-trigger");return e.hide(),n.find(".show-further-services").show(),n.find(".show-fewer-services").hide(),!1},backbone:{getShipmentId:function(e){return e.replace(/^\D+/g,"")},init:function(e,n){if(-1!==n.indexOf("wc-gzd-modal-create-shipment-label")){var a=germanized.admin.shipment_label_backbone.backbone,i=germanized.admin.shipment_label_backbone,t=c(".germanized-create-label").parents(".wc-backbone-modal-content"),o={action:"woocommerce_gzd_create_shipment_label_form",shipment_id:a.getShipmentId(n),security:i.params.create_label_form_nonce};a.doAjax(o,t,a.onInitForm)}},onAjaxSuccess:function(e){},onAjaxError:function(e){},doAjax:function(e,n,a,i){var t=germanized.admin.shipment_label_backbone.backbone,o=germanized.admin.shipment_label_backbone,r=n.find(".germanized-create-label");a=a||t.onAjaxSuccess,i=i||t.onAjaxError,n.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),n.find(".notice-wrapper").empty(),c.ajax({type:"POST",url:o.params.ajax_url,data:e,success:function(e){e.success?(e.fragments&&c.each(e.fragments,function(e,n){c(e).replaceWith(n)}),n.unblock(),a.apply(r,[e])):(n.unblock(),i.apply(r,[e]),c.each(e.messages,function(e,n){t.addNotice(n,"error",r)}),r.animate({scrollTop:0},500))},error:function(e){},dataType:"json"})},onInitForm:function(e){var n=germanized.admin.shipment_label_backbone.backbone,a=e.shipment_id,i=c(".germanized-create-label");c(document.body).trigger("wc-enhanced-select-init"),c(document.body).trigger("wc-init-datepickers"),i.find("input.show-if-trigger").trigger("change"),i.parents(".wc-backbone-modal").on("click","#btn-ok",{shipmentId:a},n.onSubmit),i.parents(".wc-backbone-modal").on("touchstart","#btn-ok",{shipmentId:a},n.onSubmit),i.parents(".wc-backbone-modal").on("keydown",{shipmentId:a},n.onKeyDown)},getFormData:function(e){var a={};return c.each(e.serializeArray(),function(e,n){-1!==n.name.indexOf("[]")?(n.name=n.name.replace("[]",""),a[n.name]=c.makeArray(a[n.name]),a[n.name].push(n.value)):a[n.name]=n.value}),a},onSubmitSuccess:function(e){germanized.admin.shipment_label_backbone.backbone;var n=c(this).parents(".wc-backbone-modal-content"),a=e.shipment_id;n.find(".modal-close").trigger("click"),0<c("div#shipment-"+a).length&&germanized.admin.shipments.initShipment(a)},onKeyDown:function(e){var n=germanized.admin.shipment_label_backbone.backbone;13!==(e.keyCode||e.which)||e.target.tagName&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())||n.onSubmit.apply(c(this).find("button#btn-ok"),[e])},onSubmit:function(e){var n=germanized.admin.shipment_label_backbone.backbone,a=germanized.admin.shipment_label_backbone,i=e.data.shipmentId,t=c(this).parents(".wc-backbone-modal-content"),o=t.find(".germanized-create-label").find("form"),r=n.getFormData(o);r.security=a.params.create_label_nonce,r.shipment_id=i,r.action="woocommerce_gzd_create_shipment_label",n.doAjax(r,t,n.onSubmitSuccess),e.preventDefault(),e.stopPropagation()},addNotice:function(e,n,a){a.find(".notice-wrapper").append('<div class="notice is-dismissible notice-'+n+'"><p>'+e+'</p><button type="button" class="notice-dismiss"></button></div>')},response:function(e,n,a){n.indexOf("wc-gzd-modal-create-shipment-label")}}},c(document).ready(function(){germanized.admin.shipment_label_backbone.init()})}(jQuery);
1
+ window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(c){window.germanized.admin.shipment_label_backbone={params:{},init:function(){var e=germanized.admin.shipment_label_backbone;e.params=wc_gzd_admin_shipment_label_backbone_params,c(document).on("click",".germanized-create-label .show-further-services",e.onExpandServices).on("click",".germanized-create-label .show-fewer-services",e.onHideServices).on("change",".germanized-create-label input.show-if-trigger",e.onShowIf).on("click",".germanized-create-label .notice .notice-dismiss",e.onRemoveNotice),c(document.body).on("wc_backbone_modal_loaded",e.backbone.init).on("wc_backbone_modal_response",e.backbone.response)},onRemoveNotice:function(){c(this).parents(".notice").slideUp(150,function(){c(this).remove()})},onShowIf:function(){var e=c(this).parents(".germanized-create-label").find(c(this).data("show-if")),n=c(this);0<e.length&&(n.is(":checked")?e.show():e.hide())},onExpandServices:function(){var e=c(this).parents(".germanized-create-label").find(".show-if-further-services"),n=c(this).parents(".show-services-trigger");return e.show(),n.find(".show-further-services").hide(),n.find(".show-fewer-services").show(),!1},onHideServices:function(){var e=c(this).parents(".germanized-create-label").find(".show-if-further-services"),n=c(this).parents(".show-services-trigger");return e.hide(),n.find(".show-further-services").show(),n.find(".show-fewer-services").hide(),!1},backbone:{getShipmentId:function(e){return e.replace(/^\D+/g,"")},init:function(e,n){var a,i,t,o;-1!==n.indexOf("wc-gzd-modal-create-shipment-label")&&(a=germanized.admin.shipment_label_backbone.backbone,i=germanized.admin.shipment_label_backbone,t=c(".germanized-create-label").parents(".wc-backbone-modal-content"),o={action:"woocommerce_gzd_create_shipment_label_form",shipment_id:a.getShipmentId(n),security:i.params.create_label_form_nonce},a.doAjax(o,t,a.onInitForm))},onAjaxSuccess:function(e){},onAjaxError:function(e){},doAjax:function(e,n,a,i){var t=germanized.admin.shipment_label_backbone.backbone,o=germanized.admin.shipment_label_backbone,r=n.find(".germanized-create-label");a=a||t.onAjaxSuccess,i=i||t.onAjaxError,n.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),n.find(".notice-wrapper").empty(),c.ajax({type:"POST",url:o.params.ajax_url,data:e,success:function(e){e.success?(e.fragments&&c.each(e.fragments,function(e,n){c(e).replaceWith(n)}),n.unblock(),a.apply(r,[e])):(n.unblock(),i.apply(r,[e]),c.each(e.messages,function(e,n){t.addNotice(n,"error",r)}),r.animate({scrollTop:0},500))},error:function(e){},dataType:"json"})},onInitForm:function(e){var n=germanized.admin.shipment_label_backbone.backbone,a=e.shipment_id,i=c(".germanized-create-label");c(document.body).trigger("wc-enhanced-select-init"),c(document.body).trigger("wc-init-datepickers"),i.find("input.show-if-trigger").trigger("change"),i.parents(".wc-backbone-modal").on("click","#btn-ok",{shipmentId:a},n.onSubmit),i.parents(".wc-backbone-modal").on("touchstart","#btn-ok",{shipmentId:a},n.onSubmit),i.parents(".wc-backbone-modal").on("keydown",{shipmentId:a},n.onKeyDown)},getFormData:function(e){var a={};return c.each(e.serializeArray(),function(e,n){-1!==n.name.indexOf("[]")?(n.name=n.name.replace("[]",""),a[n.name]=c.makeArray(a[n.name]),a[n.name].push(n.value)):a[n.name]=n.value}),a},onSubmitSuccess:function(e){germanized.admin.shipment_label_backbone.backbone;var n=c(this).parents(".wc-backbone-modal-content"),a=e.shipment_id;n.find(".modal-close").trigger("click"),0<c("div#shipment-"+a).length&&germanized.admin.shipments.initShipment(a)},onKeyDown:function(e){var n=germanized.admin.shipment_label_backbone.backbone;13!==(e.keyCode||e.which)||e.target.tagName&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())||n.onSubmit.apply(c(this).find("button#btn-ok"),[e])},onSubmit:function(e){var n=germanized.admin.shipment_label_backbone.backbone,a=germanized.admin.shipment_label_backbone,i=e.data.shipmentId,t=c(this).parents(".wc-backbone-modal-content"),o=t.find(".germanized-create-label").find("form"),r=n.getFormData(o);r.security=a.params.create_label_nonce,r.shipment_id=i,r.action="woocommerce_gzd_create_shipment_label",n.doAjax(r,t,n.onSubmitSuccess),e.preventDefault(),e.stopPropagation()},addNotice:function(e,n,a){a.find(".notice-wrapper").append('<div class="notice is-dismissible notice-'+n+'"><p>'+e+'</p><button type="button" class="notice-dismiss"></button></div>')},response:function(e,n,a){n.indexOf("wc-gzd-modal-create-shipment-label")}}},c(document).ready(function(){germanized.admin.shipment_label_backbone.init()})}(jQuery);
packages/woocommerce-germanized-shipments/assets/js/admin-shipment.min.js CHANGED
@@ -1 +1 @@
1
- window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(h){h.GermanizedShipment=function(t){this.vars={$shipment:!1,params:{},id:"",isEditable:!0,needsItems:!0},(this.root=this).construct=function(t){this.vars.id=t,this.vars.params=germanized.admin.shipments.getParams(),this.refreshDom(),h(document.body).on("wc_backbone_modal_loaded",this.backbone.init.bind(this)).on("wc_backbone_modal_response",this.backbone.response.bind(this))},this.refreshDom=function(){this.vars.$shipment=h("#order-shipments-list").find("#shipment-"+this.getId()),this.setNeedsItems(this.vars.$shipment.hasClass("needs-items")),this.setIsEditable(this.vars.$shipment.hasClass("is-editable")),this.onChangeProvider(),h("#shipment-"+this.vars.id+" #shipment-items-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" #shipment-footer-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" #shipment-shipping-provider-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" .wc-gzd-shipment-label").off(),h("#shipment-"+this.vars.id+" #shipment-shipping-provider-"+this.vars.id).on("change",this.onChangeProvider.bind(this)),h("#shipment-"+this.vars.id+" #shipment-items-"+this.vars.id).on("change",".item-quantity",this.onChangeQuantity.bind(this)).on("click","a.remove-shipment-item",this.onRemoveItem.bind(this)).on("click","a.add-shipment-item",this.onAddItem.bind(this)).on("click","a.sync-shipment-items",this.onSyncItems.bind(this)),h("#shipment-"+this.vars.id+" #shipment-footer-"+this.vars.id).on("click",".send-return-shipment-notification",this.onSendReturnNotification.bind(this)).on("click",".confirm-return-shipment",this.onConfirmReturnRequest.bind(this)),h("#shipment-"+this.vars.id+" .wc-gzd-shipment-label").on("click",".create-shipment-label:not(.disabled)",this.onCreateLabel.bind(this)).on("click",".remove-shipment-label",this.onRemoveLabel.bind(this))},this.onSendReturnNotification=function(){var t={action:"woocommerce_gzd_send_return_shipment_notification_email",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().send_return_notification_nonce};return this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this)),!1},this.onConfirmReturnRequest=function(){var t={action:"woocommerce_gzd_confirm_return_request",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().confirm_return_request_nonce};return this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this)),!1},this.onRemoveLabel=function(){return window.confirm(germanized.admin.shipments.getParams().i18n_remove_label_notice)&&this.removeLabel(),!1},this.removeLabel=function(){var t={action:"woocommerce_gzd_remove_shipment_label",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().remove_label_nonce};this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this))},this.onCreateLabel=function(){return this.getShipment().WCBackboneModal({template:"wc-gzd-modal-create-shipment-label-"+this.getId()}),!1},this.onChangeProvider=function(){var t=this.getShipment(),i=t.find("#shipment-shipping-provider-"+this.getId()),e=i.find("option:selected");t.find(".show-if-provider").hide(),0<e.length&&e.data("is-manual")&&"yes"===e.data("is-manual")&&t.find(".show-if-provider-is-manual").show(),t.find(".show-if-provider-"+i.val()).show()},this.getShipment=function(){return this.vars.$shipment},this.getShipmentContent=function(){return this.vars.$shipment.find("> .shipment-content-wrapper > .shipment-content > .columns > div:not(.shipment-returns-data)")},this.onChangeQuantity=function(t){var i=h(t.target),e=i.parents(".shipment-item").data("id"),n=i.val();this.blockItems();var s={action:"woocommerce_gzd_limit_shipment_item_quantity",shipment_id:this.getId(),item_id:e,quantity:n};germanized.admin.shipments.doAjax(s,this.onChangeQuantitySuccess.bind(this))},this.onChangeQuantitySuccess=function(t){var i=this.getShipment().find('.shipment-item[data-id="'+t.item_id+'"]'),e=i.find(".item-quantity").val(),n=t.max_quantity;n<e?i.find(".item-quantity").val(n):e<=0&&i.find(".item-quantity").val(1),this.refreshDom(),this.unblockItems()},this.setWeight=function(t){this.getShipment().find("#shipment-weight-"+this.getId()).attr("placeholder",t)},this.setLength=function(t){this.getShipment().find("#shipment-length-"+this.getId()).attr("placeholder",t)},this.setWidth=function(t){this.getShipment().find("#shipment-width-"+this.getId()).attr("placeholder",t)},this.setHeight=function(t){this.getShipment().find("#shipment-height-"+this.getId()).attr("placeholder",t)},this.setIsEditable=function(t){var e=this;"boolean"!=typeof t&&(t=!0),this.vars.isEditable=!0===t,this.vars.isEditable?(this.getShipment().addClass("is-editable"),this.getShipment().removeClass("is-locked"),this.getShipmentContent().find(".remove-shipment-item ").show(),this.getShipmentContent().find(".shipment-item-actions").show(),this.getShipmentContent().find(":input:not([type=hidden])").prop("disabled",!1)):(this.getShipment().removeClass("is-editable"),this.getShipment().addClass("is-locked"),this.getShipmentContent().find(".remove-shipment-item ").hide(),this.getShipmentContent().find(".shipment-item-actions").hide(),this.getShipmentContent().find(":input:not([type=hidden])").prop("disabled",!0),h.each(this.vars.params.shipment_locked_excluded_fields,function(t,i){e.getShipmentContent().find(":input[name^=shipment_"+i+"]").prop("disabled",!1)}))},this.setNeedsItems=function(t){"boolean"!=typeof t&&(t=!0),this.vars.needsItems=!0===t,this.vars.needsItems?this.getShipment().addClass("needs-items"):this.getShipment().removeClass("needs-items")},this.onSyncItems=function(){return this.syncItems(),!1},this.syncItems=function(){this.blockItems();var t={action:"woocommerce_gzd_sync_shipment_items",shipment_id:this.getId()};germanized.admin.shipments.doAjax(t,this.onSyncItemsSuccess.bind(this),this.onSyncItemsError.bind(this))},this.onSyncItemsSuccess=function(t){this.unblockItems()},this.onSyncItemsError=function(t){this.unblockItems()},this.onAddItem=function(){return this.getShipment().WCBackboneModal({template:"wc-gzd-modal-add-shipment-item-"+this.getId()}),!1},this.addItem=function(t,i){i=i||1,this.blockItems();var e={action:"woocommerce_gzd_add_shipment_item",shipment_id:this.getId(),original_item_id:t,quantity:i};germanized.admin.shipments.doAjax(e,this.onAddItemSuccess.bind(this),this.onAddItemError.bind(this))},this.addReturn=function(t){this.block();var i={action:"woocommerce_gzd_add_shipment_return",shipment_id:this.getId()};h.extend(i,t),germanized.admin.shipments.doAjax(i,this.onAddReturnSuccess.bind(this),this.onAddReturnError.bind(this))},this.onAddReturnSuccess=function(t){this.getShipment().find(".shipment-return-list").append(t.new_shipment),this.refreshDom(),germanized.admin.shipments.initShipments(),this.unblock()},this.onAddReturnError=function(t){this.unblock()},this.onAddItemError=function(t){this.unblockItems()},this.onAddItemSuccess=function(t){this.getShipmentContent().find(".shipment-item-list").append(t.new_item),this.refreshDom(),this.unblockItems()},this.onRemoveItem=function(t){var i=h(t.target).parents(".shipment-item"),e=i.data("id");return 0<i.length&&this.removeItem(e),!1},this.blockItems=function(){this.getShipmentContent().find(".shipment-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},this.block=function(){this.getShipment().block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},this.unblockItems=function(){this.getShipmentContent().find(".shipment-items").unblock()},this.unblock=function(){this.getShipment().unblock()},this.removeItem=function(t){this.getShipment().find('.shipment-item[data-id="'+t+'"]');var i={action:"woocommerce_gzd_remove_shipment_item",shipment_id:this.getId(),item_id:t};this.blockItems(),germanized.admin.shipments.doAjax(i,this.onRemoveItemSuccess.bind(this))},this.onRemoveItemSuccess=function(t){var i=this.getShipment().find('.shipment-item[data-id="'+t.item_id+'"]');0<i.length&&i.slideUp(150,function(){h(this).remove()}),this.unblockItems()},this.getId=function(){return this.vars.id},this.backbone={onAddItemSuccess:function(t){$select=h("select#wc-gzd-shipment-add-items-select"),$quantity=h("input#wc-gzd-shipment-add-items-quantity"),$quantity.val(1),h.each(t.items,function(t,i){$select.append('<option value="'+t+'">'+i.name+"</option>"),$quantity.data("max-quantity-"+t,i.max_quantity)}),h(".wc-backbone-modal-content article").unblock(),h(document.body).on("change","input#wc-gzd-shipment-add-items-quantity",function(){var t=$select.val(),i=h(this).val();if($quantity.data("max-quantity-"+t)){var e=$quantity.data("max-quantity-"+t);e<i&&$quantity.val(e)}})},init:function(t,i){var e=this.getId();if("wc-gzd-modal-add-shipment-item-"+e===i)return h(".wc-backbone-modal-content article").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),germanized.admin.shipments.doAjax({action:"woocommerce_gzd_get_available_shipment_items",shipment_id:e},this.backbone.onAddItemSuccess.bind(this)),!1},response:function(t,i,e){"wc-gzd-modal-add-shipment-item-"+this.getId()===i&&this.addItem(e.item_id,e.item_qty)}},this.construct(t)}}(jQuery,window.germanized.admin);
1
+ window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(h){h.GermanizedShipment=function(t){this.vars={$shipment:!1,params:{},id:"",isEditable:!0,needsItems:!0},(this.root=this).construct=function(t){this.vars.id=t,this.vars.params=germanized.admin.shipments.getParams(),this.refreshDom(),h(document.body).on("wc_backbone_modal_loaded",this.backbone.init.bind(this)).on("wc_backbone_modal_response",this.backbone.response.bind(this))},this.refreshDom=function(){this.vars.$shipment=h("#order-shipments-list").find("#shipment-"+this.getId()),this.setNeedsItems(this.vars.$shipment.hasClass("needs-items")),this.setIsEditable(this.vars.$shipment.hasClass("is-editable")),this.onChangeProvider(),h("#shipment-"+this.vars.id+" #shipment-items-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" #shipment-footer-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" #shipment-shipping-provider-"+this.vars.id).off(),h("#shipment-"+this.vars.id+" .wc-gzd-shipment-label").off(),h("#shipment-"+this.vars.id+" #shipment-shipping-provider-"+this.vars.id).on("change",this.onChangeProvider.bind(this)),h("#shipment-"+this.vars.id+" #shipment-items-"+this.vars.id).on("change",".item-quantity",this.onChangeQuantity.bind(this)).on("click","a.remove-shipment-item",this.onRemoveItem.bind(this)).on("click","a.add-shipment-item",this.onAddItem.bind(this)).on("click","a.sync-shipment-items",this.onSyncItems.bind(this)),h("#shipment-"+this.vars.id+" #shipment-footer-"+this.vars.id).on("click",".send-return-shipment-notification",this.onSendReturnNotification.bind(this)).on("click",".confirm-return-shipment",this.onConfirmReturnRequest.bind(this)),h("#shipment-"+this.vars.id+" .wc-gzd-shipment-label").on("click",".create-shipment-label:not(.disabled)",this.onCreateLabel.bind(this)).on("click",".remove-shipment-label",this.onRemoveLabel.bind(this))},this.onSendReturnNotification=function(){var t={action:"woocommerce_gzd_send_return_shipment_notification_email",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().send_return_notification_nonce};return this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this)),!1},this.onConfirmReturnRequest=function(){var t={action:"woocommerce_gzd_confirm_return_request",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().confirm_return_request_nonce};return this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this)),!1},this.onRemoveLabel=function(){return window.confirm(germanized.admin.shipments.getParams().i18n_remove_label_notice)&&this.removeLabel(),!1},this.removeLabel=function(){var t={action:"woocommerce_gzd_remove_shipment_label",shipment_id:this.getId(),security:germanized.admin.shipments.getParams().remove_label_nonce};this.block(),germanized.admin.shipments.doAjax(t,this.unblock.bind(this),this.unblock.bind(this))},this.onCreateLabel=function(){return this.getShipment().WCBackboneModal({template:"wc-gzd-modal-create-shipment-label-"+this.getId()}),!1},this.onChangeProvider=function(){var t=this.getShipment(),i=t.find("#shipment-shipping-provider-"+this.getId()),e=i.find("option:selected");t.find(".show-if-provider").hide(),0<e.length&&e.data("is-manual")&&"yes"===e.data("is-manual")&&t.find(".show-if-provider-is-manual").show(),t.find(".show-if-provider-"+i.val()).show()},this.getShipment=function(){return this.vars.$shipment},this.getShipmentContent=function(){return this.vars.$shipment.find("> .shipment-content-wrapper > .shipment-content > .columns > div:not(.shipment-returns-data)")},this.onChangeQuantity=function(t){var i=h(t.target),e=i.parents(".shipment-item").data("id"),n=i.val();this.blockItems();var s={action:"woocommerce_gzd_limit_shipment_item_quantity",shipment_id:this.getId(),item_id:e,quantity:n};germanized.admin.shipments.doAjax(s,this.onChangeQuantitySuccess.bind(this))},this.onChangeQuantitySuccess=function(t){var i=this.getShipment().find('.shipment-item[data-id="'+t.item_id+'"]'),e=i.find(".item-quantity").val(),n=t.max_quantity;n<e?i.find(".item-quantity").val(n):e<=0&&i.find(".item-quantity").val(1),this.refreshDom(),this.unblockItems()},this.setWeight=function(t){this.getShipment().find("#shipment-weight-"+this.getId()).attr("placeholder",t)},this.setLength=function(t){this.getShipment().find("#shipment-length-"+this.getId()).attr("placeholder",t)},this.setWidth=function(t){this.getShipment().find("#shipment-width-"+this.getId()).attr("placeholder",t)},this.setHeight=function(t){this.getShipment().find("#shipment-height-"+this.getId()).attr("placeholder",t)},this.setIsEditable=function(t){var e=this;"boolean"!=typeof t&&(t=!0),this.vars.isEditable=!0===t,this.vars.isEditable?(this.getShipment().addClass("is-editable"),this.getShipment().removeClass("is-locked"),this.getShipmentContent().find(".remove-shipment-item ").show(),this.getShipmentContent().find(".shipment-item-actions").show(),this.getShipmentContent().find(":input:not([type=hidden])").prop("disabled",!1)):(this.getShipment().removeClass("is-editable"),this.getShipment().addClass("is-locked"),this.getShipmentContent().find(".remove-shipment-item ").hide(),this.getShipmentContent().find(".shipment-item-actions").hide(),this.getShipmentContent().find(":input:not([type=hidden])").prop("disabled",!0),h.each(this.vars.params.shipment_locked_excluded_fields,function(t,i){e.getShipmentContent().find(":input[name^=shipment_"+i+"]").prop("disabled",!1)}))},this.setNeedsItems=function(t){"boolean"!=typeof t&&(t=!0),this.vars.needsItems=!0===t,this.vars.needsItems?this.getShipment().addClass("needs-items"):this.getShipment().removeClass("needs-items")},this.onSyncItems=function(){return this.syncItems(),!1},this.syncItems=function(){this.blockItems();var t={action:"woocommerce_gzd_sync_shipment_items",shipment_id:this.getId()};germanized.admin.shipments.doAjax(t,this.onSyncItemsSuccess.bind(this),this.onSyncItemsError.bind(this))},this.onSyncItemsSuccess=function(t){this.unblockItems()},this.onSyncItemsError=function(t){this.unblockItems()},this.onAddItem=function(){return this.getShipment().WCBackboneModal({template:"wc-gzd-modal-add-shipment-item-"+this.getId()}),!1},this.addItem=function(t,i){i=i||1,this.blockItems();var e={action:"woocommerce_gzd_add_shipment_item",shipment_id:this.getId(),original_item_id:t,quantity:i};germanized.admin.shipments.doAjax(e,this.onAddItemSuccess.bind(this),this.onAddItemError.bind(this))},this.addReturn=function(t){this.block();var i={action:"woocommerce_gzd_add_shipment_return",shipment_id:this.getId()};h.extend(i,t),germanized.admin.shipments.doAjax(i,this.onAddReturnSuccess.bind(this),this.onAddReturnError.bind(this))},this.onAddReturnSuccess=function(t){this.getShipment().find(".shipment-return-list").append(t.new_shipment),this.refreshDom(),germanized.admin.shipments.initShipments(),this.unblock()},this.onAddReturnError=function(t){this.unblock()},this.onAddItemError=function(t){this.unblockItems()},this.onAddItemSuccess=function(t){this.getShipmentContent().find(".shipment-item-list").append(t.new_item),this.refreshDom(),this.unblockItems()},this.onRemoveItem=function(t){var i=h(t.target).parents(".shipment-item"),e=i.data("id");return 0<i.length&&this.removeItem(e),!1},this.blockItems=function(){this.getShipmentContent().find(".shipment-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},this.block=function(){this.getShipment().block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},this.unblockItems=function(){this.getShipmentContent().find(".shipment-items").unblock()},this.unblock=function(){this.getShipment().unblock()},this.removeItem=function(t){this.getShipment().find('.shipment-item[data-id="'+t+'"]');var i={action:"woocommerce_gzd_remove_shipment_item",shipment_id:this.getId(),item_id:t};this.blockItems(),germanized.admin.shipments.doAjax(i,this.onRemoveItemSuccess.bind(this))},this.onRemoveItemSuccess=function(t){var i=this.getShipment().find('.shipment-item[data-id="'+t.item_id+'"]');0<i.length&&i.slideUp(150,function(){h(this).remove()}),this.unblockItems()},this.getId=function(){return this.vars.id},this.backbone={onAddItemSuccess:function(t){$select=h("select#wc-gzd-shipment-add-items-select"),$quantity=h("input#wc-gzd-shipment-add-items-quantity"),$quantity.val(1),h.each(t.items,function(t,i){$select.append('<option value="'+t+'">'+i.name+"</option>"),$quantity.data("max-quantity-"+t,i.max_quantity)}),h(".wc-backbone-modal-content article").unblock(),h(document.body).on("change","input#wc-gzd-shipment-add-items-quantity",function(){var t,i=$select.val(),e=h(this).val();!$quantity.data("max-quantity-"+i)||(t=$quantity.data("max-quantity-"+i))<e&&$quantity.val(t)})},init:function(t,i){var e=this.getId();if("wc-gzd-modal-add-shipment-item-"+e===i)return h(".wc-backbone-modal-content article").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),germanized.admin.shipments.doAjax({action:"woocommerce_gzd_get_available_shipment_items",shipment_id:e},this.backbone.onAddItemSuccess.bind(this)),!1},response:function(t,i,e){"wc-gzd-modal-add-shipment-item-"+this.getId()===i&&this.addItem(e.item_id,e.item_qty)}},this.construct(t)}}(jQuery,window.germanized.admin);
packages/woocommerce-germanized-shipments/assets/js/admin-shipments.min.js CHANGED
@@ -1 +1 @@
1
- window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(d){window.germanized.admin.shipments={params:{},shipments:{},$wrapper:!1,needsSaving:!1,needsShipments:!0,needsReturns:!1,init:function(){var e=germanized.admin.shipments;e.params=wc_gzd_admin_shipments_params,e.$wrapper=d("#panel-order-shipments"),e.needsShipments=e.$wrapper.find("#order-shipment-add").is(":visible"),e.needsReturns=e.$wrapper.find("#order-return-shipment-add").is(":visible"),e.initShipments(),d(document).ajaxComplete(e.onAjaxComplete),d(document).on("click","#order-shipments-list .shipment-header",e.onToggleShipment).on("change","#order-shipments-list :input:visible",e.setNeedsSaving).on("click","#panel-order-shipments #order-shipment-add",e.onAddShipment).on("click","#panel-order-shipments #order-return-shipment-add",e.onAddReturn).on("click","#panel-order-shipments .remove-shipment",e.onRemoveShipment).on("click","#panel-order-shipments button#order-shipments-save",e.onSave).on("click","#panel-order-shipments .notice-dismiss",e.onRemoveNotice),d(document.body).on("wc_backbone_modal_loaded",e.backbone.init).on("wc_backbone_modal_response",e.backbone.response)},onAjaxComplete:function(e,n,i){var t=germanized.admin.shipments;if(null!=n&&i.hasOwnProperty("data")){var r=i.data,a=!1;try{a=JSON.parse('{"'+r.replace(/&/g,'","').replace(/=/g,'":"')+'"}',function(e,n){return""===e?n:decodeURIComponent(n)})}catch(e){a=!1}if(a&&a.hasOwnProperty("action")){var s=a.action;"woocommerce_save_order_items"!==s&&"woocommerce_remove_order_item"!==s&&"woocommerce_add_order_item"!==s&&"woocommerce_delete_refund"!==s||t.syncItemQuantities()}}},syncItemQuantities:function(){var e=germanized.admin.shipments;e.block();var n={action:"woocommerce_gzd_validate_shipment_item_quantities",active:e.getActiveShipmentId()};e.doAjax(n,e.onSyncSuccess)},onSyncSuccess:function(e){var n=germanized.admin.shipments;n.unblock(),n.initShipments(),n.initTiptip()},onSave:function(e){var n=germanized.admin.shipments;return e.preventDefault(),n.save(),!1},save:function(){var e=germanized.admin.shipments;e.block();var n={action:"woocommerce_gzd_save_shipments",active:e.getActiveShipmentId()};e.doAjax(n,e.onSaveSuccess)},initShipment:function(e){var n=germanized.admin.shipments;n.shipments.hasOwnProperty(e)?n.shipments[e].refreshDom():n.shipments[e]=new d.GermanizedShipment(e)},onSaveSuccess:function(e){var n=germanized.admin.shipments;n.initShipments(),n.setNeedsSaving(!1),n.unblock(),n.initTiptip()},getActiveShipmentId:function(){var e=germanized.admin.shipments.$wrapper.find(".order-shipment.active");return 0<e.length&&e.data("shipment")},block:function(){germanized.admin.shipments.$wrapper.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){germanized.admin.shipments.$wrapper.unblock()},getData:function(e){var n=germanized.admin.shipments,i={};return e=e||{},d.each(n.$wrapper.find(":input[name]").serializeArray(),function(e,n){-1!==n.name.indexOf("[]")?(n.name=n.name.replace("[]",""),i[n.name]=d.makeArray(i[n.name]),i[n.name].push(n.value)):i[n.name]=n.value}),d.extend(i,e),i},doAjax:function(e,n,t){var r=germanized.admin.shipments,i=r.params.ajax_url,a=r.$wrapper,s=!0;a.find(".notice-wrapper").empty(),n=n||r.onAjaxSuccess,t=t||r.onAjaxError,e.hasOwnProperty("refresh_fragments")&&(s=e.refresh_fragments),e.hasOwnProperty("security")||(e.security=r.params.edit_shipments_nonce),e.hasOwnProperty("order_id")||(e.order_id=r.params.order_id),e=r.getData(e),d.ajax({type:"POST",url:i,data:e,success:function(e){if(e.success){s&&e.fragments&&d.each(e.fragments,function(e,n){d(e).replaceWith(n),d(e).unblock()}),n.apply(a,[e]),e.hasOwnProperty("order_needs_new_shipments")&&r.setNeedsShipments(e.order_needs_new_shipments),e.hasOwnProperty("order_needs_new_returns")&&r.setNeedsReturns(e.order_needs_new_returns);var i=e.hasOwnProperty("shipments")?e.shipments:{};d.each(r.getShipments(),function(e,n){i.hasOwnProperty(e)&&(n.setIsEditable(i[e].is_editable),n.setNeedsItems(i[e].needs_items),n.setWeight(i[e].weight),n.setLength(i[e].length),n.setWidth(i[e].width),n.setHeight(i[e].height))}),e.hasOwnProperty("needs_refresh")&&e.hasOwnProperty("shipment_id")&&r.initShipment(e.shipment_id)}else t.apply(a,[e]),r.unblock(),e.hasOwnProperty("message")?r.addNotice(e.message,"error"):e.hasOwnProperty("messages")&&d.each(e.messages,function(e,n){r.addNotice(n,"error")})},error:function(e){t.apply(a,[e]),r.unblock()},dataType:"json"})},onAjaxError:function(e){},onAjaxSuccess:function(e){},onRemoveNotice:function(){d(this).parents(".notice").slideUp(150,function(){d(this).remove()})},addNotice:function(e,n){germanized.admin.shipments.$wrapper.find(".notice-wrapper").append('<div class="notice is-dismissible notice-'+n+'"><p>'+e+'</p><button type="button" class="notice-dismiss"></button></div>')},getParams:function(){return germanized.admin.shipments.params},onRemoveShipment:function(){var e=germanized.admin.shipments,n=d(this).parents(".order-shipment").data("shipment");return window.confirm(e.getParams().i18n_remove_shipment_notice)&&e.removeShipment(n),!1},removeShipment:function(e){var n=germanized.admin.shipments,i={action:"woocommerce_gzd_remove_shipment",shipment_id:e};n.block(),n.doAjax(i,n.onRemoveShipmentSuccess,n.onRemoveShipmentError)},onRemoveShipmentSuccess:function(e){var n=germanized.admin.shipments,i=n.$wrapper.find("#shipment-"+e.shipment_id);0<i.length?i.hasClass("active")?i.find(".shipment-content-wrapper").slideUp(300,function(){i.removeClass("active"),i.remove(),n.initShipments(),n.unblock()}):(i.remove(),n.initShipments(),n.unblock()):(n.initShipments(),n.unblock())},onRemoveShipmentError:function(e){germanized.admin.shipments.unblock()},onAddShipment:function(){return germanized.admin.shipments.addShipment(),!1},addShipment:function(){var e=germanized.admin.shipments;e.block(),e.doAjax({action:"woocommerce_gzd_add_shipment"},e.onAddShipmentSuccess,e.onAddShipmentError)},onAddShipmentSuccess:function(e){var n=germanized.admin.shipments;0<n.$wrapper.find(".order-shipment.active").length?n.$wrapper.find(".order-shipment.active").find(".shipment-content-wrapper").slideUp(300,function(){n.$wrapper.find(".order-shipment.active").removeClass("active"),n.appendNewShipment(e),n.initShipments(),n.initTiptip(),n.unblock()}):(n.appendNewShipment(e),n.initShipments(),n.initTiptip(),n.unblock())},appendNewShipment:function(e){var n=germanized.admin.shipments;"simple"===e.new_shipment_type&&0<n.$wrapper.find(".panel-order-return-title").length?n.$wrapper.find(".panel-order-return-title").before(e.new_shipment):n.$wrapper.find("#order-shipments-list").append(e.new_shipment)},onAddShipmentError:function(e){},onAddReturn:function(){return d(this).WCBackboneModal({template:"wc-gzd-modal-add-shipment-return"}),!1},addReturn:function(e){var n=germanized.admin.shipments;n.block();var i={action:"woocommerce_gzd_add_return_shipment"};d.extend(i,e),n.doAjax(i,n.onAddReturnSuccess,n.onAddReturnError)},onAddReturnSuccess:function(e){germanized.admin.shipments.onAddShipmentSuccess(e)},onAddReturnError:function(e){germanized.admin.shipments.onAddShipmentError(e)},setNeedsSaving:function(e){var n=germanized.admin.shipments,i=n.getActiveShipmentId(),t=!!i&&n.getShipment(i).getShipment();"boolean"!=typeof e&&(e=!0),n.needsSaving=!0===e,n.needsSaving?n.$wrapper.find("#order-shipments-save").show():n.$wrapper.find("#order-shipments-save").hide(),t&&(n.needsSaving?n.disableCreateLabel(t):n.enableCreateLabel(t)),n.needsSaving?n.disableCreateLabel(t):n.enableCreateLabel(t),n.hideOrShowFooter(),d(document.body).trigger("woocommerce_gzd_shipments_needs_saving",[n.needsSaving,n.getActiveShipmentId()]),n.initTiptip()},disableCreateLabel:function(e){var n=germanized.admin.shipments,i=e.find(".create-shipment-label");0<i.length&&(i.addClass("disabled button-disabled"),i.prop("title",n.params.i18n_create_label_disabled))},enableCreateLabel:function(e){var n=germanized.admin.shipments,i=e.find(".create-shipment-label");0<i.length&&(i.removeClass("disabled button-disabled"),i.prop("title",n.params.i18n_create_label_enabled))},setNeedsShipments:function(e){var n=germanized.admin.shipments;"boolean"!=typeof e&&(e=!0),n.needsShipments=!0===e,n.needsShipments?(n.$wrapper.addClass("needs-shipments"),n.$wrapper.find("#order-shipment-add").show()):(n.$wrapper.removeClass("needs-shipments"),n.$wrapper.find("#order-shipment-add").hide()),n.hideOrShowFooter()},hideOrShowReturnTitle:function(){var e=germanized.admin.shipments;0===e.$wrapper.find(".order-shipment.shipment-return").length?e.$wrapper.find(".panel-order-return-title").addClass("hide-default"):e.$wrapper.find(".panel-order-return-title").removeClass("hide-default")},setNeedsReturns:function(e){var n=germanized.admin.shipments;"boolean"!=typeof e&&(e=!0),n.needsReturns=!0===e,n.needsReturns?(n.$wrapper.addClass("needs-returns"),n.$wrapper.find("#order-return-shipment-add").show()):(n.$wrapper.removeClass("needs-returns"),n.$wrapper.find("#order-return-shipment-add").hide()),n.hideOrShowFooter()},hideOrShowFooter:function(){var e=germanized.admin.shipments;e.needsSaving||e.needsShipments||e.needsReturns?e.$wrapper.find(".panel-footer").slideDown(300):e.$wrapper.find(".panel-footer").slideUp(300)},onToggleShipment:function(){var e=germanized.admin.shipments,n=d(this).parents(".order-shipment:first"),i=n.hasClass("active");e.closeShipments(),i||n.find("> .shipment-content-wrapper").slideDown(300,function(){n.addClass("active")})},closeShipments:function(){var e=germanized.admin.shipments;e.$wrapper.find(".order-shipment.active .shipment-content-wrapper").slideUp(300,function(){e.$wrapper.find(".order-shipment.active").removeClass("active")})},initShipments:function(){var n=germanized.admin.shipments;n.$wrapper=d("#panel-order-shipments"),n.$wrapper.find(".order-shipment").each(function(){var e=d(this).data("shipment");n.initShipment(e)}),n.hideOrShowReturnTitle()},getShipments:function(){return germanized.admin.shipments.shipments},getShipment:function(e){var n=germanized.admin.shipments.getShipments();return!!n.hasOwnProperty(e)&&n[e]},refresh:function(e){},refreshItems:function(e){},addItem:function(){},initTiptip:function(){var e=germanized.admin.shipments;d(document.body).trigger("init_tooltips"),e.$wrapper.find(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),e.$wrapper.find(".create-shipment-label").tipTip({fadeIn:50,fadeOut:50,delay:200})},backbone:{onAddReturnSuccess:function(e){d("#wc-gzd-return-shipment-items").html(e.html),d(".wc-backbone-modal-content article").unblock(),d(document.body).on("change","input.wc-gzd-shipment-add-return-item-quantity",function(){var e=d(this),n=e.val();if(e.attr("max")){var i=e.attr("max");i<n&&e.val(i)}})},init:function(e,n){var i=germanized.admin.shipments;if("wc-gzd-modal-add-shipment-return"===n)return d(".wc-backbone-modal-content article").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),i.doAjax({action:"woocommerce_gzd_get_available_return_shipment_items"},i.backbone.onAddReturnSuccess),!1},response:function(e,n,i){var t=germanized.admin.shipments;"wc-gzd-modal-add-shipment-return"===n&&t.addReturn(i)}}},d(document).ready(function(){germanized.admin.shipments.init()})}(jQuery);
1
+ window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(d){window.germanized.admin.shipments={params:{},shipments:{},$wrapper:!1,needsSaving:!1,needsShipments:!0,needsReturns:!1,init:function(){var e=germanized.admin.shipments;e.params=wc_gzd_admin_shipments_params,e.$wrapper=d("#panel-order-shipments"),e.needsShipments=e.$wrapper.find("#order-shipment-add").is(":visible"),e.needsReturns=e.$wrapper.find("#order-return-shipment-add").is(":visible"),e.initShipments(),d(document).ajaxComplete(e.onAjaxComplete),d(document).on("click","#order-shipments-list .shipment-header",e.onToggleShipment).on("change","#order-shipments-list :input:visible",e.setNeedsSaving).on("click","#panel-order-shipments #order-shipment-add",e.onAddShipment).on("click","#panel-order-shipments #order-return-shipment-add",e.onAddReturn).on("click","#panel-order-shipments .remove-shipment",e.onRemoveShipment).on("click","#panel-order-shipments button#order-shipments-save",e.onSave).on("click","#panel-order-shipments .notice-dismiss",e.onRemoveNotice),d(document.body).on("wc_backbone_modal_loaded",e.backbone.init).on("wc_backbone_modal_response",e.backbone.response)},onAjaxComplete:function(e,n,i){var t=germanized.admin.shipments;if(null!=n&&i.hasOwnProperty("data")){var r,a=i.data,s=!1;try{s=JSON.parse('{"'+a.replace(/&/g,'","').replace(/=/g,'":"')+'"}',function(e,n){return""===e?n:decodeURIComponent(n)})}catch(e){s=!1}s&&s.hasOwnProperty("action")&&("woocommerce_save_order_items"!==(r=s.action)&&"woocommerce_remove_order_item"!==r&&"woocommerce_add_order_item"!==r&&"woocommerce_delete_refund"!==r||t.syncItemQuantities())}},syncItemQuantities:function(){var e=germanized.admin.shipments;e.block();var n={action:"woocommerce_gzd_validate_shipment_item_quantities",active:e.getActiveShipmentId()};e.doAjax(n,e.onSyncSuccess)},onSyncSuccess:function(e){var n=germanized.admin.shipments;n.unblock(),n.initShipments(),n.initTiptip()},onSave:function(e){var n=germanized.admin.shipments;return e.preventDefault(),n.save(),!1},save:function(){var e=germanized.admin.shipments;e.block();var n={action:"woocommerce_gzd_save_shipments",active:e.getActiveShipmentId()};e.doAjax(n,e.onSaveSuccess)},initShipment:function(e){var n=germanized.admin.shipments;n.shipments.hasOwnProperty(e)?n.shipments[e].refreshDom():n.shipments[e]=new d.GermanizedShipment(e)},onSaveSuccess:function(e){var n=germanized.admin.shipments;n.initShipments(),n.setNeedsSaving(!1),n.unblock(),n.initTiptip()},getActiveShipmentId:function(){var e=germanized.admin.shipments.$wrapper.find(".order-shipment.active");return 0<e.length&&e.data("shipment")},block:function(){germanized.admin.shipments.$wrapper.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){germanized.admin.shipments.$wrapper.unblock()},getData:function(e){var n=germanized.admin.shipments,i={};return e=e||{},d.each(n.$wrapper.find(":input[name]").serializeArray(),function(e,n){-1!==n.name.indexOf("[]")?(n.name=n.name.replace("[]",""),i[n.name]=d.makeArray(i[n.name]),i[n.name].push(n.value)):i[n.name]=n.value}),d.extend(i,e),i},doAjax:function(e,n,t){var r=germanized.admin.shipments,i=r.params.ajax_url,a=r.$wrapper,s=!0;a.find(".notice-wrapper").empty(),n=n||r.onAjaxSuccess,t=t||r.onAjaxError,e.hasOwnProperty("refresh_fragments")&&(s=e.refresh_fragments),e.hasOwnProperty("security")||(e.security=r.params.edit_shipments_nonce),e.hasOwnProperty("order_id")||(e.order_id=r.params.order_id),e=r.getData(e),d.ajax({type:"POST",url:i,data:e,success:function(e){var i;e.success?(s&&e.fragments&&d.each(e.fragments,function(e,n){d(e).replaceWith(n),d(e).unblock()}),n.apply(a,[e]),e.hasOwnProperty("order_needs_new_shipments")&&r.setNeedsShipments(e.order_needs_new_shipments),e.hasOwnProperty("order_needs_new_returns")&&r.setNeedsReturns(e.order_needs_new_returns),i=e.hasOwnProperty("shipments")?e.shipments:{},d.each(r.getShipments(),function(e,n){i.hasOwnProperty(e)&&(n.setIsEditable(i[e].is_editable),n.setNeedsItems(i[e].needs_items),n.setWeight(i[e].weight),n.setLength(i[e].length),n.setWidth(i[e].width),n.setHeight(i[e].height))}),e.hasOwnProperty("needs_refresh")&&e.hasOwnProperty("shipment_id")&&r.initShipment(e.shipment_id)):(t.apply(a,[e]),r.unblock(),e.hasOwnProperty("message")?r.addNotice(e.message,"error"):e.hasOwnProperty("messages")&&d.each(e.messages,function(e,n){r.addNotice(n,"error")}))},error:function(e){t.apply(a,[e]),r.unblock()},dataType:"json"})},onAjaxError:function(e){},onAjaxSuccess:function(e){},onRemoveNotice:function(){d(this).parents(".notice").slideUp(150,function(){d(this).remove()})},addNotice:function(e,n){germanized.admin.shipments.$wrapper.find(".notice-wrapper").append('<div class="notice is-dismissible notice-'+n+'"><p>'+e+'</p><button type="button" class="notice-dismiss"></button></div>')},getParams:function(){return germanized.admin.shipments.params},onRemoveShipment:function(){var e=germanized.admin.shipments,n=d(this).parents(".order-shipment").data("shipment");return window.confirm(e.getParams().i18n_remove_shipment_notice)&&e.removeShipment(n),!1},removeShipment:function(e){var n=germanized.admin.shipments,i={action:"woocommerce_gzd_remove_shipment",shipment_id:e};n.block(),n.doAjax(i,n.onRemoveShipmentSuccess,n.onRemoveShipmentError)},onRemoveShipmentSuccess:function(e){var n=germanized.admin.shipments,i=n.$wrapper.find("#shipment-"+e.shipment_id);0<i.length?i.hasClass("active")?i.find(".shipment-content-wrapper").slideUp(300,function(){i.removeClass("active"),i.remove(),n.initShipments(),n.unblock()}):(i.remove(),n.initShipments(),n.unblock()):(n.initShipments(),n.unblock())},onRemoveShipmentError:function(e){germanized.admin.shipments.unblock()},onAddShipment:function(){return germanized.admin.shipments.addShipment(),!1},addShipment:function(){var e=germanized.admin.shipments;e.block(),e.doAjax({action:"woocommerce_gzd_add_shipment"},e.onAddShipmentSuccess,e.onAddShipmentError)},onAddShipmentSuccess:function(e){var n=germanized.admin.shipments;0<n.$wrapper.find(".order-shipment.active").length?n.$wrapper.find(".order-shipment.active").find(".shipment-content-wrapper").slideUp(300,function(){n.$wrapper.find(".order-shipment.active").removeClass("active"),n.appendNewShipment(e),n.initShipments(),n.initTiptip(),n.unblock()}):(n.appendNewShipment(e),n.initShipments(),n.initTiptip(),n.unblock())},appendNewShipment:function(e){var n=germanized.admin.shipments;"simple"===e.new_shipment_type&&0<n.$wrapper.find(".panel-order-return-title").length?n.$wrapper.find(".panel-order-return-title").before(e.new_shipment):n.$wrapper.find("#order-shipments-list").append(e.new_shipment)},onAddShipmentError:function(e){},onAddReturn:function(){return d(this).WCBackboneModal({template:"wc-gzd-modal-add-shipment-return"}),!1},addReturn:function(e){var n=germanized.admin.shipments;n.block();var i={action:"woocommerce_gzd_add_return_shipment"};d.extend(i,e),n.doAjax(i,n.onAddReturnSuccess,n.onAddReturnError)},onAddReturnSuccess:function(e){germanized.admin.shipments.onAddShipmentSuccess(e)},onAddReturnError:function(e){germanized.admin.shipments.onAddShipmentError(e)},setNeedsSaving:function(e){var n=germanized.admin.shipments,i=n.getActiveShipmentId(),t=!!i&&n.getShipment(i).getShipment();"boolean"!=typeof e&&(e=!0),n.needsSaving=!0===e,n.needsSaving?n.$wrapper.find("#order-shipments-save").show():n.$wrapper.find("#order-shipments-save").hide(),t&&(n.needsSaving?n.disableCreateLabel(t):n.enableCreateLabel(t)),n.needsSaving?n.disableCreateLabel(t):n.enableCreateLabel(t),n.hideOrShowFooter(),d(document.body).trigger("woocommerce_gzd_shipments_needs_saving",[n.needsSaving,n.getActiveShipmentId()]),n.initTiptip()},disableCreateLabel:function(e){var n=germanized.admin.shipments,i=e.find(".create-shipment-label");0<i.length&&(i.addClass("disabled button-disabled"),i.prop("title",n.params.i18n_create_label_disabled))},enableCreateLabel:function(e){var n=germanized.admin.shipments,i=e.find(".create-shipment-label");0<i.length&&(i.removeClass("disabled button-disabled"),i.prop("title",n.params.i18n_create_label_enabled))},setNeedsShipments:function(e){var n=germanized.admin.shipments;"boolean"!=typeof e&&(e=!0),n.needsShipments=!0===e,n.needsShipments?(n.$wrapper.addClass("needs-shipments"),n.$wrapper.find("#order-shipment-add").show()):(n.$wrapper.removeClass("needs-shipments"),n.$wrapper.find("#order-shipment-add").hide()),n.hideOrShowFooter()},hideOrShowReturnTitle:function(){var e=germanized.admin.shipments;0===e.$wrapper.find(".order-shipment.shipment-return").length?e.$wrapper.find(".panel-order-return-title").addClass("hide-default"):e.$wrapper.find(".panel-order-return-title").removeClass("hide-default")},setNeedsReturns:function(e){var n=germanized.admin.shipments;"boolean"!=typeof e&&(e=!0),n.needsReturns=!0===e,n.needsReturns?(n.$wrapper.addClass("needs-returns"),n.$wrapper.find("#order-return-shipment-add").show()):(n.$wrapper.removeClass("needs-returns"),n.$wrapper.find("#order-return-shipment-add").hide()),n.hideOrShowFooter()},hideOrShowFooter:function(){var e=germanized.admin.shipments;e.needsSaving||e.needsShipments||e.needsReturns?e.$wrapper.find(".panel-footer").slideDown(300):e.$wrapper.find(".panel-footer").slideUp(300)},onToggleShipment:function(){var e=germanized.admin.shipments,n=d(this).parents(".order-shipment:first"),i=n.hasClass("active");e.closeShipments(),i||n.find("> .shipment-content-wrapper").slideDown(300,function(){n.addClass("active")})},closeShipments:function(){var e=germanized.admin.shipments;e.$wrapper.find(".order-shipment.active .shipment-content-wrapper").slideUp(300,function(){e.$wrapper.find(".order-shipment.active").removeClass("active")})},initShipments:function(){var n=germanized.admin.shipments;n.$wrapper=d("#panel-order-shipments"),n.$wrapper.find(".order-shipment").each(function(){var e=d(this).data("shipment");n.initShipment(e)}),n.hideOrShowReturnTitle()},getShipments:function(){return germanized.admin.shipments.shipments},getShipment:function(e){var n=germanized.admin.shipments.getShipments();return!!n.hasOwnProperty(e)&&n[e]},refresh:function(e){},refreshItems:function(e){},addItem:function(){},initTiptip:function(){var e=germanized.admin.shipments;d(document.body).trigger("init_tooltips"),e.$wrapper.find(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}),e.$wrapper.find(".create-shipment-label").tipTip({fadeIn:50,fadeOut:50,delay:200})},backbone:{onAddReturnSuccess:function(e){d("#wc-gzd-return-shipment-items").html(e.html),d(".wc-backbone-modal-content article").unblock(),d(document.body).on("change","input.wc-gzd-shipment-add-return-item-quantity",function(){var e,n=d(this),i=n.val();!n.attr("max")||(e=n.attr("max"))<i&&n.val(e)})},init:function(e,n){var i=germanized.admin.shipments;if("wc-gzd-modal-add-shipment-return"===n)return d(".wc-backbone-modal-content article").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),i.doAjax({action:"woocommerce_gzd_get_available_return_shipment_items"},i.backbone.onAddReturnSuccess),!1},response:function(e,n,i){var t=germanized.admin.shipments;"wc-gzd-modal-add-shipment-return"===n&&t.addReturn(i)}}},d(document).ready(function(){germanized.admin.shipments.init()})}(jQuery);
packages/woocommerce-germanized-shipments/assets/js/admin-shipping-provider-method.js CHANGED
@@ -16,6 +16,10 @@ window.germanized.admin = window.germanized.admin || {};
16
 
17
  $( document ).on( 'change', 'select[id$=shipping_provider]', self.showOrHideAll );
18
  $( document.body ).on( 'wc_backbone_modal_loaded', self.onShippingMethodOpen );
 
 
 
 
19
  },
20
 
21
  onShippingMethodOpen: function( e, t ) {
16
 
17
  $( document ).on( 'change', 'select[id$=shipping_provider]', self.showOrHideAll );
18
  $( document.body ).on( 'wc_backbone_modal_loaded', self.onShippingMethodOpen );
19
+
20
+ if ( $( 'select[id$=shipping_provider]' ).length > 0 ) {
21
+ $( 'select[id$=shipping_provider]' ).trigger( 'change' );
22
+ }
23
  },
24
 
25
  onShippingMethodOpen: function( e, t ) {
packages/woocommerce-germanized-shipments/assets/js/admin-shipping-provider-method.min.js CHANGED
@@ -1 +1 @@
1
- window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(r){window.germanized.admin.shipping_provider_method={params:{},currentProvider:"",init:function(){var i=germanized.admin.shipping_provider_method;r(document).on("change","select[id$=shipping_provider]",i.showOrHideAll),r(document.body).on("wc_backbone_modal_loaded",i.onShippingMethodOpen)},onShippingMethodOpen:function(i,e){"wc-modal-shipping-method-settings"===e&&0<r("select[id$=shipping_provider]").length&&r("select[id$=shipping_provider]").trigger("change")},showOrHideAll:function(){var e=germanized.admin.shipping_provider_method,i=r(this),n=i.find("option"),d=i.parents("form");e.currentProvider=i.val(),n.each(function(){var i=r(this).val();0<i.length&&d.find("table.form-table").each(function(){0<r(this).find("input[id*=_"+i+"_]").length&&e.hideTable(r(this))})}),0<e.currentProvider.length&&d.find("table.form-table").each(function(){0<r(this).find("input[id*=_"+e.currentProvider+"_]").length&&e.showTable(r(this))})},hideTable:function(i){if(0<i.find("select[id$=shipping_provider]").length)return!1;i.prevUntil("table.form-table").hide(),i.hide()},showTable:function(i){i.prevUntil("table.form-table").show(),i.show()}},r(document).ready(function(){germanized.admin.shipping_provider_method.init()})}(jQuery);
1
+ window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(r){window.germanized.admin.shipping_provider_method={params:{},currentProvider:"",init:function(){var i=germanized.admin.shipping_provider_method;r(document).on("change","select[id$=shipping_provider]",i.showOrHideAll),r(document.body).on("wc_backbone_modal_loaded",i.onShippingMethodOpen),0<r("select[id$=shipping_provider]").length&&r("select[id$=shipping_provider]").trigger("change")},onShippingMethodOpen:function(i,e){"wc-modal-shipping-method-settings"===e&&0<r("select[id$=shipping_provider]").length&&r("select[id$=shipping_provider]").trigger("change")},showOrHideAll:function(){var e=germanized.admin.shipping_provider_method,i=r(this),n=i.find("option"),d=i.parents("form");e.currentProvider=i.val(),n.each(function(){var i=r(this).val();0<i.length&&d.find("table.form-table").each(function(){0<r(this).find("input[id*=_"+i+"_]").length&&e.hideTable(r(this))})}),0<e.currentProvider.length&&d.find("table.form-table").each(function(){0<r(this).find("input[id*=_"+e.currentProvider+"_]").length&&e.showTable(r(this))})},hideTable:function(i){if(0<i.find("select[id$=shipping_provider]").length)return!1;i.prevUntil("table.form-table").hide(),i.hide()},showTable:function(i){i.prevUntil("table.form-table").show(),i.show()}},r(document).ready(function(){germanized.admin.shipping_provider_method.init()})}(jQuery);
packages/woocommerce-germanized-shipments/assets/js/admin-shipping-providers.min.js CHANGED
@@ -1 +1 @@
1
- window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(d){window.germanized.admin.shipping_providers={params:{},$wrapper:"",init:function(){var e=germanized.admin.shipping_providers;e.params=wc_gzd_admin_shipping_providers_params,e.$wrapper=d(".wc-gzd-shipping-providers"),d(document).on("click",".wc-gzd-shipping-provider-delete",e.onRemoveProvider).on("change",".wc-gzd-shipping-providers input.wc-gzd-shipping-provider-activated-checkbox",this.onChangeProviderStatus)},onChangeProviderStatus:function(){var e=germanized.admin.shipping_providers,i=d(this),r=e.getProviderName(i),n=i.parents("td").find(".woocommerce-gzd-input-toggle"),o={action:"woocommerce_gzd_edit_shipping_provider_status",enable:i.is(":checked")?"yes":"no",provider:r};n.addClass("woocommerce-input-toggle--loading"),e.doAjax(o,e.onChangeProviderStatusSucess)},onChangeProviderStatusSucess:function(e){var i=germanized.admin.shipping_providers.$wrapper.find('tr[data-shipping-provider="'+e.provider+'"]').find(".woocommerce-gzd-input-toggle");i.removeClass("woocommerce-input-toggle--loading"),i.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),"yes"===e.activated?i.addClass("woocommerce-input-toggle--enabled"):i.addClass("woocommerce-input-toggle--disabled")},getProviderName:function(e){germanized.admin.shipping_providers;return e.data("shipping-provider")?e.data("shipping-provider"):0<e.parents("tr").length&&e.parents("tr").data("shipping-provider")},onRemoveProvider:function(){var e=germanized.admin.shipping_providers,i=e.getProviderName(d(this));i&&window.confirm(e.getParams().i18n_remove_shipping_provider_notice)&&e.removeProvider(i);return!1},removeProvider:function(e){var i=germanized.admin.shipping_providers,r={action:"woocommerce_gzd_remove_shipping_provider",provider:e,security:i.getParams().remove_shipping_provider_nonce};i.block(),i.doAjax(r,i.onRemoveProviderSuccess)},onRemoveProviderSuccess:function(e){var i=germanized.admin.shipping_providers.$wrapper.find('tr[data-shipping-provider="'+e.provider+'"]');0<i.length&&i.remove()},block:function(){germanized.admin.shipping_providers.$wrapper.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){germanized.admin.shipping_providers.$wrapper.unblock()},doAjax:function(e,i,r){var n=germanized.admin.shipping_providers,o=n.params.ajax_url,a=n.$wrapper;i=i||n.onAjaxSuccess,r=r||n.onAjaxError,e.hasOwnProperty("security")||(e.security=n.params.edit_shipping_providers_nonce),d.ajax({type:"POST",url:o,data:e,success:function(e){e.success?i.apply(a,[e]):r.apply(a,[e]),n.unblock()},error:function(e){r.apply(a,[e])},dataType:"json"})},onAjaxError:function(e){},onAjaxSuccess:function(e){},getParams:function(){return germanized.admin.shipping_providers.params}},d(document).ready(function(){germanized.admin.shipping_providers.init()})}(jQuery);
1
+ window.germanized=window.germanized||{},window.germanized.admin=window.germanized.admin||{},function(d){window.germanized.admin.shipping_providers={params:{},$wrapper:"",init:function(){var e=germanized.admin.shipping_providers;e.params=wc_gzd_admin_shipping_providers_params,e.$wrapper=d(".wc-gzd-shipping-providers"),d(document).on("click",".wc-gzd-shipping-provider-delete",e.onRemoveProvider).on("change",".wc-gzd-shipping-providers input.wc-gzd-shipping-provider-activated-checkbox",this.onChangeProviderStatus)},onChangeProviderStatus:function(){var e=germanized.admin.shipping_providers,i=d(this),r=e.getProviderName(i),n=i.parents("td").find(".woocommerce-gzd-input-toggle"),o={action:"woocommerce_gzd_edit_shipping_provider_status",enable:i.is(":checked")?"yes":"no",provider:r};n.addClass("woocommerce-input-toggle--loading"),e.doAjax(o,e.onChangeProviderStatusSucess)},onChangeProviderStatusSucess:function(e){var i=germanized.admin.shipping_providers.$wrapper.find('tr[data-shipping-provider="'+e.provider+'"]').find(".woocommerce-gzd-input-toggle");i.removeClass("woocommerce-input-toggle--loading"),i.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),"yes"===e.activated?i.addClass("woocommerce-input-toggle--enabled"):i.addClass("woocommerce-input-toggle--disabled")},getProviderName:function(e){germanized.admin.shipping_providers;return e.data("shipping-provider")?e.data("shipping-provider"):0<e.parents("tr").length&&e.parents("tr").data("shipping-provider")},onRemoveProvider:function(){var e=germanized.admin.shipping_providers,i=e.getProviderName(d(this));return i&&window.confirm(e.getParams().i18n_remove_shipping_provider_notice)&&e.removeProvider(i),!1},removeProvider:function(e){var i=germanized.admin.shipping_providers,r={action:"woocommerce_gzd_remove_shipping_provider",provider:e,security:i.getParams().remove_shipping_provider_nonce};i.block(),i.doAjax(r,i.onRemoveProviderSuccess)},onRemoveProviderSuccess:function(e){var i=germanized.admin.shipping_providers.$wrapper.find('tr[data-shipping-provider="'+e.provider+'"]');0<i.length&&i.remove()},block:function(){germanized.admin.shipping_providers.$wrapper.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){germanized.admin.shipping_providers.$wrapper.unblock()},doAjax:function(e,i,r){var n=germanized.admin.shipping_providers,o=n.params.ajax_url,a=n.$wrapper;i=i||n.onAjaxSuccess,r=r||n.onAjaxError,e.hasOwnProperty("security")||(e.security=n.params.edit_shipping_providers_nonce),d.ajax({type:"POST",url:o,data:e,success:function(e){e.success?i.apply(a,[e]):r.apply(a,[e]),n.unblock()},error:function(e){r.apply(a,[e])},dataType:"json"})},onAjaxError:function(e){},onAjaxSuccess:function(e){},getParams:function(){return germanized.admin.shipping_providers.params}},d(document).ready(function(){germanized.admin.shipping_providers.init()})}(jQuery);
packages/woocommerce-germanized-shipments/includes/wc-gzd-shipment-functions.php CHANGED
@@ -147,8 +147,21 @@ function wc_gzd_get_shipping_provider_method( $instance_id ) {
147
  if ( is_a( $original_id, 'WC_Shipping_Rate' ) ) {
148
  $instance_id = $original_id->get_instance_id();
149
  } elseif( ! is_numeric( $instance_id ) ) {
150
- $expl = explode( ':', $instance_id );
151
- $instance_id = ( ( ! empty( $expl ) && sizeof( $expl ) > 1 ) ? (int) $expl[1] : 0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
153
 
154
  if ( ! empty( $instance_id ) ) {
147
  if ( is_a( $original_id, 'WC_Shipping_Rate' ) ) {
148
  $instance_id = $original_id->get_instance_id();
149
  } elseif( ! is_numeric( $instance_id ) ) {
150
+ if ( strpos( $instance_id, ':' ) !== false ) {
151
+ $expl = explode( ':', $instance_id );
152
+ $instance_id = ( ( ! empty( $expl ) && sizeof( $expl ) > 1 ) ? (int) $expl[1] : 0 );
153
+ } else {
154
+ /**
155
+ * Plugins like Flexible Shipping use underscores to separate instance ids.
156
+ * Example: flexible_shipping_4_1. In this case, 4 ist the instance id. Let's find out.
157
+ */
158
+ $expl = explode( '_', $instance_id );
159
+ $numbers = array_values( array_filter( $expl, 'is_numeric' ) );
160
+
161
+ if ( ! empty( $numbers ) ) {
162
+ $instance_id = absint( $numbers[0] );
163
+ }
164
+ }
165
  }
166
 
167
  if ( ! empty( $instance_id ) ) {
packages/woocommerce-germanized-shipments/src/Admin/Admin.php CHANGED
@@ -588,7 +588,7 @@ class Admin {
588
  }
589
 
590
  // Shipping provider method
591
- if ( 'woocommerce_page_wc-settings' === $screen_id && isset( $_GET['tab'] ) && 'shipping' === $_GET['tab'] && isset( $_GET['zone_id'] ) ) {
592
  wp_enqueue_script( 'wc-gzd-admin-shipping-provider-method' );
593
  }
594
  }
588
  }
589
 
590
  // Shipping provider method
591
+ if ( 'woocommerce_page_wc-settings' === $screen_id && isset( $_GET['tab'] ) && 'shipping' === $_GET['tab'] && ( isset( $_GET['zone_id'] ) || isset( $_GET['instance_id'] ) ) ) {
592
  wp_enqueue_script( 'wc-gzd-admin-shipping-provider-method' );
593
  }
594
  }
packages/woocommerce-germanized-shipments/src/Package.php CHANGED
@@ -17,7 +17,7 @@ class Package {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '1.2.7';
21
 
22
  public static $upload_dir_suffix = '';
23
 
@@ -122,6 +122,10 @@ class Package {
122
 
123
  foreach ( $methods as $method => $class ) {
124
  add_filter( 'woocommerce_shipping_instance_form_fields_' . $method, array( __CLASS__, 'add_method_settings' ), 10, 1 );
 
 
 
 
125
  add_filter( 'woocommerce_shipping_' . $method . '_instance_settings_values', array( __CLASS__, 'filter_method_settings' ), 10, 2 );
126
  }
127
 
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '1.2.8';
21
 
22
  public static $upload_dir_suffix = '';
23
 
122
 
123
  foreach ( $methods as $method => $class ) {
124
  add_filter( 'woocommerce_shipping_instance_form_fields_' . $method, array( __CLASS__, 'add_method_settings' ), 10, 1 );
125
+ /**
126
+ * Use this filter as a backup to support plugins like Flexible Shipping which may override methods
127
+ */
128
+ add_filter( 'woocommerce_settings_api_form_fields_' . $method, array( __CLASS__, 'add_method_settings' ), 10, 1 );
129
  add_filter( 'woocommerce_shipping_' . $method . '_instance_settings_values', array( __CLASS__, 'filter_method_settings' ), 10, 2 );
130
  }
131
 
packages/woocommerce-germanized-shipments/woocommerce-germanized-shipments.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The Germanized Shipments integration, installed as a feature plugin for development and testing purposes.
6
  * Author: vendidero
7
  * Author URI: https://vendidero.de
8
- * Version: 1.2.7
9
  * Requires PHP: 5.6
10
  * License: GPLv3
11
  *
5
  * Description: The Germanized Shipments integration, installed as a feature plugin for development and testing purposes.
6
  * Author: vendidero
7
  * Author URI: https://vendidero.de
8
+ * Version: 1.2.8
9
  * Requires PHP: 5.6
10
  * License: GPLv3
11
  *
packages/woocommerce-trusted-shops/includes/class-wc-trusted-shops-admin.php CHANGED
@@ -621,9 +621,9 @@ class WC_Trusted_Shops_Admin {
621
  array(
622
  'title' => _x( 'WooCommerce status', 'trusted-shops', 'woocommerce-germanized' ),
623
  'desc_tip' => _x( 'We recommend choosing the order status that you set when your products have been shipped.', 'trusted-shops', 'woocommerce-germanized' ),
624
- 'default' => 'wc-completed',
625
  'id' => 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_review_reminder_status',
626
- 'type' => 'select',
627
  'class' => 'chosen_select',
628
  ),
629
 
621
  array(
622
  'title' => _x( 'WooCommerce status', 'trusted-shops', 'woocommerce-germanized' ),
623
  'desc_tip' => _x( 'We recommend choosing the order status that you set when your products have been shipped.', 'trusted-shops', 'woocommerce-germanized' ),
624
+ 'default' => array( 'wc-completed' ),
625
  'id' => 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_review_reminder_status',
626
+ 'type' => 'multiselect',
627
  'class' => 'chosen_select',
628
  ),
629
 
packages/woocommerce-trusted-shops/includes/class-wc-trusted-shops-schedule.php CHANGED
@@ -169,9 +169,15 @@ class WC_Trusted_Shops_Schedule {
169
  return;
170
  }
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(
177
  'relation' => 'AND',
@@ -201,7 +207,10 @@ class WC_Trusted_Shops_Schedule {
201
 
202
  $order_query->next_post();
203
 
204
- $order = wc_get_order( $order_query->post->ID );
 
 
 
205
  $completed_date = apply_filters( 'woocommerce_trusted_shops_review_reminder_order_completed_date', $order->get_date_completed(), $order );
206
 
207
  if ( ! $completed_date ) {
169
  return;
170
  }
171
 
172
+ $order_statuses = $this->base->review_reminder_status;
173
+
174
+ if ( ! is_array( $order_statuses ) ) {
175
+ $order_statuses = array( $order_statuses );
176
+ }
177
+
178
  $args = array(
179
  'post_type' => 'shop_order',
180
+ 'post_status' => apply_filters( 'woocommerce_trusted_shops_review_reminder_valid_order_statuses', $order_statuses ),
181
  'showposts' => -1,
182
  'meta_query' => array(
183
  'relation' => 'AND',
207
 
208
  $order_query->next_post();
209
 
210
+ if ( ! $order = wc_get_order( $order_query->post->ID ) ) {
211
+ continue;
212
+ }
213
+
214
  $completed_date = apply_filters( 'woocommerce_trusted_shops_review_reminder_order_completed_date', $order->get_date_completed(), $order );
215
 
216
  if ( ! $completed_date ) {
packages/woocommerce-trusted-shops/includes/class-wc-ts-install.php CHANGED
@@ -17,7 +17,8 @@ class WC_TS_Install {
17
 
18
  /** @var array DB updates that need to be run */
19
  private static $db_updates = array(
20
- '3.0.0' => 'updates/woocommerce-ts-update-3.0.0.php'
 
21
  );
22
 
23
  /**
17
 
18
  /** @var array DB updates that need to be run */
19
  private static $db_updates = array(
20
+ '3.0.0' => 'updates/woocommerce-ts-update-3.0.0.php',
21
+ '4.0.6' => 'updates/woocommerce-ts-update-4.0.6.php'
22
  );
23
 
24
  /**
packages/woocommerce-trusted-shops/includes/updates/woocommerce-ts-update-4.0.6.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ // TS Option updates
8
+ $status = get_option( 'woocommerce_trusted_shops_review_reminder_status' );
9
+
10
+ if ( ! empty( $status ) && ! is_array( $status ) ) {
11
+ $status = array( $status );
12
+ update_option( 'woocommerce_trusted_shops_review_reminder_status', $status );
13
+ }
14
+ ?>
packages/woocommerce-trusted-shops/src/Package.php CHANGED
@@ -16,7 +16,7 @@ class Package {
16
  *
17
  * @var string
18
  */
19
- const VERSION = '4.0.5';
20
 
21
  /**
22
  * Init the package - load the REST API Server class.
16
  *
17
  * @var string
18
  */
19
+ const VERSION = '4.0.6';
20
 
21
  /**
22
  * Init the package - load the REST API Server class.
packages/woocommerce-trusted-shops/woocommerce-trusted-shops.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Trustbadge Reviews for WooCommerce
4
  * Plugin URI: http://www.trustedshops.co.uk/
5
  * Description: Adds Seller and Product Reviews or Trusted Shops Integration to your WooCommerce Shop.
6
- * Version: 4.0.5
7
  * Author: vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 4.9
3
  * Plugin Name: Trustbadge Reviews for WooCommerce
4
  * Plugin URI: http://www.trustedshops.co.uk/
5
  * Description: Adds Seller and Product Reviews or Trusted Shops Integration to your WooCommerce Shop.
6
+ * Version: 4.0.6
7
  * Author: vendidero
8
  * Author URI: http://vendidero.de
9
  * Requires at least: 4.9
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.9
5
  Tested up to: 5.4
6
  WC requires at least: 3.4
7
  WC tested up to: 4.2
8
- Stable tag: 3.1.8
9
  Requires PHP: 5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -189,6 +189,18 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
189
  5. Manage shipments for orders
190
 
191
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
192
  = 3.1.8 =
193
  * Fix: Readded legal class to terms checkbox container
194
  * Improvement: Added woocommerce_gzd_cart_taxes filter to adjust cart tax displays
5
  Tested up to: 5.4
6
  WC requires at least: 3.4
7
  WC tested up to: 4.2
8
+ Stable tag: 3.1.9
9
  Requires PHP: 5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
189
  5. Manage shipments for orders
190
 
191
  == Changelog ==
192
+ = 3.1.9 =
193
+ * Feature: Trusted Shops - Allow selecting multiple order statuses to send review reminder
194
+ * Improvement: Added wc_gzd_is_small_business function
195
+ * Improvement: Third party shipping costs compatibility for Shipments & DHL
196
+ * Improvement: Better customer title support for Flexible Checkout Fields Plugin
197
+ * Improvement: Use order item get_rate_percent if available
198
+ * Improvement: Small business single product page tax notice shopmark
199
+ * Improvement: Tax rate install adjustments
200
+ * Improvement: Better SEPA XML error prevention
201
+ * Fix: Remove queued Woo notices on deactivation
202
+ * Fix: Prefer order item meta over product data
203
+
204
  = 3.1.8 =
205
  * Fix: Readded legal class to terms checkbox container
206
  * Improvement: Added woocommerce_gzd_cart_taxes filter to adjust cart tax displays
templates/footer/vat-info.php CHANGED
@@ -12,13 +12,13 @@
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
- * @version 1.0.0
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
19
  } // Exit if accessed directly
20
  ?>
21
- <?php if ( get_option( 'woocommerce_gzd_small_enterprise' ) != 'yes' ) : ?>
22
  <p class="footer-info vat-info"><?php echo ( get_option( 'woocommerce_tax_display_shop' ) == 'incl' ) ? __( 'All prices incl. VAT.', 'woocommerce-germanized' ) : __( 'All prices excl. VAT.', 'woocommerce-germanized' ) ?></p>
23
  <?php else : ?>
24
  <p class="footer-info vat-info"><?php echo wc_gzd_get_small_business_notice(); ?></p>
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
+ * @version 1.0.1
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
19
  } // Exit if accessed directly
20
  ?>
21
+ <?php if ( ! wc_gzd_is_small_business() ) : ?>
22
  <p class="footer-info vat-info"><?php echo ( get_option( 'woocommerce_tax_display_shop' ) == 'incl' ) ? __( 'All prices incl. VAT.', 'woocommerce-germanized' ) : __( 'All prices excl. VAT.', 'woocommerce-germanized' ) ?></p>
23
  <?php else : ?>
24
  <p class="footer-info vat-info"><?php echo wc_gzd_get_small_business_notice(); ?></p>
templates/single-product/legal-info.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
- * @version 3.0.0
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
@@ -24,7 +24,7 @@ global $product;
24
  <p class="wc-gzd-additional-info">
25
  <?php if ( wc_gzd_get_product( $product )->get_tax_info() && get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ) : ?>
26
  <span class="wc-gzd-additional-info tax-info"><?php echo wc_gzd_get_product( $product )->get_tax_info(); ?></span>
27
- <?php elseif ( ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' && get_option( 'woocommerce_gzd_display_product_detail_small_enterprise' ) == 'yes' ) ) : ?>
28
  <span class="wc-gzd-additional-info small-business-info"><?php echo wc_gzd_get_small_business_product_notice(); ?></span>
29
  <?php endif; ?>
30
  <?php if ( wc_gzd_get_product( $product )->get_shipping_costs_html() && get_option( 'woocommerce_gzd_display_product_detail_shipping_costs_info' ) == 'yes' ) : ?>
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
+ * @version 3.0.1
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
24
  <p class="wc-gzd-additional-info">
25
  <?php if ( wc_gzd_get_product( $product )->get_tax_info() && get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ) : ?>
26
  <span class="wc-gzd-additional-info tax-info"><?php echo wc_gzd_get_product( $product )->get_tax_info(); ?></span>
27
+ <?php elseif ( ( wc_gzd_is_small_business() && get_option( 'woocommerce_gzd_display_product_detail_tax_info' ) == 'yes' ) ) : ?>
28
  <span class="wc-gzd-additional-info small-business-info"><?php echo wc_gzd_get_small_business_product_notice(); ?></span>
29
  <?php endif; ?>
30
  <?php if ( wc_gzd_get_product( $product )->get_shipping_costs_html() && get_option( 'woocommerce_gzd_display_product_detail_shipping_costs_info' ) == 'yes' ) : ?>
templates/single-product/tax-info.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
- * @version 3.0.0
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
@@ -23,6 +23,6 @@ global $product;
23
 
24
  <?php if ( wc_gzd_get_product( $product )->get_tax_info() ) : ?>
25
  <p class="wc-gzd-additional-info tax-info"><?php echo wc_gzd_get_product( $product )->get_tax_info(); ?></p>
26
- <?php elseif ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) : ?>
27
  <p class="wc-gzd-additional-info small-business-info"><?php echo wc_gzd_get_small_business_product_notice(); ?></p>
28
  <?php endif; ?>
12
  *
13
  * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
14
  * @package Germanized/Templates
15
+ * @version 3.0.1
16
  */
17
  if ( ! defined( 'ABSPATH' ) ) {
18
  exit;
23
 
24
  <?php if ( wc_gzd_get_product( $product )->get_tax_info() ) : ?>
25
  <p class="wc-gzd-additional-info tax-info"><?php echo wc_gzd_get_product( $product )->get_tax_info(); ?></p>
26
+ <?php elseif ( wc_gzd_is_small_business() ) : ?>
27
  <p class="wc-gzd-additional-info small-business-info"><?php echo wc_gzd_get_small_business_product_notice(); ?></p>
28
  <?php endif; ?>
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitd189e63f64e7bdc8a91c8516f9161f97::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitd1880e770d75e352cdfee55f84f3702e::getLoader();
vendor/autoload_packages.php CHANGED
@@ -120,10 +120,10 @@ if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) {
120
  /**
121
  * Prepare all the classes for autoloading.
122
  */
123
- function enqueue_packages_4ef7766d1df2fed2a969eb787c0024f9() {
124
  $class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
125
  foreach ( $class_map as $class_name => $class_info ) {
126
  enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );
127
  }
128
  }
129
- enqueue_packages_4ef7766d1df2fed2a969eb787c0024f9();
120
  /**
121
  * Prepare all the classes for autoloading.
122
  */
123
+ function enqueue_packages_217ce3380ae330781e88cd0e331b728e() {
124
  $class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
125
  foreach ( $class_map as $class_name => $class_info ) {
126
  enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );
127
  }
128
  }
129
+ enqueue_packages_217ce3380ae330781e88cd0e331b728e();
vendor/composer/autoload_classmap_package.php CHANGED
@@ -195,275 +195,275 @@ return array(
195
  'path' => $vendorDir . '/setasign/fpdi/src/FpdfTpl.php'
196
  ),
197
  'Vendidero\\TrustedShops\\Package' => array(
198
- 'version' => '4.0.5.0',
199
  'path' => $baseDir . '/packages/woocommerce-trusted-shops/src/Package.php'
200
  ),
201
  'Vendidero\\Germanized\\Shipments\\Shipment' => array(
202
- 'version' => '1.2.7.0',
203
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Shipment.php'
204
  ),
205
  'Vendidero\\Germanized\\Shipments\\Install' => array(
206
- 'version' => '1.2.7.0',
207
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Install.php'
208
  ),
209
  'Vendidero\\Germanized\\Shipments\\SimpleShipment' => array(
210
- 'version' => '1.2.7.0',
211
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/SimpleShipment.php'
212
  ),
213
  'Vendidero\\Germanized\\Shipments\\ShippingProviderMethod' => array(
214
- 'version' => '1.2.7.0',
215
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviderMethod.php'
216
  ),
217
  'Vendidero\\Germanized\\Shipments\\Package' => array(
218
- 'version' => '1.2.7.0',
219
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Package.php'
220
  ),
221
  'Vendidero\\Germanized\\Shipments\\Order' => array(
222
- 'version' => '1.2.7.0',
223
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Order.php'
224
  ),
225
  'Vendidero\\Germanized\\Shipments\\DataStores\\Shipment' => array(
226
- 'version' => '1.2.7.0',
227
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/Shipment.php'
228
  ),
229
  'Vendidero\\Germanized\\Shipments\\DataStores\\ShippingProvider' => array(
230
- 'version' => '1.2.7.0',
231
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/ShippingProvider.php'
232
  ),
233
  'Vendidero\\Germanized\\Shipments\\DataStores\\ShipmentItem' => array(
234
- 'version' => '1.2.7.0',
235
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/ShipmentItem.php'
236
  ),
237
  'Vendidero\\Germanized\\Shipments\\Ajax' => array(
238
- 'version' => '1.2.7.0',
239
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Ajax.php'
240
  ),
241
  'Vendidero\\Germanized\\Shipments\\ReturnShipment' => array(
242
- 'version' => '1.2.7.0',
243
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ReturnShipment.php'
244
  ),
245
  'Vendidero\\Germanized\\Shipments\\ShippingProvider' => array(
246
- 'version' => '1.2.7.0',
247
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProvider.php'
248
  ),
249
  'Vendidero\\Germanized\\Shipments\\AddressSplitter' => array(
250
- 'version' => '1.2.7.0',
251
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/AddressSplitter.php'
252
  ),
253
  'Vendidero\\Germanized\\Shipments\\Admin\\BulkLabel' => array(
254
- 'version' => '1.2.7.0',
255
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/BulkLabel.php'
256
  ),
257
  'Vendidero\\Germanized\\Shipments\\Admin\\Settings' => array(
258
- 'version' => '1.2.7.0',
259
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Settings.php'
260
  ),
261
  'Vendidero\\Germanized\\Shipments\\Admin\\MetaBox' => array(
262
- 'version' => '1.2.7.0',
263
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/MetaBox.php'
264
  ),
265
  'Vendidero\\Germanized\\Shipments\\Admin\\DownloadHandler' => array(
266
- 'version' => '1.2.7.0',
267
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/DownloadHandler.php'
268
  ),
269
  'Vendidero\\Germanized\\Shipments\\Admin\\ReturnTable' => array(
270
- 'version' => '1.2.7.0',
271
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/ReturnTable.php'
272
  ),
273
  'Vendidero\\Germanized\\Shipments\\Admin\\BulkActionHandler' => array(
274
- 'version' => '1.2.7.0',
275
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/BulkActionHandler.php'
276
  ),
277
  'Vendidero\\Germanized\\Shipments\\Admin\\Admin' => array(
278
- 'version' => '1.2.7.0',
279
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Admin.php'
280
  ),
281
  'Vendidero\\Germanized\\Shipments\\Admin\\Table' => array(
282
- 'version' => '1.2.7.0',
283
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Table.php'
284
  ),
285
  'Vendidero\\Germanized\\Shipments\\ShipmentQuery' => array(
286
- 'version' => '1.2.7.0',
287
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentQuery.php'
288
  ),
289
  'Vendidero\\Germanized\\Shipments\\WPMLHelper' => array(
290
- 'version' => '1.2.7.0',
291
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/WPMLHelper.php'
292
  ),
293
  'Vendidero\\Germanized\\Shipments\\ShipmentReturnItem' => array(
294
- 'version' => '1.2.7.0',
295
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentReturnItem.php'
296
  ),
297
  'Vendidero\\Germanized\\Shipments\\FormHandler' => array(
298
- 'version' => '1.2.7.0',
299
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/FormHandler.php'
300
  ),
301
  'Vendidero\\Germanized\\Shipments\\PDFMerger' => array(
302
- 'version' => '1.2.7.0',
303
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/PDFMerger.php'
304
  ),
305
  'Vendidero\\Germanized\\Shipments\\ShipmentFactory' => array(
306
- 'version' => '1.2.7.0',
307
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentFactory.php'
308
  ),
309
  'Vendidero\\Germanized\\Shipments\\ShippingProviderMethodPlaceholder' => array(
310
- 'version' => '1.2.7.0',
311
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviderMethodPlaceholder.php'
312
  ),
313
  'Vendidero\\Germanized\\Shipments\\Automation' => array(
314
- 'version' => '1.2.7.0',
315
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Automation.php'
316
  ),
317
  'Vendidero\\Germanized\\Shipments\\ShippingProviders' => array(
318
- 'version' => '1.2.7.0',
319
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviders.php'
320
  ),
321
  'Vendidero\\Germanized\\Shipments\\Api' => array(
322
- 'version' => '1.2.7.0',
323
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Api.php'
324
  ),
325
  'Vendidero\\Germanized\\Shipments\\ShipmentItem' => array(
326
- 'version' => '1.2.7.0',
327
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentItem.php'
328
  ),
329
  'Vendidero\\Germanized\\Shipments\\Validation' => array(
330
- 'version' => '1.2.7.0',
331
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Validation.php'
332
  ),
333
  'Vendidero\\Germanized\\Shipments\\Emails' => array(
334
- 'version' => '1.2.7.0',
335
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Emails.php'
336
  ),
337
  'Vendidero\\Germanized\\Shipments\\PDFSplitter' => array(
338
- 'version' => '1.2.7.0',
339
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/PDFSplitter.php'
340
  ),
341
  'Vendidero\\Germanized\\Shipments\\ReturnReason' => array(
342
- 'version' => '1.2.7.0',
343
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ReturnReason.php'
344
  ),
345
  'Vendidero\\Germanized\\Shipments\\Interfaces\\ShipmentReturnLabel' => array(
346
- 'version' => '1.2.7.0',
347
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Interfaces/ShipmenReturnLabel.php'
348
  ),
349
  'Vendidero\\Germanized\\Shipments\\Interfaces\\ShipmentLabel' => array(
350
- 'version' => '1.2.7.0',
351
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Interfaces/ShipmentLabel.php'
352
  ),
353
  'Vendidero\\Germanized\\DHL\\ShippingProviderDHL' => array(
354
- 'version' => '1.2.6.0',
355
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShippingProviderDHL.php'
356
  ),
357
  'Vendidero\\Germanized\\DHL\\ShippingProviderMethodDHL' => array(
358
- 'version' => '1.2.6.0',
359
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShippingProviderMethodDHL.php'
360
  ),
361
  'Vendidero\\Germanized\\DHL\\Install' => array(
362
- 'version' => '1.2.6.0',
363
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Install.php'
364
  ),
365
  'Vendidero\\Germanized\\DHL\\LabelQuery' => array(
366
- 'version' => '1.2.6.0',
367
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelQuery.php'
368
  ),
369
  'Vendidero\\Germanized\\DHL\\ShipmentLabelWatcher' => array(
370
- 'version' => '1.2.6.0',
371
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShipmentLabelWatcher.php'
372
  ),
373
  'Vendidero\\Germanized\\DHL\\Package' => array(
374
- 'version' => '1.2.6.0',
375
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Package.php'
376
  ),
377
  'Vendidero\\Germanized\\DHL\\Product' => array(
378
- 'version' => '1.2.6.0',
379
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Product.php'
380
  ),
381
  'Vendidero\\Germanized\\DHL\\Order' => array(
382
- 'version' => '1.2.6.0',
383
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Order.php'
384
  ),
385
  'Vendidero\\Germanized\\DHL\\DataStores\\Label' => array(
386
- 'version' => '1.2.6.0',
387
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/DataStores/Label.php'
388
  ),
389
  'Vendidero\\Germanized\\DHL\\Label' => array(
390
- 'version' => '1.2.6.0',
391
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Label.php'
392
  ),
393
  'Vendidero\\Germanized\\DHL\\ParcelServices' => array(
394
- 'version' => '1.2.6.0',
395
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ParcelServices.php'
396
  ),
397
  'Vendidero\\Germanized\\DHL\\Admin\\Importer' => array(
398
- 'version' => '1.2.6.0',
399
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Importer.php'
400
  ),
401
  'Vendidero\\Germanized\\DHL\\Admin\\Settings' => array(
402
- 'version' => '1.2.6.0',
403
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Settings.php'
404
  ),
405
  'Vendidero\\Germanized\\DHL\\Admin\\Admin' => array(
406
- 'version' => '1.2.6.0',
407
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Admin.php'
408
  ),
409
  'Vendidero\\Germanized\\DHL\\ReturnLabel' => array(
410
- 'version' => '1.2.6.0',
411
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ReturnLabel.php'
412
  ),
413
  'Vendidero\\Germanized\\DHL\\ParcelLocator' => array(
414
- 'version' => '1.2.6.0',
415
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ParcelLocator.php'
416
  ),
417
  'Vendidero\\Germanized\\DHL\\SimpleLabel' => array(
418
- 'version' => '1.2.6.0',
419
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/SimpleLabel.php'
420
  ),
421
  'Vendidero\\Germanized\\DHL\\Admin\\DownloadHandler' => array(
422
- 'version' => '1.2.6.0',
423
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/DownloadHandler.php'
424
  ),
425
  'Vendidero\\Germanized\\DHL\\Api\\ReturnRest' => array(
426
- 'version' => '1.2.6.0',
427
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/ReturnRest.php'
428
  ),
429
  'Vendidero\\Germanized\\DHL\\Api\\Paket' => array(
430
- 'version' => '1.2.6.0',
431
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Paket.php'
432
  ),
433
  'Vendidero\\Germanized\\DHL\\Api\\LabelSoap' => array(
434
- 'version' => '1.2.6.0',
435
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/LabelSoap.php'
436
  ),
437
  'Vendidero\\Germanized\\DHL\\Api\\AuthSoap' => array(
438
- 'version' => '1.2.6.0',
439
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/AuthSoap.php'
440
  ),
441
  'Vendidero\\Germanized\\DHL\\Api\\ParcelRest' => array(
442
- 'version' => '1.2.6.0',
443
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/ParcelRest.php'
444
  ),
445
  'Vendidero\\Germanized\\DHL\\Api\\Soap' => array(
446
- 'version' => '1.2.6.0',
447
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Soap.php'
448
  ),
449
  'Vendidero\\Germanized\\DHL\\Api\\Rest' => array(
450
- 'version' => '1.2.6.0',
451
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Rest.php'
452
  ),
453
  'Vendidero\\Germanized\\DHL\\Api\\FinderSoap' => array(
454
- 'version' => '1.2.6.0',
455
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/FinderSoap.php'
456
  ),
457
  'Vendidero\\Germanized\\DHL\\Automation' => array(
458
- 'version' => '1.2.6.0',
459
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Automation.php'
460
  ),
461
  'Vendidero\\Germanized\\DHL\\LabelFactory' => array(
462
- 'version' => '1.2.6.0',
463
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelFactory.php'
464
  ),
465
  'Vendidero\\Germanized\\DHL\\LabelWatcher' => array(
466
- 'version' => '1.2.6.0',
467
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelWatcher.php'
468
  ),
469
  'Vendidero\\Germanized\\Shopmark' => array(
195
  'path' => $vendorDir . '/setasign/fpdi/src/FpdfTpl.php'
196
  ),
197
  'Vendidero\\TrustedShops\\Package' => array(
198
+ 'version' => '4.0.6.0',
199
  'path' => $baseDir . '/packages/woocommerce-trusted-shops/src/Package.php'
200
  ),
201
  'Vendidero\\Germanized\\Shipments\\Shipment' => array(
202
+ 'version' => '1.2.8.0',
203
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Shipment.php'
204
  ),
205
  'Vendidero\\Germanized\\Shipments\\Install' => array(
206
+ 'version' => '1.2.8.0',
207
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Install.php'
208
  ),
209
  'Vendidero\\Germanized\\Shipments\\SimpleShipment' => array(
210
+ 'version' => '1.2.8.0',
211
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/SimpleShipment.php'
212
  ),
213
  'Vendidero\\Germanized\\Shipments\\ShippingProviderMethod' => array(
214
+ 'version' => '1.2.8.0',
215
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviderMethod.php'
216
  ),
217
  'Vendidero\\Germanized\\Shipments\\Package' => array(
218
+ 'version' => '1.2.8.0',
219
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Package.php'
220
  ),
221
  'Vendidero\\Germanized\\Shipments\\Order' => array(
222
+ 'version' => '1.2.8.0',
223
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Order.php'
224
  ),
225
  'Vendidero\\Germanized\\Shipments\\DataStores\\Shipment' => array(
226
+ 'version' => '1.2.8.0',
227
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/Shipment.php'
228
  ),
229
  'Vendidero\\Germanized\\Shipments\\DataStores\\ShippingProvider' => array(
230
+ 'version' => '1.2.8.0',
231
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/ShippingProvider.php'
232
  ),
233
  'Vendidero\\Germanized\\Shipments\\DataStores\\ShipmentItem' => array(
234
+ 'version' => '1.2.8.0',
235
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/DataStores/ShipmentItem.php'
236
  ),
237
  'Vendidero\\Germanized\\Shipments\\Ajax' => array(
238
+ 'version' => '1.2.8.0',
239
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Ajax.php'
240
  ),
241
  'Vendidero\\Germanized\\Shipments\\ReturnShipment' => array(
242
+ 'version' => '1.2.8.0',
243
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ReturnShipment.php'
244
  ),
245
  'Vendidero\\Germanized\\Shipments\\ShippingProvider' => array(
246
+ 'version' => '1.2.8.0',
247
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProvider.php'
248
  ),
249
  'Vendidero\\Germanized\\Shipments\\AddressSplitter' => array(
250
+ 'version' => '1.2.8.0',
251
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/AddressSplitter.php'
252
  ),
253
  'Vendidero\\Germanized\\Shipments\\Admin\\BulkLabel' => array(
254
+ 'version' => '1.2.8.0',
255
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/BulkLabel.php'
256
  ),
257
  'Vendidero\\Germanized\\Shipments\\Admin\\Settings' => array(
258
+ 'version' => '1.2.8.0',
259
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Settings.php'
260
  ),
261
  'Vendidero\\Germanized\\Shipments\\Admin\\MetaBox' => array(
262
+ 'version' => '1.2.8.0',
263
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/MetaBox.php'
264
  ),
265
  'Vendidero\\Germanized\\Shipments\\Admin\\DownloadHandler' => array(
266
+ 'version' => '1.2.8.0',
267
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/DownloadHandler.php'
268
  ),
269
  'Vendidero\\Germanized\\Shipments\\Admin\\ReturnTable' => array(
270
+ 'version' => '1.2.8.0',
271
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/ReturnTable.php'
272
  ),
273
  'Vendidero\\Germanized\\Shipments\\Admin\\BulkActionHandler' => array(
274
+ 'version' => '1.2.8.0',
275
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/BulkActionHandler.php'
276
  ),
277
  'Vendidero\\Germanized\\Shipments\\Admin\\Admin' => array(
278
+ 'version' => '1.2.8.0',
279
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Admin.php'
280
  ),
281
  'Vendidero\\Germanized\\Shipments\\Admin\\Table' => array(
282
+ 'version' => '1.2.8.0',
283
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Admin/Table.php'
284
  ),
285
  'Vendidero\\Germanized\\Shipments\\ShipmentQuery' => array(
286
+ 'version' => '1.2.8.0',
287
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentQuery.php'
288
  ),
289
  'Vendidero\\Germanized\\Shipments\\WPMLHelper' => array(
290
+ 'version' => '1.2.8.0',
291
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/WPMLHelper.php'
292
  ),
293
  'Vendidero\\Germanized\\Shipments\\ShipmentReturnItem' => array(
294
+ 'version' => '1.2.8.0',
295
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentReturnItem.php'
296
  ),
297
  'Vendidero\\Germanized\\Shipments\\FormHandler' => array(
298
+ 'version' => '1.2.8.0',
299
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/FormHandler.php'
300
  ),
301
  'Vendidero\\Germanized\\Shipments\\PDFMerger' => array(
302
+ 'version' => '1.2.8.0',
303
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/PDFMerger.php'
304
  ),
305
  'Vendidero\\Germanized\\Shipments\\ShipmentFactory' => array(
306
+ 'version' => '1.2.8.0',
307
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentFactory.php'
308
  ),
309
  'Vendidero\\Germanized\\Shipments\\ShippingProviderMethodPlaceholder' => array(
310
+ 'version' => '1.2.8.0',
311
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviderMethodPlaceholder.php'
312
  ),
313
  'Vendidero\\Germanized\\Shipments\\Automation' => array(
314
+ 'version' => '1.2.8.0',
315
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Automation.php'
316
  ),
317
  'Vendidero\\Germanized\\Shipments\\ShippingProviders' => array(
318
+ 'version' => '1.2.8.0',
319
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShippingProviders.php'
320
  ),
321
  'Vendidero\\Germanized\\Shipments\\Api' => array(
322
+ 'version' => '1.2.8.0',
323
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Api.php'
324
  ),
325
  'Vendidero\\Germanized\\Shipments\\ShipmentItem' => array(
326
+ 'version' => '1.2.8.0',
327
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ShipmentItem.php'
328
  ),
329
  'Vendidero\\Germanized\\Shipments\\Validation' => array(
330
+ 'version' => '1.2.8.0',
331
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Validation.php'
332
  ),
333
  'Vendidero\\Germanized\\Shipments\\Emails' => array(
334
+ 'version' => '1.2.8.0',
335
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Emails.php'
336
  ),
337
  'Vendidero\\Germanized\\Shipments\\PDFSplitter' => array(
338
+ 'version' => '1.2.8.0',
339
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/PDFSplitter.php'
340
  ),
341
  'Vendidero\\Germanized\\Shipments\\ReturnReason' => array(
342
+ 'version' => '1.2.8.0',
343
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/ReturnReason.php'
344
  ),
345
  'Vendidero\\Germanized\\Shipments\\Interfaces\\ShipmentReturnLabel' => array(
346
+ 'version' => '1.2.8.0',
347
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Interfaces/ShipmenReturnLabel.php'
348
  ),
349
  'Vendidero\\Germanized\\Shipments\\Interfaces\\ShipmentLabel' => array(
350
+ 'version' => '1.2.8.0',
351
  'path' => $baseDir . '/packages/woocommerce-germanized-shipments/src/Interfaces/ShipmentLabel.php'
352
  ),
353
  'Vendidero\\Germanized\\DHL\\ShippingProviderDHL' => array(
354
+ 'version' => '1.2.7.0',
355
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShippingProviderDHL.php'
356
  ),
357
  'Vendidero\\Germanized\\DHL\\ShippingProviderMethodDHL' => array(
358
+ 'version' => '1.2.7.0',
359
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShippingProviderMethodDHL.php'
360
  ),
361
  'Vendidero\\Germanized\\DHL\\Install' => array(
362
+ 'version' => '1.2.7.0',
363
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Install.php'
364
  ),
365
  'Vendidero\\Germanized\\DHL\\LabelQuery' => array(
366
+ 'version' => '1.2.7.0',
367
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelQuery.php'
368
  ),
369
  'Vendidero\\Germanized\\DHL\\ShipmentLabelWatcher' => array(
370
+ 'version' => '1.2.7.0',
371
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ShipmentLabelWatcher.php'
372
  ),
373
  'Vendidero\\Germanized\\DHL\\Package' => array(
374
+ 'version' => '1.2.7.0',
375
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Package.php'
376
  ),
377
  'Vendidero\\Germanized\\DHL\\Product' => array(
378
+ 'version' => '1.2.7.0',
379
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Product.php'
380
  ),
381
  'Vendidero\\Germanized\\DHL\\Order' => array(
382
+ 'version' => '1.2.7.0',
383
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Order.php'
384
  ),
385
  'Vendidero\\Germanized\\DHL\\DataStores\\Label' => array(
386
+ 'version' => '1.2.7.0',
387
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/DataStores/Label.php'
388
  ),
389
  'Vendidero\\Germanized\\DHL\\Label' => array(
390
+ 'version' => '1.2.7.0',
391
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Label.php'
392
  ),
393
  'Vendidero\\Germanized\\DHL\\ParcelServices' => array(
394
+ 'version' => '1.2.7.0',
395
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ParcelServices.php'
396
  ),
397
  'Vendidero\\Germanized\\DHL\\Admin\\Importer' => array(
398
+ 'version' => '1.2.7.0',
399
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Importer.php'
400
  ),
401
  'Vendidero\\Germanized\\DHL\\Admin\\Settings' => array(
402
+ 'version' => '1.2.7.0',
403
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Settings.php'
404
  ),
405
  'Vendidero\\Germanized\\DHL\\Admin\\Admin' => array(
406
+ 'version' => '1.2.7.0',
407
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Admin/Admin.php'
408
  ),
409
  'Vendidero\\Germanized\\DHL\\ReturnLabel' => array(
410
+ 'version' => '1.2.7.0',
411
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ReturnLabel.php'
412
  ),
413
  'Vendidero\\Germanized\\DHL\\ParcelLocator' => array(
414
+ 'version' => '1.2.7.0',
415
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/ParcelLocator.php'
416
  ),
417
  'Vendidero\\Germanized\\DHL\\SimpleLabel' => array(
418
+ 'version' => '1.2.7.0',
419
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/SimpleLabel.php'
420
  ),
421
  'Vendidero\\Germanized\\DHL\\Admin\\DownloadHandler' => array(
422
+ 'version' => '1.2.7.0',
423
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/DownloadHandler.php'
424
  ),
425
  'Vendidero\\Germanized\\DHL\\Api\\ReturnRest' => array(
426
+ 'version' => '1.2.7.0',
427
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/ReturnRest.php'
428
  ),
429
  'Vendidero\\Germanized\\DHL\\Api\\Paket' => array(
430
+ 'version' => '1.2.7.0',
431
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Paket.php'
432
  ),
433
  'Vendidero\\Germanized\\DHL\\Api\\LabelSoap' => array(
434
+ 'version' => '1.2.7.0',
435
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/LabelSoap.php'
436
  ),
437
  'Vendidero\\Germanized\\DHL\\Api\\AuthSoap' => array(
438
+ 'version' => '1.2.7.0',
439
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/AuthSoap.php'
440
  ),
441
  'Vendidero\\Germanized\\DHL\\Api\\ParcelRest' => array(
442
+ 'version' => '1.2.7.0',
443
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/ParcelRest.php'
444
  ),
445
  'Vendidero\\Germanized\\DHL\\Api\\Soap' => array(
446
+ 'version' => '1.2.7.0',
447
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Soap.php'
448
  ),
449
  'Vendidero\\Germanized\\DHL\\Api\\Rest' => array(
450
+ 'version' => '1.2.7.0',
451
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/Rest.php'
452
  ),
453
  'Vendidero\\Germanized\\DHL\\Api\\FinderSoap' => array(
454
+ 'version' => '1.2.7.0',
455
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Api/FinderSoap.php'
456
  ),
457
  'Vendidero\\Germanized\\DHL\\Automation' => array(
458
+ 'version' => '1.2.7.0',
459
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/Automation.php'
460
  ),
461
  'Vendidero\\Germanized\\DHL\\LabelFactory' => array(
462
+ 'version' => '1.2.7.0',
463
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelFactory.php'
464
  ),
465
  'Vendidero\\Germanized\\DHL\\LabelWatcher' => array(
466
+ 'version' => '1.2.7.0',
467
  'path' => $baseDir . '/packages/woocommerce-germanized-dhl/src/LabelWatcher.php'
468
  ),
469
  'Vendidero\\Germanized\\Shopmark' => array(
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitd189e63f64e7bdc8a91c8516f9161f97
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitd189e63f64e7bdc8a91c8516f9161f97
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitd189e63f64e7bdc8a91c8516f9161f97', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitd189e63f64e7bdc8a91c8516f9161f97', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitd1880e770d75e352cdfee55f84f3702e
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitd1880e770d75e352cdfee55f84f3702e', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitd1880e770d75e352cdfee55f84f3702e', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitd1880e770d75e352cdfee55f84f3702e::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  's' =>
@@ -66,9 +66,9 @@ class ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
- $loader->prefixLengthsPsr4 = ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97::$prefixLengthsPsr4;
70
- $loader->prefixDirsPsr4 = ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97::$prefixDirsPsr4;
71
- $loader->classMap = ComposerStaticInitd189e63f64e7bdc8a91c8516f9161f97::$classMap;
72
 
73
  }, null, ClassLoader::class);
74
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitd1880e770d75e352cdfee55f84f3702e
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  's' =>
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
+ $loader->prefixLengthsPsr4 = ComposerStaticInitd1880e770d75e352cdfee55f84f3702e::$prefixLengthsPsr4;
70
+ $loader->prefixDirsPsr4 = ComposerStaticInitd1880e770d75e352cdfee55f84f3702e::$prefixDirsPsr4;
71
+ $loader->classMap = ComposerStaticInitd1880e770d75e352cdfee55f84f3702e::$classMap;
72
 
73
  }, null, ClassLoader::class);
74
  }
vendor/composer/installed.json CHANGED
@@ -309,17 +309,17 @@
309
  },
310
  {
311
  "name": "vendidero/woocommerce-germanized-dhl",
312
- "version": "v1.2.6",
313
- "version_normalized": "1.2.6.0",
314
  "source": {
315
  "type": "git",
316
  "url": "https://github.com/vendidero/woocommerce-germanized-dhl.git",
317
- "reference": "a1fee5866c6881f5a68e5b0971da63f519e3fbaf"
318
  },
319
  "dist": {
320
  "type": "zip",
321
- "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-dhl/zipball/a1fee5866c6881f5a68e5b0971da63f519e3fbaf",
322
- "reference": "a1fee5866c6881f5a68e5b0971da63f519e3fbaf",
323
  "shasum": ""
324
  },
325
  "require": {
@@ -329,7 +329,7 @@
329
  "phpunit/phpunit": "6.5.14",
330
  "woocommerce/woocommerce-sniffs": "0.0.6"
331
  },
332
- "time": "2020-05-28T11:28:49+00:00",
333
  "type": "wordpress-plugin",
334
  "installation-source": "dist",
335
  "autoload": {
@@ -353,23 +353,23 @@
353
  "description": "The Germanized DHL implementation.",
354
  "homepage": "https://github.com/vendidero/woocommerce-germanized-dhl",
355
  "support": {
356
- "source": "https://github.com/vendidero/woocommerce-germanized-dhl/tree/v1.2.6",
357
  "issues": "https://github.com/vendidero/woocommerce-germanized-dhl/issues"
358
  }
359
  },
360
  {
361
  "name": "vendidero/woocommerce-germanized-shipments",
362
- "version": "v1.2.7",
363
- "version_normalized": "1.2.7.0",
364
  "source": {
365
  "type": "git",
366
  "url": "https://github.com/vendidero/woocommerce-germanized-shipments.git",
367
- "reference": "e32e114a29b677a803da9340b224430bffc16c26"
368
  },
369
  "dist": {
370
  "type": "zip",
371
- "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-shipments/zipball/e32e114a29b677a803da9340b224430bffc16c26",
372
- "reference": "e32e114a29b677a803da9340b224430bffc16c26",
373
  "shasum": ""
374
  },
375
  "require": {
@@ -380,7 +380,7 @@
380
  "phpunit/phpunit": "6.5.14",
381
  "woocommerce/woocommerce-sniffs": "0.0.6"
382
  },
383
- "time": "2020-05-28T11:26:15+00:00",
384
  "type": "wordpress-plugin",
385
  "installation-source": "dist",
386
  "autoload": {
@@ -402,23 +402,23 @@
402
  "description": "The Germanized Shipments implementation.",
403
  "homepage": "https://github.com/vendidero/woocommerce-germanized-shipments",
404
  "support": {
405
- "source": "https://github.com/vendidero/woocommerce-germanized-shipments/tree/v1.2.7",
406
  "issues": "https://github.com/vendidero/woocommerce-germanized-shipments/issues"
407
  }
408
  },
409
  {
410
  "name": "vendidero/woocommerce-trusted-shops",
411
- "version": "v4.0.5",
412
- "version_normalized": "4.0.5.0",
413
  "source": {
414
  "type": "git",
415
  "url": "https://github.com/vendidero/woocommerce-trusted-shops.git",
416
- "reference": "9d95790823b93455fafd349f9e4186b193ed9700"
417
  },
418
  "dist": {
419
  "type": "zip",
420
- "url": "https://api.github.com/repos/vendidero/woocommerce-trusted-shops/zipball/9d95790823b93455fafd349f9e4186b193ed9700",
421
- "reference": "9d95790823b93455fafd349f9e4186b193ed9700",
422
  "shasum": ""
423
  },
424
  "require": {
@@ -428,7 +428,7 @@
428
  "phpunit/phpunit": "6.5.14",
429
  "woocommerce/woocommerce-sniffs": "0.0.6"
430
  },
431
- "time": "2020-05-28T11:23:48+00:00",
432
  "type": "wordpress-plugin",
433
  "installation-source": "dist",
434
  "autoload": {
@@ -450,7 +450,7 @@
450
  "description": "Trustbadge Reviews for WooCommerce.",
451
  "homepage": "https://github.com/vendidero/woocommerce-trusted-shops",
452
  "support": {
453
- "source": "https://github.com/vendidero/woocommerce-trusted-shops/tree/v4.0.5",
454
  "issues": "https://github.com/vendidero/woocommerce-trusted-shops/issues"
455
  }
456
  }
309
  },
310
  {
311
  "name": "vendidero/woocommerce-germanized-dhl",
312
+ "version": "v1.2.7",
313
+ "version_normalized": "1.2.7.0",
314
  "source": {
315
  "type": "git",
316
  "url": "https://github.com/vendidero/woocommerce-germanized-dhl.git",
317
+ "reference": "f0196e6ff66c93a1394b33479fdcd4d838755ccc"
318
  },
319
  "dist": {
320
  "type": "zip",
321
+ "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-dhl/zipball/f0196e6ff66c93a1394b33479fdcd4d838755ccc",
322
+ "reference": "f0196e6ff66c93a1394b33479fdcd4d838755ccc",
323
  "shasum": ""
324
  },
325
  "require": {
329
  "phpunit/phpunit": "6.5.14",
330
  "woocommerce/woocommerce-sniffs": "0.0.6"
331
  },
332
+ "time": "2020-06-12T09:24:18+00:00",
333
  "type": "wordpress-plugin",
334
  "installation-source": "dist",
335
  "autoload": {
353
  "description": "The Germanized DHL implementation.",
354
  "homepage": "https://github.com/vendidero/woocommerce-germanized-dhl",
355
  "support": {
356
+ "source": "https://github.com/vendidero/woocommerce-germanized-dhl/tree/v1.2.7",
357
  "issues": "https://github.com/vendidero/woocommerce-germanized-dhl/issues"
358
  }
359
  },
360
  {
361
  "name": "vendidero/woocommerce-germanized-shipments",
362
+ "version": "v1.2.8",
363
+ "version_normalized": "1.2.8.0",
364
  "source": {
365
  "type": "git",
366
  "url": "https://github.com/vendidero/woocommerce-germanized-shipments.git",
367
+ "reference": "8291f4a6b12ded4c82313fa4331700ae514258a3"
368
  },
369
  "dist": {
370
  "type": "zip",
371
+ "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-shipments/zipball/8291f4a6b12ded4c82313fa4331700ae514258a3",
372
+ "reference": "8291f4a6b12ded4c82313fa4331700ae514258a3",
373
  "shasum": ""
374
  },
375
  "require": {
380
  "phpunit/phpunit": "6.5.14",
381
  "woocommerce/woocommerce-sniffs": "0.0.6"
382
  },
383
+ "time": "2020-06-12T09:25:22+00:00",
384
  "type": "wordpress-plugin",
385
  "installation-source": "dist",
386
  "autoload": {
402
  "description": "The Germanized Shipments implementation.",
403
  "homepage": "https://github.com/vendidero/woocommerce-germanized-shipments",
404
  "support": {
405
+ "source": "https://github.com/vendidero/woocommerce-germanized-shipments/tree/v1.2.8",
406
  "issues": "https://github.com/vendidero/woocommerce-germanized-shipments/issues"
407
  }
408
  },
409
  {
410
  "name": "vendidero/woocommerce-trusted-shops",
411
+ "version": "v4.0.6",
412
+ "version_normalized": "4.0.6.0",
413
  "source": {
414
  "type": "git",
415
  "url": "https://github.com/vendidero/woocommerce-trusted-shops.git",
416
+ "reference": "f7a1b2a6420434638c8bd263e3b3f3799106f4cc"
417
  },
418
  "dist": {
419
  "type": "zip",
420
+ "url": "https://api.github.com/repos/vendidero/woocommerce-trusted-shops/zipball/f7a1b2a6420434638c8bd263e3b3f3799106f4cc",
421
+ "reference": "f7a1b2a6420434638c8bd263e3b3f3799106f4cc",
422
  "shasum": ""
423
  },
424
  "require": {
428
  "phpunit/phpunit": "6.5.14",
429
  "woocommerce/woocommerce-sniffs": "0.0.6"
430
  },
431
+ "time": "2020-06-12T09:00:24+00:00",
432
  "type": "wordpress-plugin",
433
  "installation-source": "dist",
434
  "autoload": {
450
  "description": "Trustbadge Reviews for WooCommerce.",
451
  "homepage": "https://github.com/vendidero/woocommerce-trusted-shops",
452
  "support": {
453
+ "source": "https://github.com/vendidero/woocommerce-trusted-shops/tree/v4.0.6",
454
  "issues": "https://github.com/vendidero/woocommerce-trusted-shops/issues"
455
  }
456
  }
woocommerce-germanized.php CHANGED
@@ -3,7 +3,7 @@
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: 3.1.8
7
  * Author: vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 4.9
@@ -69,7 +69,7 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
69
  *
70
  * @var string
71
  */
72
- public $version = '3.1.8';
73
 
74
  /**
75
  * @var WooCommerce_Germanized $instance of the plugin
@@ -575,6 +575,7 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
575
  'woo-paypalplus' => 'WC_GZD_Compatibility_Woo_PaypalPlus',
576
  'elementor-pro' => 'WC_GZD_Compatibility_Elementor_Pro',
577
  'klarna-checkout-for-woocommerce' => 'WC_GZD_Compatibility_Klarna_Checkout_For_WooCommerce',
 
578
  )
579
  );
580
 
@@ -1044,7 +1045,7 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
1044
  * Add small business global Email Footer
1045
  */
1046
  public function email_small_business_notice() {
1047
- if ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) {
1048
  wc_get_template( 'global/small-business-info.php' );
1049
  }
1050
  }
@@ -1139,8 +1140,8 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
1139
  /**
1140
  * Improve tax display within order totals
1141
  *
1142
- * @param array $order_totals
1143
- * @param object $order
1144
  *
1145
  * @return array
1146
  */
@@ -1151,14 +1152,11 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
1151
 
1152
  // Tax for inclusive prices
1153
  if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) && 'incl' == get_option( 'woocommerce_tax_display_cart' ) ) {
1154
-
1155
  $tax_array = array();
1156
 
1157
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
1158
-
1159
  foreach ( $order->get_tax_totals() as $code => $tax ) {
1160
-
1161
- $tax->rate = WC_Tax::get_rate_percent( $tax->rate_id );
1162
 
1163
  if ( ! isset( $tax_array[ $tax->rate ] ) ) {
1164
  $tax_array[ $tax->rate ] = array(
@@ -1173,13 +1171,9 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
1173
  }
1174
  } else {
1175
 
1176
- $base_rate = ( is_callable( array(
1177
- 'WC_Tax',
1178
- 'get_base_tax_rates'
1179
- ) ) ? WC_Tax::get_base_tax_rates() : WC_Tax::get_shop_base_rate() );
1180
-
1181
- $rate = reset( $base_rate );
1182
- $rate_id = key( $base_rate );
1183
 
1184
  $base_rate = (object) $rate;
1185
  $base_rate->rate_id = $rate_id;
@@ -1193,7 +1187,6 @@ if ( ! class_exists( 'WooCommerce_Germanized' ) ) :
1193
 
1194
  if ( ! empty( $tax_array ) ) {
1195
  foreach ( $tax_array as $tax ) {
1196
-
1197
  $order_totals[ 'tax_' . WC_Tax::get_rate_code( $tax['tax']->rate_id ) ] = array(
1198
  'label' => wc_gzd_get_tax_rate_label( $tax['tax']->rate ),
1199
  'value' => wc_price( $tax['amount'] ),
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: 3.1.9
7
  * Author: vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 4.9
69
  *
70
  * @var string
71
  */
72
+ public $version = '3.1.9';
73
 
74
  /**
75
  * @var WooCommerce_Germanized $instance of the plugin
575
  'woo-paypalplus' => 'WC_GZD_Compatibility_Woo_PaypalPlus',
576
  'elementor-pro' => 'WC_GZD_Compatibility_Elementor_Pro',
577
  'klarna-checkout-for-woocommerce' => 'WC_GZD_Compatibility_Klarna_Checkout_For_WooCommerce',
578
+ 'flexible-checkout-fields' => 'WC_GZD_Compatibility_Flexible_Checkout_Fields'
579
  )
580
  );
581
 
1045
  * Add small business global Email Footer
1046
  */
1047
  public function email_small_business_notice() {
1048
+ if ( wc_gzd_is_small_business() ) {
1049
  wc_get_template( 'global/small-business-info.php' );
1050
  }
1051
  }
1140
  /**
1141
  * Improve tax display within order totals
1142
  *
1143
+ * @param array $order_totals
1144
+ * @param WC_Order $order
1145
  *
1146
  * @return array
1147
  */
1152
 
1153
  // Tax for inclusive prices
1154
  if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) && 'incl' == get_option( 'woocommerce_tax_display_cart' ) ) {
 
1155
  $tax_array = array();
1156
 
1157
  if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
 
1158
  foreach ( $order->get_tax_totals() as $code => $tax ) {
1159
+ $tax->rate = wc_gzd_get_order_tax_rate_percentage( $tax->rate_id, $order );
 
1160
 
1161
  if ( ! isset( $tax_array[ $tax->rate ] ) ) {
1162
  $tax_array[ $tax->rate ] = array(
1171
  }
1172
  } else {
1173
 
1174
+ $base_rate = WC_Tax::get_base_tax_rates();
1175
+ $rate = reset( $base_rate );
1176
+ $rate_id = key( $base_rate );
 
 
 
 
1177
 
1178
  $base_rate = (object) $rate;
1179
  $base_rate->rate_id = $rate_id;
1187
 
1188
  if ( ! empty( $tax_array ) ) {
1189
  foreach ( $tax_array as $tax ) {
 
1190
  $order_totals[ 'tax_' . WC_Tax::get_rate_code( $tax['tax']->rate_id ) ] = array(
1191
  'label' => wc_gzd_get_tax_rate_label( $tax['tax']->rate ),
1192
  'value' => wc_price( $tax['amount'] ),