WooCommerce Germanized - Version 1.8.5

Version Description

  • Feature - DHL Parcel Shop or Pick-Up Station delivery
  • Fix - Parcel Shop empty address placeholder
  • Fix - Sale Price Labels Price Suffixes HTML
  • Fix - Partial refunded order email legal item information
  • Fix - Hook priority for product units in loop
  • Fix - Parcel delivery checkbox validation
Download this release

Release Info

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

Code changes from version 1.8.4 to 1.8.5

assets/css/woocommerce-gzd-layout.css CHANGED
@@ -12,6 +12,11 @@
12
  .includes_tax, .tax_label {
13
  display: none !important;
14
  }
 
 
 
 
 
15
  #order_review_heading {
16
  display: none;
17
  }
12
  .includes_tax, .tax_label {
13
  display: none !important;
14
  }
15
+ .wc-gzd-small-business-includes-tax {
16
+ display: inline !important;
17
+ font-size: 0.9em;
18
+ padding-left: 3px;
19
+ }
20
  #order_review_heading {
21
  display: none;
22
  }
assets/css/woocommerce-gzd-layout.min.css CHANGED
@@ -1 +1 @@
1
- .cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}.wc-gzd-parcel-finder-open-button{display:inline;margin-left:5px}.wc-gzd-item-desc p{font-size:.9em}#order_review .legal{text-align:left;padding:0 1em 0 0;float:left}.cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}#order_review .legal label{display:inline}.woocommerce-checkout .shop_table{background-color:#EEE}.includes_tax,.tax_label{display:none!important}#order_review_heading{display:none}.woocommerce-checkout .shop_table tr td p{margin-bottom:0}.woocommerce-checkout .shop_table td,.woocommerce-checkout .shop_table th{line-height:1.5}.shop_table .product-name-inner,.shop_table .product-name-inner tr td{border:none;padding:0;margin:0}.cart_totals p.wc-gzd-additional-info{font-size:.8em;width:60%;border-top:1px solid #CCC;padding-top:.5rem;display:inline-block}.entry-content .woocommerce #payment{margin-bottom:1em}.woocommerce #payment .wc-terms-and-conditions{display:none!important}.woocommerce-checkout p.direct-debit-checkbox{display:none}.unit-price-cart{font-size:.9em;display:block;margin-top:5px}.products .wc-gzd-additional-info{font-size:.8em;margin:.7rem 0;padding:0}.products .product .price-unit{font-size:.8em}.wc-gzd-item-desc p,p.footer-info{font-size:.9em}.product p.wc-gzd-additional-info{margin-bottom:.5rem;font-size:.9em;clear:left}.product .product_meta{margin-top:1rem}p.footer-info{text-align:center;padding-bottom:.5rem}.wc-gzd-edit-data-notice{background:#EEE;display:inline-block;padding:1em}.wc-gzd-edit-data-notice p.wc-gzd-info{margin:0;padding:0}table.product-details-inner{table-layout:fixed;margin:0;padding:0}table.product-details-inner,table.product-details-inner td,table.product-details-inner tr{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border:none;background:0 0}table.product-details-inner tr td:last-child{text-align:right}.wc-gzd-product-name-left,.wc-gzd-product-name-right{float:left}.wc-gzd-product-name-left{max-width:15%;margin-right:1em}#eKomiSeal_default img{width:100%!important;height:100%!important}
1
+ .cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}.wc-gzd-small-business-includes-tax{display:inline!important;font-size:.9em;padding-left:3px}.wc-gzd-parcel-finder-open-button{display:inline;margin-left:5px}.wc-gzd-item-desc p{font-size:.9em}#order_review .legal{text-align:left;padding:0 1em 0 0;float:left}.cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}#order_review .legal label{display:inline}.woocommerce-checkout .shop_table{background-color:#EEE}.includes_tax,.tax_label{display:none!important}#order_review_heading{display:none}.woocommerce-checkout .shop_table tr td p{margin-bottom:0}.woocommerce-checkout .shop_table td,.woocommerce-checkout .shop_table th{line-height:1.5}.shop_table .product-name-inner,.shop_table .product-name-inner tr td{border:none;padding:0;margin:0}.cart_totals p.wc-gzd-additional-info{font-size:.8em;width:60%;border-top:1px solid #CCC;padding-top:.5rem;display:inline-block}.entry-content .woocommerce #payment{margin-bottom:1em}.woocommerce #payment .wc-terms-and-conditions{display:none!important}.woocommerce-checkout p.direct-debit-checkbox{display:none}.unit-price-cart{font-size:.9em;display:block;margin-top:5px}.products .wc-gzd-additional-info{font-size:.8em;margin:.7rem 0;padding:0}.products .product .price-unit{font-size:.8em}.wc-gzd-item-desc p,p.footer-info{font-size:.9em}.product p.wc-gzd-additional-info{margin-bottom:.5rem;font-size:.9em;clear:left}.product .product_meta{margin-top:1rem}p.footer-info{text-align:center;padding-bottom:.5rem}.wc-gzd-edit-data-notice{background:#EEE;display:inline-block;padding:1em}.wc-gzd-edit-data-notice p.wc-gzd-info{margin:0;padding:0}table.product-details-inner{table-layout:fixed;margin:0;padding:0}table.product-details-inner,table.product-details-inner td,table.product-details-inner tr{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border:none;background:0 0}table.product-details-inner tr td:last-child{text-align:right}.wc-gzd-product-name-left,.wc-gzd-product-name-right{float:left}.wc-gzd-product-name-left{max-width:15%;margin-right:1em}#eKomiSeal_default img{width:100%!important;height:100%!important}
includes/class-wc-gzd-dhl-parcel-shops.php CHANGED
@@ -87,6 +87,9 @@ class WC_GZD_DHL_Parcel_Shops {
87
  if ( isset( $args[ 'parcelshop_post_number' ] ) ) {
88
  $placeholder[ '{parcelshop_post_number}' ] = $args[ 'parcelshop_post_number' ];
89
  $placeholder[ '{parcelshop_post_number_upper}' ] = strtoupper( $args[ 'parcelshop_post_number' ] );
 
 
 
90
  }
91
  return $placeholder;
92
  }
