File size: 3,936 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
import {
GROUP_JETPACK,
GROUP_WPCOM,
TYPE_FREE,
TYPE_BLOGGER,
TYPE_PERSONAL,
TYPE_PREMIUM,
} from '@automattic/calypso-products';
const simplePaymentsNoticeTextWPCOM =
'Upgrade to a Explorer or Creator plan today and start collecting payments with the Pay with PayPal button!';
const simplePaymentsNoticeTextJetpack =
'Upgrade to a Premium or Professional plan today and start collecting payments with the Pay with PayPal button!';
export type ActiveDiscount = {
name: string;
startsAt?: Date;
endsAt?: Date;
plansPageNoticeText?: string;
targetPlans?: {
type: string;
group: string;
}[];
plansPageNoticeTextTitle?: string;
};
/**
* No translate() used on some of these since we're launching those promotions just for the EN audience
*/
const activeDiscounts: ActiveDiscount[] = [
{
name: 'simple_payments_wpcom',
startsAt: new Date( 2018, 6, 9, 0, 0, 0 ),
endsAt: new Date( 2018, 8, 9, 23, 59, 59 ),
plansPageNoticeText: simplePaymentsNoticeTextWPCOM,
targetPlans: [
{ type: TYPE_FREE, group: GROUP_WPCOM },
{ type: TYPE_PERSONAL, group: GROUP_WPCOM },
],
},
{
name: 'simple_payments_jetpack',
startsAt: new Date( 2018, 6, 9, 0, 0, 0 ),
endsAt: new Date( 2018, 8, 9, 23, 59, 59 ),
plansPageNoticeText: simplePaymentsNoticeTextJetpack,
targetPlans: [
{ type: TYPE_FREE, group: GROUP_JETPACK },
{ type: TYPE_PERSONAL, group: GROUP_JETPACK },
],
},
{
name: 'renewing_plan',
startsAt: new Date( 2018, 6, 11, 0, 0, 0 ),
endsAt: new Date( 2018, 6, 16, 23, 59, 59 ),
plansPageNoticeText:
'Enter coupon code YOURGIFT30 during checkout to redeem your 30% off discount!',
targetPlans: [
{ type: TYPE_PERSONAL, group: GROUP_WPCOM },
{ type: TYPE_PREMIUM, group: GROUP_WPCOM },
],
},
{
name: 'free_domain',
plansPageNoticeTextTitle: 'Get a free domain name by upgrading to any plan listed below!',
plansPageNoticeText:
'Improve your SEO, branding, credibility, and even word-of-mouth marketing with a custom domain. All plan upgrades include a free domain name of your choice for one year.',
},
{
name: 'sale_wpsave20',
startsAt: new Date( 2019, 1, 1, 0, 0, 0 ),
endsAt: new Date( 2099, 1, 1, 0, 0, 0 ), //evergreen
plansPageNoticeText: 'Enter coupon code “WPSAVE20” at checkout to claim your 20% discount',
targetPlans: [
{ type: TYPE_FREE, group: GROUP_WPCOM },
{ type: TYPE_BLOGGER, group: GROUP_WPCOM },
{ type: TYPE_PERSONAL, group: GROUP_WPCOM },
{ type: TYPE_PREMIUM, group: GROUP_WPCOM },
],
},
{
name: 'sale_wpsave20_jp',
startsAt: new Date( 2019, 1, 1, 0, 0, 0 ),
endsAt: new Date( 2099, 1, 1, 0, 0, 0 ), //evergreen
plansPageNoticeText: 'Enter coupon code “JPSALE20” at checkout to claim your 20% discount',
targetPlans: [
{ type: TYPE_FREE, group: GROUP_JETPACK },
{ type: TYPE_PERSONAL, group: GROUP_JETPACK },
{ type: TYPE_PREMIUM, group: GROUP_JETPACK },
],
},
{
name: 'sale_julybusiness40',
startsAt: new Date( '2019-07-22 00:00:00' ),
endsAt: new Date( '2019-07-25 23:59:59' ),
plansPageNoticeText:
'Enter coupon code "JULYBUSINESS40" at checkout to save 40% on a Business plan site upgrade',
targetPlans: [
{ type: TYPE_FREE, group: GROUP_WPCOM },
{ type: TYPE_BLOGGER, group: GROUP_WPCOM },
{ type: TYPE_PERSONAL, group: GROUP_WPCOM },
{ type: TYPE_PREMIUM, group: GROUP_WPCOM },
],
},
{
name: 'plans_no_tabs',
startsAt: new Date( 2018, 2, 7, 0, 0, 0 ),
endsAt: new Date( 2120, 9, 26, 0, 0, 0 ),
},
// NOTE: These two (new_plans and default_plans_tab_business) should remain at the bottom.
// It's a temporary hack and will be removed shortly.
{
name: 'new_plans',
startsAt: new Date( 2018, 9, 25, 0, 0, 1 ),
endsAt: new Date( 2120, 9, 26, 0, 0, 0 ),
},
{
name: 'default_plans_tab_business',
startsAt: new Date( 2018, 9, 25, 0, 0, 1 ),
endsAt: new Date( 2120, 9, 26, 0, 0, 0 ),
},
];
export default activeDiscounts;
|