Merge pull request #19206 from woocommerce/fix/19175

Update the description of the user tracking notice in the onboarding wizard
This commit is contained in:
Mike Jolley 2018-03-13 18:22:10 +00:00 committed by GitHub
commit c8909c1656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 107 additions and 40 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,9 @@ body {
max-width: 30%;
}
}
.wc-setup {
text-align: center;
}
.wc-setup-content {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
padding: 2em;
@ -20,6 +23,7 @@ body {
background: #fff;
overflow: hidden;
zoom: 1;
text-align: left;
h1, h2, h3, table {
margin: 0 0 20px;
@ -297,7 +301,6 @@ body {
}
}
.woocommerce-newsletter,
.woocommerce-tracker,
.updated {
padding: 24px 24px 0;
margin: 0 0 24px;
@ -312,9 +315,74 @@ body {
margin: 0 0 24px;
}
}
.woocommerce-tracker + .woocommerce-newsletter {
margin-top: -24px;
border-top: 2px dashed #ddd;
.woocommerce-tracker {
margin: 24px 0;
border: 1px solid #eee;
padding: 20px;
border-radius: 4px;
overflow: hidden;
p {
font-size: 14px;
line-height: 1.5em;
}
.checkbox {
line-height: 24px;
font-weight: 500;
font-size: 1em;
margin-top: 0;
margin-bottom: 20px;
input[type="checkbox"] {
opacity: 0;
position: absolute;
left: -9999px;
}
label {
position: relative;
display: inline-block;
padding-left: 28px;
&:before,
&:after {
position: absolute;
content: "";
display: inline-block;
}
&:before {
height: 16px;
width: 16px;
left: 0px;
top: 3px;
border: 1px solid #aaa;
background-color: #fff;
border-radius: 3px;
}
&:after {
height: 5px;
width: 9px;
border-left: 2px solid;
border-bottom: 2px solid;
transform: rotate(-45deg);
left: 4px;
top: 7px;
color: #fff;
}
}
input[type="checkbox"] + label::after {
content: none;
}
input[type="checkbox"]:checked + label::after {
content: "";
}
input[type="checkbox"]:focus + label::before {
outline: rgb(59, 153, 252) auto 5px;
}
input[type="checkbox"]:checked + label::before {
background: #935687;
border-color: #935687;
outline: none;
}
}
}
}
.wc-setup-steps {
@ -417,8 +485,8 @@ body {
.wc-setup-footer-links {
font-size: 0.85em;
color: #b5b5b5;
margin: 1.18em 0;
display: block;
margin: 1.18em auto;
display: inline-block;
text-align: center;
}
@ -1072,15 +1140,6 @@ p.jetpack-terms {
}
}
.allow-tracking {
color: #9f9f9f;
margin-top: 1em;
text-align: center;
font-size: 0.9em;
padding-top: 2em;
border-top: 1px solid #ccc;
}
.wc-wizard-service-setting-stripe_create_account, .wc-wizard-service-setting-ppec_paypal_reroute_requests {
display: flex;
align-items: flex-start;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -477,9 +477,17 @@ class WC_Admin_Setup_Wizard {
</label>
<?php if ( 'unknown' === get_option( 'woocommerce_allow_tracking', 'unknown' ) ) : ?>
<div class="allow-tracking">
<input type="checkbox" id="wc_tracker_optin" name="wc_tracker_optin" value="yes" checked />
<label for="wc_tracker_optin"><?php esc_html_e( 'Allow WooCommerce to collect non-sensitive diagnostic data and usage information.', 'woocommerce' ); ?></label>
<div class="woocommerce-tracker">
<p class="checkbox">
<input type="checkbox" id="wc_tracker_optin" name="wc_tracker_optin" value="yes" checked />
<label for="wc_tracker_optin"><?php esc_html_e( 'Help WooCommerce improve by enabling usage tracking.', 'woocommerce' ); ?></label>
</p>
<p>
<?php
esc_html_e( 'Checking this box means making WooCommerce better &mdash; your store will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense. If you do not check this box, we will not know this store exists and we will not collect any usage data.', 'woocommerce' );
echo ' <a target="_blank" href="https://woocommerce.com/usage-tracking/">' . esc_html__( 'Read more about what we collect.', 'woocommerce' ) . '</a>';
?>
</p>
</div>
<?php endif; ?>
<p class="wc-setup-actions step">

View File

@ -1,16 +0,0 @@
<?php
/**
* Admin View: Notice - Tracking
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="message" class="updated woocommerce-message woocommerce-tracker">
<p><?php printf( __( 'Want to help make WooCommerce even more awesome? Allow WooCommerce to collect non-sensitive diagnostic data and usage information, and get %1$s discount on your next WooThemes purchase. <a href="%2$s" target="_blank">Find out more</a>.', 'woocommerce' ), '20%', 'https://woocommerce.com/usage-tracking/' ); ?></p>
<p class="submit">
<a class="button-primary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc_tracker_optin', 'true' ), 'wc_tracker_optin', 'wc_tracker_nonce' ) ); ?>"><?php _e( 'Allow', 'woocommerce' ); ?></a>
<a class="skip button-secondary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'tracking' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'No, do not bother me again', 'woocommerce' ); ?></a>
</p>
</div>