Skip to content

Commit

Permalink
1.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vendidero committed May 25, 2016
1 parent a606de5 commit 541652f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 19 deletions.
15 changes: 15 additions & 0 deletions includes/admin/class-wc-gzd-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ private function intro() {
<a href="https://vendidero.de/woocommerce-germanized#buy" target="_blank" class="button button-primary">Upgrade zur Pro Version</a>
</p>
<div class="changelog new-feature">

<?php $gateways = WC()->payment_gateways->payment_gateways(); ?>

<?php if ( isset( $gateways[ 'direct-debit' ] ) && $gateways[ 'direct-debit' ]->enabled === 'yes' ) : ?>

<div style="background: #FFF; padding: 0.1em 1em; border-left: 5px solid red; display: block; margin-top: 1em;">

<h3>Verschlüsselung sensibler Zahlungsdaten für Lastschrift</h3>
<p>Mit der neuesten Version führen wir optional die Verschlüsselung von sensiblen Zahlungsdaten deiner Kunden ein (IBAN, BIC).
Nachdem du die Verschlüsselung konfiguriert hast, kannst du auch optional die Zahlungsdaten für Folgebestellungen speichern.</p>
<p><a class="button button-primary" href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=checkout&section=wc_gzd_gateway_direct_debit' ); ?>">Konfiguration der Verschlüsselung</a></p>
</div>

<?php endif; ?>

<h3>Bessere Grundpreise für variable Produkte</h3>
<p>Mit Version 1.6 führen wir eine bessere Behandlung von Grundpreisen für variable Produkte ein. Optional können nun analog zu den Von-Bis-Preisen für variable Produkte auch die Grundpreise in gleicher Form angezeigt werden.</p>
<p>Weiterhin muss von nun an die Einheit nur noch für das variable Produkt und nicht mehr für alle Varianten einzeln ausgewählt werden. Ähnlich verhält es sich mit den Produkt- und Grundpreiseinheiten. Diese können für das variable Produkt hinterlegt und optional
Expand Down
41 changes: 25 additions & 16 deletions includes/class-wc-gzd-customer-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,36 @@ public function __construct() {
// Send customer account notification
add_action( 'woocommerce_email', array( $this, 'email_hooks' ), 0, 1 );

if ( $this->is_double_opt_in_login_enabled() ) {
// Disable login for unactivated users
add_filter( 'wp_authenticate_user', array( $this, 'login_restriction' ) , 10, 2 );
// Disable auto login after registration
add_filter( 'woocommerce_registration_auth_new_customer', array( $this, 'disable_registration_auto_login' ), 10, 2 );
if ( $this->is_double_opt_in_enabled() ) {

// Check for customer activation
add_action( 'template_redirect', array( $this, 'customer_account_activation_check' ) );
// Cronjob to delete unactivated users
add_action( 'woocommerce_gzd_customer_cleanup', array( $this, 'account_cleanup' ) );
// Redirect customers that are not logged in to customer account page
add_action( 'template_redirect', array( $this, 'disable_checkout' ), 10 );
// Show notices on customer account page
add_action( 'template_redirect', array( $this, 'show_disabled_checkout_notice' ), 20 );
// Redirect customers to checkout after login
add_filter( 'woocommerce_login_redirect', array( $this, 'login_redirect' ), 10, 2 );
// Disable customer signup if customer has forced guest checkout
add_action( 'woocommerce_checkout_init', array( $this, 'disable_signup' ), 10, 1 );

if ( $this->is_double_opt_in_login_enabled() ) {
// Disable login for unactivated users
add_filter( 'wp_authenticate_user', array( $this, 'login_restriction' ) , 10, 2 );
// Disable auto login after registration
add_filter( 'woocommerce_registration_auth_new_customer', array( $this, 'disable_registration_auto_login' ), 10, 2 );
// Redirect customers that are not logged in to customer account page
add_action( 'template_redirect', array( $this, 'disable_checkout' ), 10 );
// Show notices on customer account page
add_action( 'template_redirect', array( $this, 'show_disabled_checkout_notice' ), 20 );
// Redirect customers to checkout after login
add_filter( 'woocommerce_login_redirect', array( $this, 'login_redirect' ), 10, 2 );
// Disable customer signup if customer has forced guest checkout
add_action( 'woocommerce_checkout_init', array( $this, 'disable_signup' ), 10, 1 );
}

}

}

public function is_double_opt_in_enabled() {
return get_option( 'woocommerce_gzd_customer_activation' ) === 'yes';
}

public function is_double_opt_in_login_enabled() {
return get_option( 'woocommerce_gzd_customer_activation_login_disabled' ) === 'yes';
}
Expand Down Expand Up @@ -162,16 +171,16 @@ public function login_restriction( $user, $password ) {
public function customer_account_activation_check() {

if ( is_account_page() ) {

if ( isset( $_GET[ 'activate' ] ) ) {

$activation_code = sanitize_text_field( $_GET[ 'activate' ] );

if ( ! empty( $activation_code ) ) {

if ( $this->customer_account_activate( $activation_code, true ) ) {

wc_add_notice( __( 'Thank you. You have successfully activated your account.', 'woocommerce-germanized' ) );
wc_add_notice( __( 'Thank you. You have successfully activated your account.', 'woocommerce-germanized' ), 'notice' );
return;
}

Expand Down
9 changes: 9 additions & 0 deletions includes/trusted-shops/class-wc-gzd-trusted-shops-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ public function get_settings() {
'default' => '#C0C0C0',
),

array(
'title' => _x( 'Star Size', 'trusted-shops', 'woocommerce-germanized' ),
'id' => 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_product_sticker_star_size',
'type' => 'number',
'default' => '15',
'desc' => __( 'px', 'trusted-shops', 'woocommerce-germanized' ),
'css' => 'max-width:60px;',
),

array(
'title' => _x( 'Product Sticker Code', 'trusted-shops', 'woocommerce-germanized' ),
'id' => 'woocommerce_' . $this->base->option_prefix . 'trusted_shops_product_sticker_code',
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: vendidero
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
Requires at least: 3.8
Tested up to: 4.5
Stable tag: 1.6.2
Stable tag: 1.6.3
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -157,6 +157,12 @@ Bug reports may be filed via our [GitHub repository](https://github.com/vendider

== Changelog ==

= 1.6.3 =
* Feature - Encryption for Direct Debit Gateway data
* Fix - Double-Opt-In even if checkout shouldn't be disabled
* Fix - Trusted Shops Template SKU Parameter
* Fix - Trusted Shops Product Sticker Star Size

= 1.6.2 =
* Fix - Trusted Shops PHP < 5.4 backwards compatibility
* Fix - Prevent showing terms twice before AJAX call
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-germanized.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Germanized
* Plugin URI: https://www.vendidero.de/woocommerce-germanized
* Description: Extends WooCommerce to become a legally compliant store for the german market.
* Version: 1.6.2
* Version: 1.6.3
* Author: Vendidero
* Author URI: https://vendidero.de
* Requires at least: 3.8
Expand All @@ -26,7 +26,7 @@ final class WooCommerce_Germanized {
*
* @var string
*/
public $version = '1.6.2';
public $version = '1.6.3';

/**
* Single instance of WooCommerce Germanized Main Class
Expand Down

0 comments on commit 541652f

Please sign in to comment.