Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 13x 6x 6x 5x 5x 5x 5x 5x 5x 5x 5x 6x 5x 6x 1x 36x 30x 1x 5x | // plans constants
export const PLAN_BUSINESS = 'business-bundle';
export const PLAN_BUSINESS_2_YEARS = 'business-bundle-2y';
export const PLAN_BUSINESS_3_YEARS = 'business-bundle-3y';
export const PLAN_BUSINESS_MONTHLY = 'business-bundle-monthly';
export const PLAN_BUSINESS_TRIAL = 'wp_bundle_hosting_trial_monthly';
export const PLAN_MIGRATION_TRIAL = 'wp_bundle_migration_trial_monthly';
export const PLAN_100_YEARS = 'wp_com_hundred_year_bundle_centennially';
export const PLAN_ECOMMERCE = 'ecommerce-bundle';
export const PLAN_ECOMMERCE_2_YEARS = 'ecommerce-bundle-2y';
export const PLAN_ECOMMERCE_3_YEARS = 'ecommerce-bundle-3y';
export const PLAN_ECOMMERCE_MONTHLY = 'ecommerce-bundle-monthly';
export const PLAN_WOOEXPRESS_ESSENTIALS = 'wooexpress-small-bundle-yearly';
export const PLAN_WOOEXPRESS_ESSENTIALS_MONTHLY = 'wooexpress-small-bundle-monthly';
export const PLAN_WOOEXPRESS_PERFORMANCE = 'wooexpress-medium-bundle-yearly';
export const PLAN_WOOEXPRESS_PERFORMANCE_MONTHLY = 'wooexpress-medium-bundle-monthly';
export const PLAN_WOOEXPRESS_TRIAL = 'ecommerce-trial-bundle-monthly';
export const PLAN_PREMIUM = 'value_bundle';
export const PLAN_PREMIUM_2_YEARS = 'value_bundle-2y';
export const PLAN_PREMIUM_3_YEARS = 'value_bundle-3y';
export const PLAN_PREMIUM_MONTHLY = 'value_bundle-monthly';
export const PLAN_PERSONAL = 'personal-bundle';
export const PLAN_PERSONAL_2_YEARS = 'personal-bundle-2y';
export const PLAN_PERSONAL_3_YEARS = 'personal-bundle-3y';
export const PLAN_PERSONAL_MONTHLY = 'personal-bundle-monthly';
export const PLAN_STARTER = 'starter-plan';
export const PLAN_PRO = 'pro-plan';
export const PLAN_FREE = 'free_plan';
export const PLAN_JETPACK_FREE = 'jetpack_free';
export const PLAN_JETPACK_PREMIUM = 'jetpack_premium';
export const PLAN_JETPACK_BUSINESS = 'jetpack_business';
export const PLAN_JETPACK_PERSONAL = 'jetpack_personal';
export const PLAN_JETPACK_PREMIUM_MONTHLY = 'jetpack_premium_monthly';
export const PLAN_JETPACK_BUSINESS_MONTHLY = 'jetpack_business_monthly';
export const PLAN_JETPACK_PERSONAL_MONTHLY = 'jetpack_personal_monthly';
export const PLAN_JETPACK_BACKUP_T0_YEARLY = 'jetpack_backup_t0_yearly';
export const PLAN_JETPACK_BACKUP_T0_MONTHLY = 'jetpack_backup_t0_monthly';
export const PLAN_JETPACK_BACKUP_T1_BI_YEARLY = 'jetpack_backup_t1_bi_yearly';
export const PLAN_JETPACK_BACKUP_T1_YEARLY = 'jetpack_backup_t1_yearly';
export const PLAN_JETPACK_BACKUP_T1_MONTHLY = 'jetpack_backup_t1_monthly';
export const PLAN_JETPACK_BACKUP_T2_YEARLY = 'jetpack_backup_t2_yearly';
export const PLAN_JETPACK_BACKUP_T2_MONTHLY = 'jetpack_backup_t2_monthly';
export const PLAN_JETPACK_SEARCH_BI_YEARLY = 'jetpack_search_bi_yearly';
export const PLAN_JETPACK_SEARCH = 'jetpack_search';
export const PLAN_JETPACK_SEARCH_FREE = 'jetpack_search_free';
export const PLAN_JETPACK_SEARCH_MONTHLY = 'jetpack_search_monthly';
export const PLAN_JETPACK_STARTER = 'jetpack_starter_yearly';
export const PLAN_JETPACK_STARTER_MONTHLY = 'jetpack_starter_monthly';
export const PLAN_JETPACK_SECURITY_T1_BI_YEARLY = 'jetpack_security_t1_bi_yearly';
export const PLAN_JETPACK_SECURITY_T1_YEARLY = 'jetpack_security_t1_yearly';
export const PLAN_JETPACK_SECURITY_T1_MONTHLY = 'jetpack_security_t1_monthly';
export const PLAN_JETPACK_SECURITY_T2_YEARLY = 'jetpack_security_t2_yearly';
export const PLAN_JETPACK_SECURITY_T2_MONTHLY = 'jetpack_security_t2_monthly';
export const PLAN_JETPACK_COMPLETE_BI_YEARLY = 'jetpack_complete_bi_yearly';
export const PLAN_JETPACK_PRO_YEARLY = 'jetpack_pro_yearly';
export const PLAN_JETPACK_PRO_BI_YEARLY = 'jetpack_pro_bi_yearly';
export const PLAN_JETPACK_PRO_MONTHLY = 'jetpack_pro_monthly';
export const PLAN_JETPACK_COMPLETE = 'jetpack_complete';
export const PLAN_JETPACK_COMPLETE_MONTHLY = 'jetpack_complete_monthly';
export const PLAN_JETPACK_BOOST_BI_YEARLY = 'jetpack_boost_bi_yearly';
export const PLAN_JETPACK_BOOST = 'jetpack_boost_yearly';
export const PLAN_JETPACK_BOOST_MONTHLY = 'jetpack_boost_monthly';
export const PLAN_JETPACK_AI_MONTHLY = 'jetpack_ai_monthly';
export const PLAN_JETPACK_AI_YEARLY = 'jetpack_ai_yearly';
export const PLAN_JETPACK_AI_BI_YEARLY = 'jetpack_ai_bi_yearly';
export const PLAN_WPCOM_SEARCH = 'wpcom_search';
export const PLAN_WPCOM_SEARCH_MONTHLY = 'wpcom_search_monthly';
export const PLAN_JETPACK_SCAN_BI_YEARLY = 'jetpack_scan_bi_yearly';
export const PLAN_JETPACK_SCAN = 'jetpack_scan';
export const PLAN_JETPACK_SCAN_MONTHLY = 'jetpack_scan_monthly';
export const PLAN_JETPACK_ANTI_SPAM_BI_YEARLY = 'jetpack_anti_spam_bi_yearly';
export const PLAN_JETPACK_ANTI_SPAM = 'jetpack_anti_spam';
export const PLAN_JETPACK_ANTI_SPAM_MONTHLY = 'jetpack_anti_spam_monthly';
export const PLAN_JETPACK_VIDEOPRESS_BI_YEARLY = 'jetpack_videopress_bi_yearly';
export const PLAN_JETPACK_VIDEOPRESS = 'jetpack_videopress';
export const PLAN_JETPACK_VIDEOPRESS_MONTHLY = 'jetpack_videopress_monthly';
export const PLAN_HOST_BUNDLE = 'host-bundle';
export const PLAN_WPCOM_ENTERPRISE = 'wpcom-enterprise';
export const PLAN_VIP = 'vip';
export const PLAN_CHARGEBACK = 'chargeback';
export const PLAN_JETPACK_SOCIAL_BASIC_BI_YEARLY = 'jetpack_social_basic_bi_yearly';
export const PLAN_JETPACK_SOCIAL_BASIC = 'jetpack_social_basic_yearly';
export const PLAN_JETPACK_SOCIAL_BASIC_MONTHLY = 'jetpack_social_basic_monthly';
export const PLAN_JETPACK_SOCIAL_ADVANCED_BI_YEARLY = 'jetpack_social_advanced_bi_yearly';
export const PLAN_JETPACK_SOCIAL_ADVANCED = 'jetpack_social_advanced_yearly';
export const PLAN_JETPACK_SOCIAL_ADVANCED_MONTHLY = 'jetpack_social_advanced_monthly';
export const PLAN_JETPACK_SOCIAL_V1_BI_YEARLY = 'jetpack_social_v1_bi_yearly';
export const PLAN_JETPACK_SOCIAL_V1 = 'jetpack_social_v1_yearly';
export const PLAN_JETPACK_SOCIAL_V1_MONTHLY = 'jetpack_social_v1_monthly';
export const PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME = 'jetpack_golden_token_lifetime';
export const PLAN_JETPACK_CREATOR_MONTHLY = 'jetpack_creator_monthly';
export const PLAN_JETPACK_CREATOR_YEARLY = 'jetpack_creator_yearly';
export const PLAN_JETPACK_CREATOR_BI_YEARLY = 'jetpack_creator_bi_yearly';
export const PLAN_JETPACK_GROWTH_MONTHLY = 'jetpack_growth_monthly';
export const PLAN_JETPACK_GROWTH_YEARLY = 'jetpack_growth_yearly';
export const PLAN_JETPACK_GROWTH_BI_YEARLY = 'jetpack_growth_bi_yearly';
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
export const PLAN_JETPACK_BACKUP_DAILY = 'jetpack_backup_daily';
export const PLAN_JETPACK_BACKUP_DAILY_MONTHLY = 'jetpack_backup_daily_monthly';
export const PLAN_JETPACK_BACKUP_REALTIME = 'jetpack_backup_realtime';
export const PLAN_JETPACK_BACKUP_REALTIME_MONTHLY = 'jetpack_backup_realtime_monthly';
export const PLAN_JETPACK_SECURITY_DAILY = 'jetpack_security_daily';
export const PLAN_JETPACK_SECURITY_DAILY_MONTHLY = 'jetpack_security_daily_monthly';
export const PLAN_JETPACK_SECURITY_REALTIME = 'jetpack_security_realtime';
export const PLAN_JETPACK_SECURITY_REALTIME_MONTHLY = 'jetpack_security_realtime_monthly';
export const PLAN_JETPACK_STATS_BI_YEARLY = 'jetpack_stats_bi_yearly';
export const PLAN_JETPACK_STATS = 'jetpack_stats';
export const PLAN_JETPACK_STATS_MONTHLY = 'jetpack_stats_monthly';
export const PLAN_JETPACK_STATS_YEARLY = 'jetpack_stats_yearly';
export const PLAN_JETPACK_STATS_PWYW_YEARLY = 'jetpack_stats_pwyw_yearly';
export const PLAN_JETPACK_STATS_FREE = 'jetpack_stats_free_yearly';
export const POPULAR_PLANS = [ PLAN_PREMIUM ];
export const NEW_PLANS = [ PLAN_JETPACK_PERSONAL, PLAN_JETPACK_PERSONAL_MONTHLY ];
export const JETPACK_MONTHLY_PLANS = [
PLAN_JETPACK_PREMIUM_MONTHLY,
PLAN_JETPACK_BUSINESS_MONTHLY,
PLAN_JETPACK_PERSONAL_MONTHLY,
PLAN_JETPACK_STARTER_MONTHLY,
PLAN_JETPACK_SECURITY_T1_MONTHLY,
PLAN_JETPACK_SECURITY_T2_MONTHLY,
PLAN_JETPACK_COMPLETE_MONTHLY,
PLAN_JETPACK_PRO_MONTHLY,
PLAN_JETPACK_GROWTH_MONTHLY,
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
PLAN_JETPACK_SECURITY_DAILY_MONTHLY,
PLAN_JETPACK_SECURITY_REALTIME_MONTHLY,
];
export const JETPACK_LEGACY_PLANS = [
PLAN_JETPACK_PREMIUM,
PLAN_JETPACK_BUSINESS,
PLAN_JETPACK_PERSONAL,
PLAN_JETPACK_PREMIUM_MONTHLY,
PLAN_JETPACK_BUSINESS_MONTHLY,
PLAN_JETPACK_PERSONAL_MONTHLY,
];
export const JETPACK_LEGACY_PLANS_WITH_SECURITY_FEATURES = [
PLAN_JETPACK_PREMIUM,
PLAN_JETPACK_BUSINESS,
PLAN_JETPACK_PREMIUM_MONTHLY,
PLAN_JETPACK_BUSINESS_MONTHLY,
];
export const JETPACK_BUNDLES = [
PLAN_JETPACK_PRO_YEARLY,
PLAN_JETPACK_PRO_BI_YEARLY,
PLAN_JETPACK_PRO_MONTHLY,
PLAN_JETPACK_STARTER,
PLAN_JETPACK_STARTER_MONTHLY,
PLAN_JETPACK_SECURITY_T1_BI_YEARLY,
PLAN_JETPACK_SECURITY_T1_YEARLY,
PLAN_JETPACK_SECURITY_T1_MONTHLY,
PLAN_JETPACK_SECURITY_T2_YEARLY,
PLAN_JETPACK_SECURITY_T2_MONTHLY,
PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME,
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
PLAN_JETPACK_SECURITY_DAILY,
PLAN_JETPACK_SECURITY_DAILY_MONTHLY,
PLAN_JETPACK_SECURITY_REALTIME,
PLAN_JETPACK_SECURITY_REALTIME_MONTHLY,
];
export const JETPACK_PLANS_WITH_BACKUP = [
PLAN_JETPACK_PREMIUM,
PLAN_JETPACK_BUSINESS,
PLAN_JETPACK_PERSONAL,
PLAN_JETPACK_PREMIUM_MONTHLY,
PLAN_JETPACK_BUSINESS_MONTHLY,
PLAN_JETPACK_PERSONAL_MONTHLY,
PLAN_JETPACK_STARTER,
PLAN_JETPACK_STARTER_MONTHLY,
PLAN_JETPACK_SECURITY_T1_BI_YEARLY,
PLAN_JETPACK_SECURITY_T1_YEARLY,
PLAN_JETPACK_SECURITY_T1_MONTHLY,
PLAN_JETPACK_SECURITY_T2_YEARLY,
PLAN_JETPACK_SECURITY_T2_MONTHLY,
PLAN_JETPACK_COMPLETE_BI_YEARLY,
PLAN_JETPACK_COMPLETE,
PLAN_JETPACK_COMPLETE_MONTHLY,
PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME,
PLAN_JETPACK_PRO_YEARLY,
PLAN_JETPACK_PRO_BI_YEARLY,
PLAN_JETPACK_PRO_MONTHLY,
];
export const JETPACK_PLANS_WITH_ANTI_SPAM = [
PLAN_JETPACK_PREMIUM,
PLAN_JETPACK_BUSINESS,
PLAN_JETPACK_PERSONAL,
PLAN_JETPACK_PREMIUM_MONTHLY,
PLAN_JETPACK_BUSINESS_MONTHLY,
PLAN_JETPACK_PERSONAL_MONTHLY,
PLAN_JETPACK_STARTER,
PLAN_JETPACK_STARTER_MONTHLY,
PLAN_JETPACK_SECURITY_T1_BI_YEARLY,
PLAN_JETPACK_SECURITY_T1_YEARLY,
PLAN_JETPACK_SECURITY_T1_MONTHLY,
PLAN_JETPACK_SECURITY_T2_YEARLY,
PLAN_JETPACK_SECURITY_T2_MONTHLY,
PLAN_JETPACK_COMPLETE_BI_YEARLY,
PLAN_JETPACK_COMPLETE,
PLAN_JETPACK_COMPLETE_MONTHLY,
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
PLAN_JETPACK_SECURITY_DAILY,
PLAN_JETPACK_SECURITY_DAILY_MONTHLY,
PLAN_JETPACK_SECURITY_REALTIME,
PLAN_JETPACK_SECURITY_REALTIME_MONTHLY,
PLAN_JETPACK_PRO_YEARLY,
PLAN_JETPACK_PRO_BI_YEARLY,
PLAN_JETPACK_PRO_MONTHLY,
];
export const JETPACK_COMPLETE_BUNDLES = [
PLAN_JETPACK_COMPLETE_BI_YEARLY,
PLAN_JETPACK_COMPLETE,
PLAN_JETPACK_COMPLETE_MONTHLY,
];
export const JETPACK_GOLDEN_TOKEN_BUNDLES = [ PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME ];
export const JETPACK_SECURITY_BUNDLES = [
PLAN_JETPACK_SECURITY_T1_BI_YEARLY,
PLAN_JETPACK_SECURITY_T1_YEARLY,
PLAN_JETPACK_SECURITY_T1_MONTHLY,
PLAN_JETPACK_SECURITY_T2_YEARLY,
PLAN_JETPACK_SECURITY_T2_MONTHLY,
// WoA plans.
PLAN_BUSINESS,
PLAN_BUSINESS_2_YEARS,
PLAN_BUSINESS_3_YEARS,
PLAN_BUSINESS_MONTHLY,
PLAN_ECOMMERCE,
PLAN_ECOMMERCE_2_YEARS,
PLAN_ECOMMERCE_3_YEARS,
PLAN_ECOMMERCE_MONTHLY,
PLAN_PRO,
// VIP.
PLAN_VIP,
PLAN_WPCOM_ENTERPRISE,
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
PLAN_JETPACK_SECURITY_DAILY,
PLAN_JETPACK_SECURITY_DAILY_MONTHLY,
PLAN_JETPACK_SECURITY_REALTIME,
PLAN_JETPACK_SECURITY_REALTIME_MONTHLY,
];
export const JETPACK_STARTER_BUNDLES = [ PLAN_JETPACK_STARTER, PLAN_JETPACK_STARTER_MONTHLY ];
export const JETPACK_BACKUP_PRODUCTS = [
PLAN_JETPACK_BACKUP_T0_YEARLY,
PLAN_JETPACK_BACKUP_T0_MONTHLY,
PLAN_JETPACK_BACKUP_T1_BI_YEARLY,
PLAN_JETPACK_BACKUP_T1_YEARLY,
PLAN_JETPACK_BACKUP_T1_MONTHLY,
PLAN_JETPACK_BACKUP_T2_YEARLY,
PLAN_JETPACK_BACKUP_T2_MONTHLY,
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
PLAN_JETPACK_BACKUP_DAILY,
PLAN_JETPACK_BACKUP_DAILY_MONTHLY,
PLAN_JETPACK_BACKUP_REALTIME,
PLAN_JETPACK_BACKUP_REALTIME_MONTHLY,
];
export const JETPACK_SEARCH_PRODUCTS = [
PLAN_JETPACK_SEARCH_BI_YEARLY,
PLAN_JETPACK_SEARCH,
PLAN_JETPACK_SEARCH_MONTHLY,
PLAN_JETPACK_SEARCH_FREE,
PLAN_WPCOM_SEARCH,
PLAN_WPCOM_SEARCH_MONTHLY,
];
export const JETPACK_SCAN_PRODUCTS = [
PLAN_JETPACK_SCAN_BI_YEARLY,
PLAN_JETPACK_SCAN,
PLAN_JETPACK_SCAN_MONTHLY,
];
export const JETPACK_ANTI_SPAM_PRODUCTS = [
PLAN_JETPACK_ANTI_SPAM_BI_YEARLY,
PLAN_JETPACK_ANTI_SPAM,
PLAN_JETPACK_ANTI_SPAM_MONTHLY,
];
export const JETPACK_VIDEOPRESS_PRODUCTS = [
PLAN_JETPACK_VIDEOPRESS_BI_YEARLY,
PLAN_JETPACK_VIDEOPRESS,
PLAN_JETPACK_VIDEOPRESS_MONTHLY,
];
export const JETPACK_SOCIAL_BASIC_PRODUCTS = [
PLAN_JETPACK_SOCIAL_BASIC_BI_YEARLY,
PLAN_JETPACK_SOCIAL_BASIC,
PLAN_JETPACK_SOCIAL_BASIC_MONTHLY,
];
export const JETPACK_SOCIAL_ADVANCED_PRODUCTS = [
PLAN_JETPACK_SOCIAL_ADVANCED_BI_YEARLY,
PLAN_JETPACK_SOCIAL_ADVANCED,
PLAN_JETPACK_SOCIAL_ADVANCED_MONTHLY,
];
export const JETPACK_SOCIAL_V1_PRODUCTS = [
PLAN_JETPACK_SOCIAL_V1_BI_YEARLY,
PLAN_JETPACK_SOCIAL_V1,
PLAN_JETPACK_SOCIAL_V1_MONTHLY,
];
export const JETPACK_SOCIAL_PRODUCTS = [
...JETPACK_SOCIAL_BASIC_PRODUCTS,
...JETPACK_SOCIAL_ADVANCED_PRODUCTS,
...JETPACK_SOCIAL_V1_PRODUCTS,
];
export const JETPACK_BOOST_PRODUCTS = [
PLAN_JETPACK_BOOST_BI_YEARLY,
PLAN_JETPACK_BOOST,
PLAN_JETPACK_BOOST_MONTHLY,
];
export const JETPACK_AI_PRODUCTS = [
PLAN_JETPACK_AI_BI_YEARLY,
PLAN_JETPACK_AI_YEARLY,
PLAN_JETPACK_AI_MONTHLY,
];
export const JETPACK_STATS_PRODUCTS = [
PLAN_JETPACK_STATS_BI_YEARLY,
PLAN_JETPACK_STATS,
PLAN_JETPACK_STATS_MONTHLY,
PLAN_JETPACK_STATS_YEARLY,
PLAN_JETPACK_STATS_PWYW_YEARLY,
PLAN_JETPACK_STATS_FREE,
];
export const JETPACK_CREATOR_PRODUCTS = [
PLAN_JETPACK_CREATOR_MONTHLY,
PLAN_JETPACK_CREATOR_YEARLY,
PLAN_JETPACK_CREATOR_BI_YEARLY,
];
export const JETPACK_GROWTH_PRODUCTS = [
PLAN_JETPACK_GROWTH_MONTHLY,
PLAN_JETPACK_GROWTH_YEARLY,
PLAN_JETPACK_GROWTH_BI_YEARLY,
];
export const PLAN_MONTHLY_PERIOD = 31;
export const PLAN_ANNUAL_PERIOD = 365;
// features constants
export const FEATURE_WP_SUBDOMAIN = 'wordpress-subdomain';
export const FEATURE_CUSTOM_DOMAIN = 'custom-domain';
export const FEATURE_JETPACK_ESSENTIAL = 'jetpack-essential';
export const FEATURE_3GB_STORAGE = '3gb-storage';
export const FEATURE_6GB_STORAGE = '6gb-storage';
export const FEATURE_13GB_STORAGE = '13gb-storage';
export const FEATURE_UNLIMITED_STORAGE = 'unlimited-storage';
export const FEATURE_COMMUNITY_SUPPORT = 'community-support';
export const FEATURE_EMAIL_LIVE_CHAT_SUPPORT = 'email-live-chat-support';
export const FEATURE_PREMIUM_SUPPORT = 'priority-support';
export const FEATURE_BASIC_DESIGN = 'basic-design';
export const FEATURE_ADVANCED_DESIGN = 'advanced-design';
export const FEATURE_GOOGLE_ANALYTICS = 'google-analytics';
export const FEATURE_LIVE_CHAT_SUPPORT = 'live-chat-support';
export const FEATURE_NO_ADS = 'no-adverts';
export const FEATURE_VIDEO_UPLOADS = 'video-upload';
export const FEATURE_VIDEO_UPLOADS_JETPACK_PREMIUM = 'video-upload-jetpack-premium';
export const FEATURE_VIDEO_UPLOADS_JETPACK_PRO = 'video-upload-jetpack-pro';
export const FEATURE_AUDIO_UPLOADS = 'audio-upload';
export const FEATURE_WORDADS_INSTANT = 'wordads-instant';
export const FEATURE_NO_BRANDING = 'no-wp-branding';
export const FEATURE_ADVANCED_SEO = 'advanced-seo';
export const FEATURE_BUSINESS_ONBOARDING = 'business-onboarding';
export const FEATURE_UPLOAD_PLUGINS = 'upload-plugins';
// jetpack features constants
export const FEATURE_STANDARD_SECURITY_TOOLS = 'standard-security-tools';
export const FEATURE_SITE_STATS = 'site-stats';
export const FEATURE_TRAFFIC_TOOLS = 'traffic-tools';
export const FEATURE_MANAGE = 'jetpack-manage';
export const FEATURE_SPAM_AKISMET_PLUS = 'spam-akismet-plus';
export const FEATURE_OFFSITE_BACKUP_VAULTPRESS_DAILY = 'offsite-backup-vaultpress-daily';
export const FEATURE_OFFSITE_BACKUP_VAULTPRESS_REALTIME = 'offsite-backup-vaultpress-realtime';
export const FEATURE_BACKUP_ARCHIVE_30 = 'backup-archive-30';
export const FEATURE_BACKUP_ARCHIVE_15 = 'backup-archive-15';
export const FEATURE_BACKUP_ARCHIVE_UNLIMITED = 'backup-archive-unlimited';
export const FEATURE_BACKUP_STORAGE_SPACE_UNLIMITED = 'backup-storage-space-unlimited';
export const FEATURE_AUTOMATED_RESTORES = 'automated-restores';
export const FEATURE_EASY_SITE_MIGRATION = 'easy-site-migration';
export const FEATURE_MALWARE_SCANNING_DAILY = 'malware-scanning-daily';
export const FEATURE_MALWARE_SCANNING_DAILY_AND_ON_DEMAND = 'malware-scanning-daily-and-on-demand';
export const FEATURE_ONE_CLICK_THREAT_RESOLUTION = 'one-click-threat-resolution';
export const FEATURE_POLLS_PRO = 'polls-pro';
export const FEATURE_CORE_JETPACK = 'core-jetpack';
export const FEATURE_BASIC_SUPPORT_JETPACK = 'basic-support-jetpack';
export const FEATURE_BASIC_SECURITY_JETPACK = 'basic-security-jetpack';
export const FEATURE_SITE_BACKUPS_JETPACK = 'site-backups-jetpack';
export const FEATURE_REALTIME_BACKUPS_JETPACK = 'realtime-backups-jetpack';
export const FEATURE_SECURITY_SCANNING_JETPACK = 'security-scanning-jetpack';
export const FEATURE_REVENUE_GENERATION_JETPACK = 'revenue-generation-jetpack';
export const FEATURE_VIDEO_HOSTING_JETPACK = 'video-hosting-jetpack';
export const FEATURE_SECURITY_ESSENTIALS_JETPACK = 'security-essentials-jetpack';
export const FEATURE_PRIORITY_SUPPORT_JETPACK = 'priority-support-jetpack';
export const FEATURE_WORDADS_JETPACK = 'wordads-jetpack';
export const FEATURE_GOOGLE_ANALYTICS_JETPACK = 'google-analytics-jetpack';
export const FEATURE_SEARCH_JETPACK = 'search-jetpack';
export const FEATURE_VIDEOPRESS = 'videopress-jetpack';
export const FEATURE_JETPACK_AI = 'ai-jetpack';
export const FEATURE_JETPACK_CRM = 'crm-jetpack';
export const FEATURE_JETPACK_BOOST = 'boost-jetpack';
export const FEATURE_SIMPLE_PAYMENTS_JETPACK = 'simple-payments-jetpack';
export const FEATURE_NEWSLETTER_JETPACK = 'newsletter-jetpack';
export const FEATURE_DOWNTIME_MONITORING_JETPACK = 'downtime-monitoring-jetpack';
export const FEATURE_SSO = 'sso-jetpack';
export const FEATURE_POST_BY_EMAIL = 'post-by-email-jetpack';
export const FEATURE_JETPACK_SOCIAL = 'social-jetpack';
export const FEATURE_JETPACK_BLAZE = 'blaze-jetpack';
export const FEATURE_JETPACK_EARN = 'earn-jetpack';
export const FEATURE_JETPACK_ACCOUNT_PROTECTION = 'account-protection-jetpack';
// Upsells
export const JETPACK_FEATURE_PRODUCT_UPSELL_MAP = {
[ FEATURE_DOWNTIME_MONITORING_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_GOOGLE_ANALYTICS_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_JETPACK_AI ]: PLAN_JETPACK_AI_YEARLY,
[ FEATURE_JETPACK_BOOST ]: PLAN_JETPACK_BOOST,
[ FEATURE_JETPACK_BLAZE ]: PLAN_JETPACK_FREE,
[ FEATURE_JETPACK_EARN ]: PLAN_JETPACK_FREE,
[ FEATURE_JETPACK_SOCIAL ]: PLAN_JETPACK_SOCIAL_V1,
[ FEATURE_POST_BY_EMAIL ]: PLAN_JETPACK_FREE,
[ FEATURE_PRIORITY_SUPPORT_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_SEARCH_JETPACK ]: PLAN_JETPACK_SEARCH,
[ FEATURE_SECURITY_SCANNING_JETPACK ]: PLAN_JETPACK_SCAN,
[ FEATURE_SIMPLE_PAYMENTS_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_SITE_BACKUPS_JETPACK ]: PLAN_JETPACK_BACKUP_T1_YEARLY,
[ FEATURE_SPAM_AKISMET_PLUS ]: PLAN_JETPACK_ANTI_SPAM,
[ FEATURE_SSO ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_VIDEO_HOSTING_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_VIDEOPRESS ]: PLAN_JETPACK_VIDEOPRESS,
[ FEATURE_NEWSLETTER_JETPACK ]: PLAN_JETPACK_CREATOR_YEARLY,
[ FEATURE_WORDADS_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_JETPACK_ACCOUNT_PROTECTION ]: PLAN_JETPACK_FREE,
[ FEATURE_ADVANCED_SEO ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
};
/**
* Checks if a plan slug represents a monthly plan.
*
* @param {string} plan - The plan slug
* @return {boolean} True if it's monthly plan
*/
export function isMonthly( plan ) {
return JETPACK_MONTHLY_PLANS.includes( plan );
}
/**
* Checks if a plan slug is in the group of popular plans.
*
* @param {string} plan - The plan slug
* @return {boolean} True if it's popular plan
*/
export function isPopular( plan ) {
return POPULAR_PLANS.includes( plan );
}
/**
* Checks if a plan slug is a new plan.
*
* @param {string} plan - The plan slug
* @return {boolean} True if it's new plan
*/
export function isNew( plan ) {
return NEW_PLANS.includes( plan );
}
/**
* Determines if a plan includes Jetpack Anti-Spam.
*
* @param {string} plan - The plan slug
* @return {boolean} True if the plan includes Jetpack Anti-Spam
*/
export function isJetpackPlanWithAntiSpam( plan ) {
return JETPACK_PLANS_WITH_ANTI_SPAM.includes( plan );
}
/**
* Determines if a plan includes backup features.
*
* @param {string} plan - The plan slug
* @return {boolean} True if the plan contains backup features
*/
export function isJetpackPlanWithBackup( plan ) {
return JETPACK_PLANS_WITH_BACKUP.includes( plan );
}
/**
* Determines if a product is Jetpack Backup.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack Backup
*/
export function isJetpackBackup( product ) {
return JETPACK_BACKUP_PRODUCTS.includes( product );
}
/**
* Checks if a product slug is Jetpack Search.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack Search
*/
export function isJetpackSearch( product ) {
return JETPACK_SEARCH_PRODUCTS.includes( product );
}
/**
* Checks if a product slug is Jetpack Scan.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack Scan
*/
export function isJetpackScan( product ) {
return JETPACK_SCAN_PRODUCTS.includes( product );
}
/**
* Checks if a product slug is Jetpack Anti-Spam.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack Anti-Spam
*/
export function isJetpackAntiSpam( product ) {
return JETPACK_ANTI_SPAM_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack VideoPress.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack VideoPress, false otherwise.
*/
export function isJetpackVideoPress( product ) {
return JETPACK_VIDEOPRESS_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack Social.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack Social, false otherwise.
*/
export function isJetpackSocial( product ) {
return JETPACK_SOCIAL_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack Boost.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack Social, false otherwise.
*/
export function isJetpackBoost( product ) {
return JETPACK_BOOST_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack AI.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack AI, false otherwise.
*/
export function isJetpackAI( product ) {
return JETPACK_AI_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack Stats.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack Stats, false otherwise.
*/
export function isJetpackStats( product ) {
return JETPACK_STATS_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack Creator.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack Creator, false otherwise.
*/
export function isJetpackCreator( product ) {
return JETPACK_CREATOR_PRODUCTS.includes( product );
}
/**
* Determines if a product is Jetpack Growth.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack Growth, false otherwise.
*/
export function isJetpackGrowth( product ) {
return JETPACK_GROWTH_PRODUCTS.includes( product );
}
/**
* Checks if a product slug is a Jetpack product.
*
* @param {string} product - The product id.
* @return {boolean} True if the product is Jetpack product.
*/
export function isJetpackProduct( product ) {
return (
isJetpackBackup( product ) ||
isJetpackSearch( product ) ||
isJetpackScan( product ) ||
isJetpackAntiSpam( product ) ||
isJetpackVideoPress( product ) ||
isJetpackSocial( product ) ||
isJetpackBoost( product ) ||
isJetpackAI( product ) ||
isJetpackStats( product ) ||
isJetpackCreator( product )
);
}
/**
* Checks if the product slug is a Jetpack bundle.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack bundle
*/
export function isJetpackBundle( product ) {
return JETPACK_BUNDLES.includes( product );
}
/**
* Checks if the product slug is a Jetpack Starter bundle.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is Jetpack Starter bundle
*/
export function isJetpackStarterBundle( product ) {
return JETPACK_STARTER_BUNDLES.includes( product );
}
/**
* Determine if the given product is a Security Bundle.
*
* @param {number} product - productId to check
* @return {boolean} if the given product is a Security Bundle
*/
export function isJetpackSecurityBundle( product ) {
return JETPACK_SECURITY_BUNDLES.includes( product );
}
/**
* Checks if the product slug is a legacy Jetpack plan.
*
* @param {string} product - The product slug
* @return {boolean} True if the product is a legacy Jetpack plan
*/
export function isJetpackLegacyPlan( product ) {
return JETPACK_LEGACY_PLANS.includes( product );
}
/**
* Identify legacy plans that contain features comparable to a security bundle
*
* @param {string} product - The product id.
* @return {boolean} True if the product is a legacy Jetpack plan with security features, false otherwise.
*/
export function isSecurityComparableJetpackLegacyPlan( product ) {
return JETPACK_LEGACY_PLANS_WITH_SECURITY_FEATURES.includes( product );
}
/**
* Retrieves the upsell for a feature.
*
* @param {string} feature - The feature slug.
* @return {string} The product slug required for the feature.
*/
export function getJetpackProductUpsellByFeature( feature ) {
return JETPACK_FEATURE_PRODUCT_UPSELL_MAP[ feature ];
}
/**
* Gets the CSS class to use for the plans section, given the plan slug.
*
* @param {string} plan - The plan slug.
* @return {string} The CSS class to use.
*/
export function getPlanClass( plan ) {
switch ( plan ) {
case PLAN_JETPACK_FREE:
case PLAN_FREE:
return 'is-free-plan';
case PLAN_PERSONAL:
case PLAN_PERSONAL_2_YEARS:
case PLAN_PERSONAL_3_YEARS:
case PLAN_PERSONAL_MONTHLY:
case PLAN_STARTER:
case PLAN_JETPACK_PERSONAL:
case PLAN_JETPACK_PERSONAL_MONTHLY:
return 'is-personal-plan';
case PLAN_PREMIUM:
case PLAN_PREMIUM_2_YEARS:
case PLAN_PREMIUM_3_YEARS:
case PLAN_PREMIUM_MONTHLY:
case PLAN_JETPACK_PREMIUM:
case PLAN_JETPACK_PREMIUM_MONTHLY:
return 'is-premium-plan';
case PLAN_BUSINESS:
case PLAN_BUSINESS_2_YEARS:
case PLAN_BUSINESS_3_YEARS:
case PLAN_BUSINESS_MONTHLY:
case PLAN_JETPACK_BUSINESS:
case PLAN_JETPACK_BUSINESS_MONTHLY:
case PLAN_ECOMMERCE:
case PLAN_ECOMMERCE_2_YEARS:
case PLAN_ECOMMERCE_3_YEARS:
case PLAN_ECOMMERCE_MONTHLY:
case PLAN_PRO:
case PLAN_BUSINESS_TRIAL:
case PLAN_MIGRATION_TRIAL:
case PLAN_100_YEARS:
case PLAN_WOOEXPRESS_ESSENTIALS:
case PLAN_WOOEXPRESS_ESSENTIALS_MONTHLY:
case PLAN_WOOEXPRESS_PERFORMANCE:
case PLAN_WOOEXPRESS_PERFORMANCE_MONTHLY:
case PLAN_WOOEXPRESS_TRIAL:
return 'is-business-plan';
case PLAN_JETPACK_STARTER:
case PLAN_JETPACK_STARTER_MONTHLY:
return 'is-jetpack-starter-plan';
case PLAN_JETPACK_SECURITY_T1_BI_YEARLY:
case PLAN_JETPACK_SECURITY_T1_YEARLY:
case PLAN_JETPACK_SECURITY_T1_MONTHLY:
return 'is-security-t1-plan';
case PLAN_JETPACK_SECURITY_T2_YEARLY:
case PLAN_JETPACK_SECURITY_T2_MONTHLY:
return 'is-security-t2-plan';
case PLAN_JETPACK_PRO_YEARLY:
case PLAN_JETPACK_PRO_BI_YEARLY:
case PLAN_JETPACK_PRO_MONTHLY:
return 'is-jetpack-pro-plan';
case PLAN_JETPACK_COMPLETE_BI_YEARLY:
case PLAN_JETPACK_COMPLETE:
case PLAN_JETPACK_COMPLETE_MONTHLY:
case PLAN_VIP:
return 'is-complete-plan';
case PLAN_JETPACK_BACKUP_T0_YEARLY:
case PLAN_JETPACK_BACKUP_T0_MONTHLY:
return 'is-backup-t0-plan';
case PLAN_JETPACK_BACKUP_T1_BI_YEARLY:
case PLAN_JETPACK_BACKUP_T1_YEARLY:
case PLAN_JETPACK_BACKUP_T1_MONTHLY:
return 'is-backup-t1-plan';
case PLAN_JETPACK_BACKUP_T2_YEARLY:
case PLAN_JETPACK_BACKUP_T2_MONTHLY:
return 'is-backup-t2-plan';
case PLAN_JETPACK_SEARCH_BI_YEARLY:
case PLAN_JETPACK_SEARCH:
case PLAN_JETPACK_SEARCH_MONTHLY:
case PLAN_WPCOM_SEARCH:
case PLAN_WPCOM_SEARCH_MONTHLY:
return 'is-search-plan';
case PLAN_JETPACK_SEARCH_FREE:
return 'is-free-search-plan';
case PLAN_JETPACK_SCAN_BI_YEARLY:
case PLAN_JETPACK_SCAN:
case PLAN_JETPACK_SCAN_MONTHLY:
return 'is-scan-plan';
case PLAN_JETPACK_ANTI_SPAM_BI_YEARLY:
case PLAN_JETPACK_ANTI_SPAM:
case PLAN_JETPACK_ANTI_SPAM_MONTHLY:
return 'is-anti-spam-plan';
case PLAN_JETPACK_VIDEOPRESS_BI_YEARLY:
case PLAN_JETPACK_VIDEOPRESS:
case PLAN_JETPACK_VIDEOPRESS_MONTHLY:
return 'is-videopress-plan';
case PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME:
return 'is-jetpack-golden-token-plan';
case PLAN_JETPACK_CREATOR_BI_YEARLY:
case PLAN_JETPACK_CREATOR_YEARLY:
case PLAN_JETPACK_CREATOR_MONTHLY:
return 'is-jetpack-creator-plan';
case PLAN_JETPACK_GROWTH_BI_YEARLY:
case PLAN_JETPACK_GROWTH_YEARLY:
case PLAN_JETPACK_GROWTH_MONTHLY:
return 'is-jetpack-growth-plan';
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
case PLAN_JETPACK_SECURITY_DAILY:
case PLAN_JETPACK_SECURITY_DAILY_MONTHLY:
return 'is-daily-security-plan';
case PLAN_JETPACK_SECURITY_REALTIME:
case PLAN_JETPACK_SECURITY_REALTIME_MONTHLY:
return 'is-realtime-security-plan';
case PLAN_JETPACK_BACKUP_DAILY:
case PLAN_JETPACK_BACKUP_DAILY_MONTHLY:
return 'is-daily-backup-plan';
case PLAN_JETPACK_BACKUP_REALTIME:
case PLAN_JETPACK_BACKUP_REALTIME_MONTHLY:
return 'is-realtime-backup-plan';
case PLAN_JETPACK_SOCIAL_BASIC_BI_YEARLY:
case PLAN_JETPACK_SOCIAL_BASIC:
case PLAN_JETPACK_SOCIAL_BASIC_MONTHLY:
return 'is-jetpack-social-basic-plan';
case PLAN_JETPACK_SOCIAL_ADVANCED_BI_YEARLY:
case PLAN_JETPACK_SOCIAL_ADVANCED:
case PLAN_JETPACK_SOCIAL_ADVANCED_MONTHLY:
return 'is-jetpack-social-advanced-plan';
case PLAN_JETPACK_SOCIAL_V1_BI_YEARLY:
case PLAN_JETPACK_SOCIAL_V1:
case PLAN_JETPACK_SOCIAL_V1_MONTHLY:
return 'is-jetpack-social-v1-plan';
case PLAN_JETPACK_BOOST_BI_YEARLY:
case PLAN_JETPACK_BOOST:
case PLAN_JETPACK_BOOST_MONTHLY:
return 'is-jetpack-boost-plan';
case PLAN_JETPACK_AI_BI_YEARLY:
case PLAN_JETPACK_AI_MONTHLY:
case PLAN_JETPACK_AI_YEARLY:
return 'is-jetpack-ai-plan';
case PLAN_JETPACK_STATS_BI_YEARLY:
case PLAN_JETPACK_STATS:
case PLAN_JETPACK_STATS_MONTHLY:
case PLAN_JETPACK_STATS_YEARLY:
case PLAN_JETPACK_STATS_PWYW_YEARLY:
return 'is-jetpack-stats-plan';
case PLAN_JETPACK_STATS_FREE:
return 'is-free-jetpack-stats-plan';
default:
return '';
}
}
/**
* Retrieve the monthly equivalent of a yearly plan.
*
* @param {string} plan - The plan slug of the yearly plan.
* @return {string} The monthly plan if it exists, otherwise, an empty string.
*/
export function getMonthlyPlanByYearly( plan ) {
switch ( plan ) {
case PLAN_JETPACK_PREMIUM:
return PLAN_JETPACK_PREMIUM_MONTHLY;
case PLAN_JETPACK_BUSINESS:
return PLAN_JETPACK_BUSINESS_MONTHLY;
case PLAN_JETPACK_PERSONAL:
return PLAN_JETPACK_PERSONAL_MONTHLY;
case PLAN_JETPACK_STARTER:
return PLAN_JETPACK_STARTER_MONTHLY;
case PLAN_JETPACK_SECURITY_T1_BI_YEARLY:
return PLAN_JETPACK_SECURITY_T1_MONTHLY;
case PLAN_JETPACK_SECURITY_T1_YEARLY:
return PLAN_JETPACK_SECURITY_T1_MONTHLY;
case PLAN_JETPACK_SECURITY_T2_YEARLY:
return PLAN_JETPACK_SECURITY_T2_MONTHLY;
case PLAN_JETPACK_COMPLETE:
return PLAN_JETPACK_COMPLETE_MONTHLY;
case PLAN_JETPACK_GROWTH_YEARLY:
return PLAN_JETPACK_GROWTH_MONTHLY;
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
case PLAN_JETPACK_SECURITY_DAILY:
return PLAN_JETPACK_SECURITY_DAILY_MONTHLY;
case PLAN_JETPACK_SECURITY_REALTIME:
return PLAN_JETPACK_SECURITY_REALTIME_MONTHLY;
default:
return '';
}
}
/**
* Determines if the plan or product is a special gifted offering.
*
* @param {string} planOrProductSlug - A plan or product slug.
* @return {boolean} True if the plan or product is a special gifted offering, false otherwise.
*/
export function containsGiftedPlanOrProduct( planOrProductSlug ) {
return [ PLAN_JETPACK_GOLDEN_TOKEN_LIFETIME ].includes( planOrProductSlug );
}
/**
* Determines if the plan class contains backup daily.
*
* @param {string} planClass - A plan class.
* @return {boolean} True if the plan class contains backup daily, false otherwise.
*/
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
export function containsBackupDaily( planClass ) {
return [
'is-personal-plan',
'is-premium-plan',
'is-daily-security-plan',
'is-daily-backup-plan',
].includes( planClass );
}
/**
* Determines if the plan class contains backup realtime.
*
* @param {string} planClass - A plan class.
* @return {boolean} True if the plan class contains backup realtime, false otherwise.
*/
export function containsBackupRealtime( planClass ) {
return [
'is-business-plan',
'is-backup-t0-plan',
'is-backup-t1-plan',
'is-backup-t2-plan',
'is-startup-plan',
'is-security-t1-plan',
'is-security-t2-plan',
'is-complete-plan',
'is-jetpack-pro-plan',
'is-jetpack-golden-token-plan',
// DEPRECATED: Daily and Real-time variations will soon be retired.
// Remove after all customers are migrated to new products.
'is-realtime-security-plan',
'is-realtime-backup-plan',
].includes( planClass );
}
|