Added option to hide Returning customer message. Closes #4220
This commit is contained in:
parent
fe8f57c2e3
commit
1f5f163916
|
@ -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' ),
|
||||
|
|
|
@ -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>';
|
||||
|
|
Loading…
Reference in New Issue