diff --git a/client/my-sites/plans/controller.jsx b/client/my-sites/plans/controller.jsx index 153953bf08d99..5ac1ee5d91ed6 100644 --- a/client/my-sites/plans/controller.jsx +++ b/client/my-sites/plans/controller.jsx @@ -32,6 +32,14 @@ export function plans( context, next ) { return productSelect( '/plans' )( context, next ); } + // Emails rely on the `discount` query param to auto-apply coupons + // from the Calypso admin plans page. The `/start` onboarding flow + // plans page, however, relies on the `coupon` query param for the + // same purpose. We handle both coupon and discount here for the time + // being to avoid confusion. We'll probably consolidate to just `coupon` + // in the future. + const withDiscount = context.query.coupon || context.query.discount; + context.primary = (