Skip to content

Commit

Permalink
Merge pull request #3307 from Automattic/add/checkout-footer-test
Browse files Browse the repository at this point in the history
Checkout: Add A/B test for not showing the footer text in checkout
  • Loading branch information
breezyskies committed Feb 15, 2016
2 parents b784d46 + b3e0600 commit 4eb5e19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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

0 comments on commit 4eb5e19

Please sign in to comment.