87
  if ( isset( $args[ 'parcelshop_post_number' ] ) ) {
88
  $placeholder[ '{parcelshop_post_number}' ] = $args[ 'parcelshop_post_number' ];
89
  $placeholder[ '{parcelshop_post_number_upper}' ] = strtoupper( $args[ 'parcelshop_post_number' ] );
90
+ } else {
91
+ $placeholder[ '{parcelshop_post_number}' ] = '';
92
+ $placeholder[ '{parcelshop_post_number_upper}' ] = '';
93
  }
94
  return $placeholder;
95
  }
includes/class-wc-gzd-payment-gateways.php CHANGED
@@ -154,9 +154,12 @@ class WC_GZD_Payment_Gateways {
154
  */
155
  public function init_fee() {
156
  $gateways = WC()->payment_gateways()->get_available_payment_gateways();
 
157
  if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) )
158
  return;
 
159
  $gateway = $gateways[ $key ];
 
160
  if ( $gateway->get_option( 'fee' ) )
161
  $this->set_fee( $gateway );
162
  }
@@ -167,13 +170,16 @@ class WC_GZD_Payment_Gateways {
167
  * @param object $gateway
168
  */
169
  public function set_fee( $gateway ) {
170
- $is_taxable = ( $gateway->get_option( 'fee_is_taxable', 'no' ) == 'no' ? false : true );
 
171
  $fee = $gateway->get_option( 'fee' );
 
172
  if ( $is_taxable ) {
173
  $tax_rates = WC_Tax::get_rates();
174
  $fee_taxes = WC_Tax::calc_tax( $fee, $tax_rates, true );
175
- $fee = $fee - array_sum( $fee_taxes );
176
  }
 
177
  WC()->cart->add_fee( __( 'Payment charge', 'woocommerce-germanized' ), $fee, $is_taxable );
178
  }
179
 
154
  */
155
  public function init_fee() {
156
  $gateways = WC()->payment_gateways()->get_available_payment_gateways();
157
+
158
  if ( ! ( $key = WC()->session->get('chosen_payment_method') ) || ! isset( $gateways[ $key ] ) )
159
  return;
160
+
161
  $gateway = $gateways[ $key ];
162
+
163
  if ( $gateway->get_option( 'fee' ) )
164
  $this->set_fee( $gateway );
165
  }
170
  * @param object $gateway
171
  */
172
  public function set_fee( $gateway ) {
173
+
174
+ $is_taxable = ( ( 'no' === $gateway->get_option( 'fee_is_taxable', 'no' ) || get_option( 'woocommerce_calc_taxes' ) !== 'yes' ) ? false : true );
175
  $fee = $gateway->get_option( 'fee' );
176
+
177
  if ( $is_taxable ) {
178
  $tax_rates = WC_Tax::get_rates();
179
  $fee_taxes = WC_Tax::calc_tax( $fee, $tax_rates, true );
180
+ $fee = $fee - array_sum( $fee_taxes );
181
  }
182
+
183
  WC()->cart->add_fee( __( 'Payment charge', 'woocommerce-germanized' ), $fee, $is_taxable );
184
  }
185
 
includes/wc-gzd-template-functions.php CHANGED
@@ -570,4 +570,12 @@ if ( ! function_exists( 'woocommerce_gzd_template_sale_price_label_html' ) ) {
570
 
571
  }
572
 
 
 
 
 
 
 
 
 
573
  ?>
570
 
571
  }
