Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout: Add A/B test for not showing the footer text in checkout #3307

Merged
merged 1 commit into from
Feb 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/lib/abtest/active-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ module.exports = {
},
defaultVariation: 'original'
},
checkoutFooter: {
datestamp: '20160215',
variations: {
original: 50,
noFooter: 50
},
defaultVariation: 'original'
},
};
7 changes: 6 additions & 1 deletion client/my-sites/upgrades/checkout/supporting-text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ var React = require( 'react' );
var cartValues = require( 'lib/cart-values' ),
getRefundPolicy = cartValues.getRefundPolicy,
cartItems = cartValues.cartItems,
hasFreeTrial = cartItems.hasFreeTrial;
hasFreeTrial = cartItems.hasFreeTrial,
abtest = require( 'lib/abtest' ).abtest;

var SupportingText = React.createClass( {

Expand Down Expand Up @@ -70,6 +71,10 @@ var SupportingText = React.createClass( {
},

render: function() {
if ( abtest( 'checkoutFooter' ) === 'noFooter' ) {
return null;
}

return hasFreeTrial( this.props.cart )
? null : (
<ul className="supporting-text">
Expand Down