Added option to hide Returning customer message. Closes #4220

This commit is contained in:
Coen Jacobs 2013-12-05 10:43:46 +01:00
parent fe8f57c2e3
commit 1f5f163916
2 changed files with 10 additions and 1 deletions

View File

@ -123,6 +123,15 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'autoload' => false
),
array(
'desc' => __( 'Display returning customer login reminder on the "Checkout" page', 'woocommerce' ),
'id' => 'woocommerce_enable_checkout_login_reminder',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
'autoload' => false
),
array(
'title' => __( 'Account Creation', 'woocommerce' ),
'desc' => __( 'Automatically generate username from customer email', 'woocommerce' ),

View File

@ -9,7 +9,7 @@
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( is_user_logged_in() ) return;
if ( is_user_logged_in() || 'no' == get_option( 'woocommerce_enable_checkout_login_reminder' ) ) return;
$info_message = apply_filters( 'woocommerce_checkout_login_message', __( 'Returning customer?', 'woocommerce' ) );
$info_message .= ' <a href="#" class="showlogin">' . __( 'Click here to login', 'woocommerce' ) . '</a>';