572
 
573
+ if ( ! function_exists( 'woocommerce_gzd_template_small_business_vat_notice' ) ) {
574
+
575
+ function woocommerce_gzd_template_small_business_vat_notice( $total ) {
576
+ return $total . ' <span class="includes_tax wc-gzd-small-business-includes-tax">' . __( 'incl. VAT', 'woocommerce-germanized' ) . '</span>';
577
+ }
578
+
579
+ }
580
+
581
  ?>
includes/wc-gzd-template-hooks.php CHANGED
@@ -65,10 +65,16 @@ add_action( 'woocommerce_review_order_before_cart_contents', 'woocommerce_gzd_te
65
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_units', wc_gzd_get_hook_priority( 'cart_product_units' ), 3 );
66
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_delivery_time', wc_gzd_get_hook_priority( 'cart_product_delivery_time' ), 3 );
67
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_item_desc', wc_gzd_get_hook_priority( 'cart_product_item_desc' ), 3 );
 
68
  // Small enterprises
69
  if ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) {
 
70
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info', wc_gzd_get_hook_priority( 'cart_small_business_info' ) );
71
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', wc_gzd_get_hook_priority( 'checkout_small_business_info' ) );
 
 
 
 
72
  }
73
 
74
  /**
65
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_units', wc_gzd_get_hook_priority( 'cart_product_units' ), 3 );
66
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_delivery_time', wc_gzd_get_hook_priority( 'cart_product_delivery_time' ), 3 );
67
  add_filter( 'woocommerce_cart_item_name', 'wc_gzd_cart_product_item_desc', wc_gzd_get_hook_priority( 'cart_product_item_desc' ), 3 );
68
+
69
  // Small enterprises
70
  if ( get_option( 'woocommerce_gzd_small_enterprise' ) == 'yes' ) {
71
+
72
  add_action( 'woocommerce_after_cart_totals', 'woocommerce_gzd_template_small_business_info', wc_gzd_get_hook_priority( 'cart_small_business_info' ) );
73
  add_action( 'woocommerce_review_order_after_order_total', 'woocommerce_gzd_template_checkout_small_business_info', wc_gzd_get_hook_priority( 'checkout_small_business_info' ) );
74
+
75
+ // Small Business incl. vat display
76
+ add_filter( 'woocommerce_get_formatted_order_total', 'woocommerce_gzd_template_small_business_vat_notice', 10, 1 );
77
+ add_filter( 'woocommerce_cart_totals_order_total_html', 'woocommerce_gzd_template_small_business_vat_notice', 10, 1 );
78
  }
79
 
80
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: vendidero
3
  Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
4
  Requires at least: 3.8
5
  Tested up to: 4.7
6
- Stable tag: 1.8.4
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -167,6 +167,14 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
167
 
168
  == Changelog ==
169
 
 
 
 
 
 
 
 
 
170
  = 1.8.4 =
171
  * Feature - DHL Parcel Shop or Pick-Up Station delivery
172
  * Fix - Sale Price Labels Price Suffixes HTML
3
  Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
4
  Requires at least: 3.8
5
  Tested up to: 4.7
6
+ Stable tag: 1.8.5
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
167
 
168
  == Changelog ==
169
 
170
+ = 1.8.5 =
171
+ * Feature - DHL Parcel Shop or Pick-Up Station delivery
172
+ * Fix - Parcel Shop empty address placeholder
173
+ * Fix - Sale Price Labels Price Suffixes HTML
174
+ * Fix - Partial refunded order email legal item information
175
+ * Fix - Hook priority for product units in loop
176
+ * Fix - Parcel delivery checkbox validation
177
+
178
  = 1.8.4 =
179
  * Feature - DHL Parcel Shop or Pick-Up Station delivery
180
  * Fix - Sale Price Labels Price Suffixes HTML
woocommerce-germanized.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
- * Version: 1.8.4
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
@@ -29,7 +29,7 @@ final class WooCommerce_Germanized {
29
  *
30
  * @var string
31
  */
32
- public $version = '1.8.4';
33
 
34
  /**
35
  * Single instance of WooCommerce Germanized Main Class
3
  * Plugin Name: WooCommerce Germanized
4
  * Plugin URI: https://www.vendidero.de/woocommerce-germanized
5
  * Description: Extends WooCommerce to become a legally compliant store for the german market.
6
+ * Version: 1.8.5
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
29
  *
30
  * @var string
31
  */
32
+ public $version = '1.8.5';
33
 
34
  /**
35
  * Single instance of WooCommerce Germanized Main Class