WooCommerce Germanized - Version 1.7.1

Version Description

  • Fix - WooCommerce Multilingual 3.6.8 compatibility
  • Fix - Better Inline Plugin Update Compatibility
  • Fix - Disable WC Default Term Display instead of hiding them via CSS
Download this release

Release Info

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

Code changes from version 1.7.0 to 1.7.1

includes/class-wc-gzd-dependencies.php CHANGED
@@ -98,8 +98,10 @@ class WC_GZD_Dependencies {
98
 
99
  if ( ! empty( $this->plugins_result[ 'unactivated' ] ) || ! empty( $this->plugins_result[ 'outdated' ] ) ) {
100
  $this->loadable = false;
 
101
  add_action( 'admin_notices', array( $this, 'dependencies_notice' ) );
102
  } else if ( ! empty( $this->plugins_result[ 'untested' ] ) ) {
 
103
  add_action( 'admin_notices', array( $this, 'dependencies_notice' ) );
104
  }
105
 
98
 
99
  if ( ! empty( $this->plugins_result[ 'unactivated' ] ) || ! empty( $this->plugins_result[ 'outdated' ] ) ) {
100
  $this->loadable = false;
101
+ remove_all_actions( 'admin_notices' );
102
  add_action( 'admin_notices', array( $this, 'dependencies_notice' ) );
103
  } else if ( ! empty( $this->plugins_result[ 'untested' ] ) ) {
104
+ remove_all_actions( 'admin_notices' );
105
  add_action( 'admin_notices', array( $this, 'dependencies_notice' ) );
106
  }
107
 
includes/class-wc-gzd-install.php CHANGED
@@ -204,8 +204,11 @@ class WC_GZD_Install {
204
  // Upon install + update
205
  do_action( 'woocommerce_gzd_installed' );
206
 
207
- // Redirect to welcome screen
208
- set_transient( '_wc_gzd_activation_redirect', 1, 60 * 60 );
 
 
 
209
  }
210
 
211
  /**
204
  // Upon install + update
205
  do_action( 'woocommerce_gzd_installed' );
206
 
207
+ // Prevent redirect for inline plugin updates
208
+ if ( ! defined( 'DOING_AJAX' ) ) {
209
+ // Redirect to welcome screen
210
+ set_transient( '_wc_gzd_activation_redirect', 1, 60 * 60 );
211
+ }
212
  }
213
 
214
  /**
includes/compatibility/class-wc-gzd-compatibility-wpml.php CHANGED
@@ -45,7 +45,11 @@ class WC_GZD_Compatibility_Wpml extends WC_GZD_Compatibility {
45
 
46
  // Instantiate mailer to make sure that new order email is known
47
  $mailer = WC()->mailer();
48
- $woocommerce_wpml->emails->admin_email( $order_id );
 
 
 
 
49
 
50
  // Stop Germanized from sending the notification
51
  add_filter( 'woocommerce_germanized_order_email_admin_confirmation_sent', array( $this, 'set_order_admin_confirmation' ) );
@@ -68,7 +72,10 @@ class WC_GZD_Compatibility_Wpml extends WC_GZD_Compatibility {
68
  );
69
 
70
  foreach ( $statuses as $status ) {
71
- remove_action( $status, array( $woocommerce_wpml->emails, 'admin_email' ), 9 );
 
 
 
72
  }
73
  }
74
  }
45
 
46
  // Instantiate mailer to make sure that new order email is known
47
  $mailer = WC()->mailer();
48
+
49
+ if ( method_exists( $woocommerce_wpml->emails, 'admin_email' ) )
50
+ $woocommerce_wpml->emails->admin_email( $order_id );
51
+ else if ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) )
52
+ $woocommerce_wpml->emails->new_order_admin_email( $order_id );
53
 
54
  // Stop Germanized from sending the notification
55
  add_filter( 'woocommerce_germanized_order_email_admin_confirmation_sent', array( $this, 'set_order_admin_confirmation' ) );
72
  );
73
 
74
  foreach ( $statuses as $status ) {
75
+ if ( method_exists( $woocommerce_wpml->emails, 'admin_email' ) )
76
+ remove_action( $status, array( $woocommerce_wpml->emails, 'admin_email' ), 9 );
77
+ else if ( method_exists( $woocommerce_wpml->emails, 'new_order_admin_email' ) )
78
+ remove_action( $status, array( $woocommerce_wpml->emails, 'new_order_admin_email' ), 9 );
79
  }
80
  }
81
  }
includes/wc-gzd-template-functions.php CHANGED
@@ -160,7 +160,7 @@ if ( ! function_exists( 'woocommerce_gzd_template_checkout_legal' ) ) {
160
  * text legal info within checkout (may contain checkbox)
161
  */
162
  function woocommerce_gzd_template_checkout_legal() {
163
- wc_get_template( 'checkout/terms.php' );
164
  }
165
 
166
  }
160
  * text legal info within checkout (may contain checkbox)
161
  */
162
  function woocommerce_gzd_template_checkout_legal() {
163
+ wc_get_template( 'checkout/terms.php', array( 'gzd_checkbox' => true ) );
164
  }
165
 
166
  }
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.6
6
- Stable tag: 1.7.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -157,6 +157,11 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider
157
 
158
  == Changelog ==
159
 
 
 
 
 
 
160
  = 1.7.0 =
161
  * Feature - Email Template Paid for Order
162
  * Feature - Better WC Subscriptions Compatibility
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.6
6
+ Stable tag: 1.7.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
157
 
158
  == Changelog ==
159
 
160
+ = 1.7.1 =
161
+ * Fix - WooCommerce Multilingual 3.6.8 compatibility
162
+ * Fix - Better Inline Plugin Update Compatibility
163
+ * Fix - Disable WC Default Term Display instead of hiding them via CSS
164
+
165
  = 1.7.0 =
166
  * Feature - Email Template Paid for Order
167
  * Feature - Better WC Subscriptions Compatibility
templates/checkout/order-submit.php CHANGED
@@ -23,6 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
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 ) . '" />' ); ?>
23
  <?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
24
 
25
  <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
26
+
27
  <?php do_action( 'woocommerce_gzd_review_order_before_submit' ); ?>
28
 
29
  <?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 ) . '" />' ); ?>
templates/checkout/terms.php CHANGED
@@ -10,6 +10,10 @@ if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
 
 
 
 
 
13
  ?>
14
 
15
  <?php if ( apply_filters( 'woocommerce_germanized_checkout_show_terms', true ) ) : ?>
10
  exit;
11
  }
12
 
13
+ // Make sure only template calls from germanized are accepted
14
+ if ( ! isset( $gzd_checkbox ) || ! $gzd_checkbox )
15
+ return;
16
+
17
  ?>
18
 
19
  <?php if ( apply_filters( 'woocommerce_germanized_checkout_show_terms', true ) ) : ?>
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.7.0
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
@@ -28,7 +28,7 @@ final class WooCommerce_Germanized {
28
  *
29
  * @var string
30
  */
31
- public $version = '1.7.0';
32
 
33
  /**
34
  * 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.7.1
7
  * Author: Vendidero
8
  * Author URI: https://vendidero.de
9
  * Requires at least: 3.8
28
  *
29
  * @var string
30
  */
31
+ public $version = '1.7.1';
32
 
33
  /**
34
  * Single instance of WooCommerce Germanized Main Class