WooCommerce Germanized - Version 1.5.1

Version Description

  • Fix - Correctly autoloading WC_GZD_Admin
  • Fix - Correctly hide unit base if option equals current value (not greater than)
Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.1

includes/abstracts/abstract-wc-gzd-product.php CHANGED
@@ -249,7 +249,7 @@ class WC_GZD_Product {
249
 
250
  } else {
251
 
252
- $html = str_replace( array( '{base_price}', '{unit}', '{base}' ), array( $price_html, '<span class="unit">' . $this->get_unit() . '</span>', ( $this->unit_base > apply_filters( 'wc_gzd_unit_base_min_amount_to_show', 1 ) ? '<span class="unit-base">' . $this->unit_base . '</span>' : '' ) ), $text );
253
 
254
  }
255
 
@@ -273,7 +273,7 @@ class WC_GZD_Product {
273
  $text = get_option( 'woocommerce_gzd_product_units_text' );
274
 
275
  if ( $this->has_product_units() )
276
- $html = str_replace( array( '{product_units}', '{unit}', '{unit_price}' ), array( $this->unit_product, $this->get_unit(), $this->get_unit_html() ), $text );
277
 
278
  return apply_filters( 'woocommerce_gzd_product_units_html', $html, $this );
279
 
249
 
250
  } else {
251
 
252
+ $html = str_replace( array( '{base_price}', '{unit}', '{base}' ), array( $price_html, '<span class="unit">' . $this->get_unit() . '</span>', ( $this->unit_base == apply_filters( 'wc_gzd_unit_base_min_amount_to_show', 1 ) ? '<span class="unit-base">' . $this->unit_base . '</span>' : '' ) ), $text );
253
 
254
  }
255
 
273
  $text = get_option( 'woocommerce_gzd_product_units_text' );
274
 
275
  if ( $this->has_product_units() )
276
+ $html = str_replace( array( '{product_units}', '{unit}', '{unit_price}' ), array( str_replace( '.', ',', $this->unit_product ), $this->get_unit(), $this->get_unit_html() ), $text );
277
 
278
  return apply_filters( 'woocommerce_gzd_product_units_html', $html, $this );
279
 
includes/class-wc-gzd-install.php CHANGED
@@ -395,7 +395,7 @@ class WC_GZD_Install {
395
  'woocommerce_allowed_countries' => 'specific',
396
  'woocommerce_specific_allowed_countries' => array( 'DE' ),
397
  );
398
- if ( !empty($options ) ) {
399
  foreach ( $options as $key => $option ) {
400
  update_option( $key, $option );
401
  }
395
  'woocommerce_allowed_countries' => 'specific',
396
  'woocommerce_specific_allowed_countries' => array( 'DE' ),
397
  );
398
+ if ( ! empty($options ) ) {
399
  foreach ( $options as $key => $option ) {
400
  update_option( $key, $option );
401
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.4
7
- Stable tag: 1.5.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -177,6 +177,10 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns
177
 
178
  == Changelog ==
179
 
 
 
 
 
180
  = 1.5.0 =
181
  * Feature - Import data from previously installed German Market Plugins
182
  * Feature - New Shortcode [gzd_complaints] within imprint to inform customers about new EU online dispute resolution platform
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
5
  Requires at least: 3.8
6
  Tested up to: 4.4
7
+ Stable tag: 1.5.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
177
 
178
  == Changelog ==
179
 
180
+ = 1.5.1 =
181
+ * Fix - Correctly autoloading WC_GZD_Admin
182
+ * Fix - Correctly hide unit base if option equals current value (not greater than)
183
+
184
  = 1.5.0 =
185
  * Feature - Import data from previously installed German Market Plugins
186
  * Feature - New Shortcode [gzd_complaints] within imprint to inform customers about new EU online dispute resolution platform
templates/checkout/order-submit.php CHANGED
@@ -15,14 +15,17 @@ if ( ! defined( 'ABSPATH' ) ) {
15
 
16
  <div class="form-row place-order wc-gzd-place-order">
17
 
18
- <noscript><?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?><br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php _e( 'Update totals', 'woocommerce' ); ?>" /></noscript>
 
 
 
19
 
20
  <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
21
 
22
  <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
23
  <?php do_action( 'woocommerce_gzd_review_order_before_submit' ); ?>
24
 
25
- <?php echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) ) . '" data-value="' . esc_attr( apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) ) . '" />' ); ?>
26
 
27
  <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
28
 
15
 
16
  <div class="form-row place-order wc-gzd-place-order">
17
 
18
+ <noscript>
19
+ <?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?>
20
+ <br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>" />
21
+ </noscript>
22
 
23
  <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
24
 
25
  <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
26
  <?php do_action( 'woocommerce_gzd_review_order_before_submit' ); ?>
27
 
28
+ <?php echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' ); ?>
29
 
30
  <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
31
 
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.5.0
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
@@ -26,7 +26,7 @@ final class WooCommerce_Germanized {
26
  *
27
  * @var string
28
  */
29
- public $version = '1.5.0';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
@@ -225,13 +225,14 @@ final class WooCommerce_Germanized {
225
  * @return void
226
  */
227
  public function autoload( $class ) {
 
228
  $path = $this->plugin_path() . '/includes/';
229
  $class = strtolower( $class );
230
  $file = 'class-' . str_replace( '_', '-', $class ) . '.php';
231
 
232
- if ( strpos( $class, 'wc_gzd_admin_' ) === 0 )
233
  $path = $this->plugin_path() . '/includes/admin/';
234
- elseif ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
235
  $path = $this->plugin_path() . '/includes/gateways/' . substr( str_replace( '_', '-', $class ), 15 ) . '/';
236
 
237
  if ( version_compare( get_option( 'woocommerce_version' ), '2.3', '<' ) ) {
@@ -244,6 +245,7 @@ final class WooCommerce_Germanized {
244
  include_once( $path . $file );
245
  return;
246
  }
 
247
  }
248
 
249
  /**
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.5.1
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
26
  *
27
  * @var string
28
  */
29
+ public $version = '1.5.1';
30
 
31
  /**
32
  * Single instance of WooCommerce Germanized Main Class
225
  * @return void
226
  */
227
  public function autoload( $class ) {
228
+
229
  $path = $this->plugin_path() . '/includes/';
230
  $class = strtolower( $class );
231
  $file = 'class-' . str_replace( '_', '-', $class ) . '.php';
232
 
233
+ if ( strpos( $class, 'wc_gzd_admin' ) !== false )
234
  $path = $this->plugin_path() . '/includes/admin/';
235
+ elseif ( strpos( $class, 'wc_gzd_gateway_' ) !== false )
236
  $path = $this->plugin_path() . '/includes/gateways/' . substr( str_replace( '_', '-', $class ), 15 ) . '/';
237
 
238
  if ( version_compare( get_option( 'woocommerce_version' ), '2.3', '<' ) ) {
245
  include_once( $path . $file );
246
  return;
247
  }
248
+
249
  }
250
 
251
  /**