Merge pull request #19871 from woocommerce/update/gdpr-defaults
Fix GDPR defaults
This commit is contained in:
commit
0d4401d9a8
|
@ -1 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:static;float:left;top:0;left:0;padding:0 28px 10px 15px;margin-top:-10px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:relative;top:18px;right:-20px;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:static;float:left;top:0;left:0;padding:0 28px 10px 15px;margin-top:-10px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:relative;top:18px;right:-20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
|
|
@ -1 +1 @@
|
|||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:static;float:right;top:0;right:0;padding:0 15px 10px 28px;margin-top:-10px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:relative;top:18px;left:-20px;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
|
||||
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}div.woocommerce-message p:last-child{max-width:inherit}.woocommerce-message .button-primary,p.woocommerce-actions .button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message .button-primary:active,.woocommerce-message .button-primary:focus,.woocommerce-message .button-primary:hover,p.woocommerce-actions .button-primary:active,p.woocommerce-actions .button-primary:focus,p.woocommerce-actions .button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:static;float:right;top:0;right:0;padding:0 15px 10px 28px;margin-top:-10px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:relative;top:18px;left:-20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message .button-primary,.woocommerce-message .button-secondary,p.woocommerce-actions .button-primary,p.woocommerce-actions .button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;right:12px;position:absolute}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3596,18 +3596,12 @@ img.help_tip {
|
|||
}
|
||||
|
||||
.colorpickpreview {
|
||||
padding: 6px;
|
||||
padding-left: 20px;
|
||||
padding: 7px 0;
|
||||
line-height: 1em;
|
||||
display: inline-block;
|
||||
width: 26px;
|
||||
border: 1px solid #ddd;
|
||||
/* rtl:ignore */
|
||||
border-right: 0;
|
||||
/* rtl:ignore */
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.colorpick {
|
||||
/* rtl:ignore */
|
||||
border-left: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.image_width_settings {
|
||||
|
|
|
@ -569,7 +569,7 @@ abstract class WC_Settings_API {
|
|||
<td class="forminp">
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
|
||||
<span class="colorpickpreview" style="background:<?php echo esc_attr( $this->get_option( $key ) ); ?>;"></span>
|
||||
<span class="colorpickpreview" style="background:<?php echo esc_attr( $this->get_option( $key ) ); ?>;"> </span>
|
||||
<input class="colorpick <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?> />
|
||||
<div id="colorPickerDiv_<?php echo esc_attr( $field_key ); ?>" class="colorpickdiv" style="z-index: 100; background: #eee; border: 1px solid #ccc; position: absolute; display: none;"></div>
|
||||
<?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
|
||||
|
|
|
@ -313,7 +313,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
|||
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
|
||||
</th>
|
||||
<td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">‎
|
||||
<span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>"></span>
|
||||
<span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>"> </span>
|
||||
<input
|
||||
name="<?php echo esc_attr( $value['id'] ); ?>"
|
||||
id="<?php echo esc_attr( $value['id'] ); ?>"
|
||||
|
|
|
@ -51,7 +51,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
|||
'title' => __( 'Login', 'woocommerce' ),
|
||||
'desc' => __( 'Allow customers to log into an existing account during checkout', 'woocommerce' ),
|
||||
'id' => 'woocommerce_enable_checkout_login_reminder',
|
||||
'default' => 'yes',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end',
|
||||
'autoload' => false,
|
||||
|
@ -60,7 +60,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
|||
'title' => __( 'Account creation', 'woocommerce' ),
|
||||
'desc' => __( 'Allow customers to create an account during checkout.', 'woocommerce' ),
|
||||
'id' => 'woocommerce_enable_signup_and_login_from_checkout',
|
||||
'default' => 'yes',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
'autoload' => false,
|
||||
|
@ -84,7 +84,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
|||
array(
|
||||
'desc' => __( 'When creating an account, automatically generate an account password.', 'woocommerce' ),
|
||||
'id' => 'woocommerce_registration_generate_password',
|
||||
'default' => 'no',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end',
|
||||
'autoload' => false,
|
||||
|
|
|
@ -1216,10 +1216,10 @@ class WC_Countries {
|
|||
|
||||
// Add email and phone fields.
|
||||
if ( 'billing_' === $type ) {
|
||||
if ( 'hidden' !== get_option( 'woocommerce_checkout_phone_field', 'optional' ) ) {
|
||||
if ( 'hidden' !== get_option( 'woocommerce_checkout_phone_field', 'required' ) ) {
|
||||
$address_fields['billing_phone'] = array(
|
||||
'label' => __( 'Phone', 'woocommerce' ),
|
||||
'required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'optional' ),
|
||||
'required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ),
|
||||
'type' => 'tel',
|
||||
'class' => array( 'form-row-wide' ),
|
||||
'validate' => array( 'phone' ),
|
||||
|
|
|
@ -708,7 +708,7 @@ class WC_Shop_Customizer {
|
|||
$wp_customize->add_setting(
|
||||
'woocommerce_checkout_' . $field . '_field',
|
||||
array(
|
||||
'default' => 'optional',
|
||||
'default' => 'phone' === $field ? 'required' : 'optional',
|
||||
'type' => 'option',
|
||||
'capability' => 'manage_woocommerce',
|
||||
'sanitize_callback' => array( $this, 'sanitize_checkout_field_display' ),
|
||||
|
@ -844,9 +844,9 @@ class WC_Shop_Customizer {
|
|||
if ( isset( $wp_customize->selective_refresh ) ) {
|
||||
$wp_customize->selective_refresh->add_partial(
|
||||
'woocommerce_checkout_privacy_policy_text', array(
|
||||
'selector' => '.woocommerce-terms-and-conditions-text',
|
||||
'container_inclusive' => false,
|
||||
'render_callback' => 'wc_privacy_policy_text',
|
||||
'selector' => '.woocommerce-privacy-policy-text',
|
||||
'container_inclusive' => true,
|
||||
'render_callback' => 'wc_checkout_privacy_policy_text',
|
||||
)
|
||||
);
|
||||
$wp_customize->selective_refresh->add_partial(
|
||||
|
|
|
@ -789,6 +789,28 @@ function wc_terms_and_conditions_page_content() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render privacy policy text on the checkout.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function wc_checkout_privacy_policy_text() {
|
||||
echo '<div class="woocommerce-privacy-policy-text">';
|
||||
wc_privacy_policy_text( 'checkout' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Render privacy policy text on the register forms.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function wc_registration_privacy_policy_text() {
|
||||
echo '<div class="woocommerce-privacy-policy-text">';
|
||||
wc_privacy_policy_text( 'registration' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output privacy policy text. This is custom text which can be added via the customizer/privacy settings section.
|
||||
*
|
||||
|
@ -797,22 +819,11 @@ function wc_terms_and_conditions_page_content() {
|
|||
* @since 3.4.0
|
||||
* @param string $type Type of policy to load. Valid values include registration and checkout.
|
||||
*/
|
||||
function wc_privacy_policy_text( $type = '' ) {
|
||||
function wc_privacy_policy_text( $type = 'checkout' ) {
|
||||
if ( ! wc_privacy_policy_page_id() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $type ) {
|
||||
$type = is_checkout() ? 'checkout' : 'registration';
|
||||
}
|
||||
|
||||
$text = wc_get_privacy_policy_text( $type );
|
||||
|
||||
if ( ! $text ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div class="woocommerce-terms-and-conditions-text">' . wp_kses_post( wpautop( wc_replace_policy_page_link_placeholders( $text ) ) ) . '</div>';
|
||||
echo wp_kses_post( wpautop( wc_replace_policy_page_link_placeholders( wc_get_privacy_policy_text( $type ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -212,7 +212,7 @@ add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form
|
|||
add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
|
||||
add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
|
||||
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
|
||||
add_action( 'woocommerce_checkout_terms_and_conditions', 'wc_privacy_policy_text', 20 );
|
||||
add_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 );
|
||||
add_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 );
|
||||
|
||||
/**
|
||||
|
@ -287,4 +287,4 @@ add_action( 'woocommerce_account_edit-address_endpoint', 'woocommerce_account_ed
|
|||
add_action( 'woocommerce_account_payment-methods_endpoint', 'woocommerce_account_payment_methods' );
|
||||
add_action( 'woocommerce_account_add-payment-method_endpoint', 'woocommerce_account_add_payment_method' );
|
||||
add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_edit_account' );
|
||||
add_action( 'woocommerce_register_form', 'wc_privacy_policy_text', 20 );
|
||||
add_action( 'woocommerce_register_form', 'wc_registration_privacy_policy_text', 20 );
|
||||
|
|
Loading…
Reference in New Issue