MailPoet Newsletters (New) - Version 3.39.1

Version Description

  • 2019-11-05 =
  • Added: new premium page in the MailPoet admin;
  • Fixed: Linux cron now only runs when set as the task scheduler method;
  • Fixed: WooCommerce segments are now skipped when WooCommerce is not active.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.39.1
Comparing to
See all releases

Code changes from version 3.39.0 to 3.39.1

Files changed (52) hide show
  1. assets/dist/css/{admin.0d8fba2c.css → admin.3532a6fa.css} +1 -1
  2. assets/dist/css/manifest.json +1 -1
  3. generated/FreeCachedContainer.php +1 -1
  4. lang/mailpoet-ar.mo +0 -0
  5. lang/mailpoet-bg_BG.mo +0 -0
  6. lang/mailpoet-ca.mo +0 -0
  7. lang/mailpoet-cs_CZ.mo +0 -0
  8. lang/mailpoet-da_DK.mo +0 -0
  9. lang/mailpoet-de_DE-formal.mo +0 -0
  10. lang/mailpoet-de_DE.mo +0 -0
  11. lang/mailpoet-el.mo +0 -0
  12. lang/mailpoet-en_GB.mo +0 -0
  13. lang/mailpoet-es_ES.mo +0 -0
  14. lang/mailpoet-es_MX.mo +0 -0
  15. lang/mailpoet-fa_IR.mo +0 -0
  16. lang/mailpoet-fr_CA.mo +0 -0
  17. lang/mailpoet-fr_FR.mo +0 -0
  18. lang/mailpoet-he_IL.mo +0 -0
  19. lang/mailpoet-hu_HU.mo +0 -0
  20. lang/mailpoet-it_IT.mo +0 -0
  21. lang/mailpoet-ja.mo +0 -0
  22. lang/mailpoet-nb_NO.mo +0 -0
  23. lang/mailpoet-nl_NL.mo +0 -0
  24. lang/mailpoet-pl_PL.mo +0 -0
  25. lang/mailpoet-pt_BR.mo +0 -0
  26. lang/mailpoet-pt_PT.mo +0 -0
  27. lang/mailpoet-ro_RO.mo +0 -0
  28. lang/mailpoet-ru_RU.mo +0 -0
  29. lang/mailpoet-sq.mo +0 -0
  30. lang/mailpoet-sr_RS.mo +0 -0
  31. lang/mailpoet-sv_SE.mo +0 -0
  32. lang/mailpoet-tr_TR.mo +0 -0
  33. lang/mailpoet-vi.mo +0 -0
  34. lang/mailpoet-zh_CN.mo +0 -0
  35. lang/mailpoet.pot +8 -168
  36. lib/AdminPages/Pages/Premium.php +5 -20
  37. lib/Cron/CronHelper.php +12 -6
  38. lib/Cron/CronTrigger.php +7 -3
  39. lib/Doctrine/Types/JsonType.php +1 -1
  40. lib/DynamicSegments/Persistence/Loading/SubscribersCount.php +15 -0
  41. lib/DynamicSegments/Persistence/Loading/SubscribersIds.php +15 -0
  42. lib/DynamicSegments/RequirementsChecker.php +48 -0
  43. lib/Features/FeaturesController.php +0 -2
  44. lib/Models/SubscribersInDynamicSegment.php +11 -1
  45. lib/Subscription/Blacklist.php +26 -7
  46. mailpoet-cron.php +10 -1
  47. mailpoet.php +2 -2
  48. readme.txt +6 -1
  49. vendor/autoload.php +1 -1
  50. vendor/composer/autoload_real.php +7 -7
  51. vendor/composer/autoload_static.php +5 -5
  52. views/premium_old.html +0 -163
assets/dist/css/{admin.0d8fba2c.css → admin.3532a6fa.css} RENAMED
@@ -1769,7 +1769,7 @@ Custom styles for MailPoet pages.
1769
 
1770
  @media screen and (max-width: 1500px) { .mailpoet-about-wrap.mailpoet-premium-page { padding: 0; } }
1771
 
1772
- .mailpoet-about-wrap.mailpoet-premium-page .button.mailpoet-button-bigger { margin: 1em 0; }
1773
 
1774
  .mailpoet-about-wrap.mailpoet-premium-page .mailpoet-premium-page-intro { display: flex; flex-direction: row; margin-bottom: 3em; }
1775
 
1769
 
1770
  @media screen and (max-width: 1500px) { .mailpoet-about-wrap.mailpoet-premium-page { padding: 0; } }
1771
 
1772
+ .mailpoet-about-wrap.mailpoet-premium-page .button.mailpoet-button-bigger { display: inline-block; line-height: normal; margin: 1em 0; }
1773
 
1774
  .mailpoet-about-wrap.mailpoet-premium-page .mailpoet-premium-page-intro { display: flex; flex-direction: row; margin-bottom: 3em; }
1775
 
assets/dist/css/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "admin.css": "admin.0d8fba2c.css",
3
  "adminGlobal.css": "adminGlobal.585d533c.css",
4
  "importExport.css": "importExport.ed6cce5e.css",
5
  "newsletterEditor.css": "newsletterEditor.35445fb8.css",
1
  {
2
+ "admin.css": "admin.3532a6fa.css",
3
  "adminGlobal.css": "adminGlobal.585d533c.css",
4
  "importExport.css": "importExport.ed6cce5e.css",
5
  "newsletterEditor.css": "newsletterEditor.35445fb8.css",
generated/FreeCachedContainer.php CHANGED
@@ -800,7 +800,7 @@ class FreeCachedContainer extends Container
800
  */
801
  protected function getPremiumService()
802
  {
803
- return $this->services['MailPoet\\AdminPages\\Pages\\Premium'] = new \MailPoet\AdminPages\Pages\Premium(${($_ = isset($this->services['MailPoet\\AdminPages\\PageRenderer']) ? $this->services['MailPoet\\AdminPages\\PageRenderer'] : $this->getPageRendererService()) && false ?: '_'}, ${($_ = isset($this->services['MailPoet\\Features\\FeaturesController']) ? $this->services['MailPoet\\Features\\FeaturesController'] : $this->getFeaturesControllerService()) && false ?: '_'});
804
  }
805
 
806
  /**
800
  */
801
  protected function getPremiumService()
802
  {
803
+ return $this->services['MailPoet\\AdminPages\\Pages\\Premium'] = new \MailPoet\AdminPages\Pages\Premium(${($_ = isset($this->services['MailPoet\\AdminPages\\PageRenderer']) ? $this->services['MailPoet\\AdminPages\\PageRenderer'] : $this->getPageRendererService()) && false ?: '_'});
804
  }
805
 
806
  /**
lang/mailpoet-ar.mo CHANGED
Binary file
lang/mailpoet-bg_BG.mo CHANGED
Binary file
lang/mailpoet-ca.mo CHANGED
Binary file
lang/mailpoet-cs_CZ.mo CHANGED
Binary file
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE-formal.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-el.mo CHANGED
Binary file
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-es_MX.mo CHANGED
Binary file
lang/mailpoet-fa_IR.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-he_IL.mo CHANGED
Binary file
lang/mailpoet-hu_HU.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nb_NO.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pl_PL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ro_RO.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-sq.mo CHANGED
Binary file
lang/mailpoet-sr_RS.mo CHANGED
Binary file
lang/mailpoet-sv_SE.mo CHANGED
Binary file
lang/mailpoet-tr_TR.mo CHANGED
Binary file
lang/mailpoet-vi.mo CHANGED
Binary file
lang/mailpoet-zh_CN.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2019-10-29 08:20:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -547,7 +547,7 @@ msgid "Manage segments"
547
  msgstr ""
548
 
549
  #: lib/Config/Capabilities.php:77 lib/Config/Menu.php:501
550
- #: lib/Config/PrivacyPolicy.php:13 views/premium_old.html:56
551
  msgid "MailPoet"
552
  msgstr ""
553
 
@@ -1525,11 +1525,11 @@ msgstr ""
1525
  msgid "Preview in a new tab"
1526
  msgstr ""
1527
 
1528
- #: lib/Cron/CronHelper.php:203
1529
  msgid "Site URL is unreachable."
1530
  msgstr ""
1531
 
1532
- #: lib/Cron/CronHelper.php:209
1533
  msgid "Maximum execution time has been reached."
1534
  msgstr ""
1535
 
@@ -2323,7 +2323,6 @@ msgstr ""
2323
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:79
2324
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:174
2325
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:218
2326
- #: views/premium_old.html:77 views/premium_old.html:78
2327
  #: views/settings/advanced.html:159 views/settings/advanced.html:270
2328
  #: views/settings/basics.html:352 views/settings/mta.html:538
2329
  #: views/settings/mta.html:592 views/settings/signup.html:48
@@ -3102,10 +3101,9 @@ msgstr ""
3102
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:251
3103
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:73
3104
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:212
3105
- #: views/premium_old.html:71 views/settings/advanced.html:147
3106
- #: views/settings/advanced.html:258 views/settings/basics.html:341
3107
- #: views/settings/mta.html:581 views/settings/signup.html:35
3108
- #: views/subscribers/importExport/import.html:106
3109
  msgid "Yes"
3110
  msgstr ""
3111
 
@@ -4116,7 +4114,6 @@ msgstr ""
4116
  #: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:184
4117
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:141
4118
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:134
4119
- #: views/premium_old.html:70
4120
  msgid "None"
4121
  msgstr ""
4122
 
@@ -5558,7 +5555,7 @@ msgstr ""
5558
  msgid "Sign Up for Free"
5559
  msgstr ""
5560
 
5561
- #: views/newsletters.html:394 views/premium_old.html:138
5562
  msgid "Purchase Now"
5563
  msgstr ""
5564
 
@@ -5616,163 +5613,6 @@ msgstr ""
5616
  msgid "Not having MailPoet branding in the footer of your emails."
5617
  msgstr ""
5618
 
5619
- #: views/premium_old.html:8
5620
- msgid "Discounts up to 50% for a limited time"
5621
- msgstr ""
5622
-
5623
- #: views/premium_old.html:9
5624
- msgid "Don’t miss out on our only sale of the year which ends on November 30."
5625
- msgstr ""
5626
-
5627
- #: views/premium_old.html:10
5628
- msgid "There’s never been a better time to change gears."
5629
- msgstr ""
5630
-
5631
- #: views/premium_old.html:16
5632
- msgid "Save up to 50%"
5633
- msgstr ""
5634
-
5635
- #: views/premium_old.html:21
5636
- msgid "What is MailPoet Premium?"
5637
- msgstr ""
5638
-
5639
- #: views/premium_old.html:23
5640
- msgid "Check out the brief video below. Or, keep reading!"
5641
- msgstr ""
5642
-
5643
- #: views/premium_old.html:35
5644
- msgid "Insightful Statistics"
5645
- msgstr ""
5646
-
5647
- #: views/premium_old.html:38
5648
- msgid ""
5649
- "Which links get the most clicks? Which subscribers opened your emails? With "
5650
- "MailPoet's stats program, it's easy to find out. Need even more details? "
5651
- "Integrating with Google Analytics is as easy as 1-2-3."
5652
- msgstr ""
5653
-
5654
- #: views/premium_old.html:48
5655
- msgid "Hello Inbox, Goodbye Spambox!"
5656
- msgstr ""
5657
-
5658
- #: views/premium_old.html:51
5659
- msgid ""
5660
- "Having issues with reaching your subscribers? Always ending up in the spam "
5661
- "box? Don't panic! You're not alone - over a quarter of our plugin users "
5662
- "have sending issues, usually because they are sending emails via their web "
5663
- "host. Instead, try using the new MailPoet Sending Service."
5664
- msgstr ""
5665
-
5666
- #: views/premium_old.html:57
5667
- msgid "Web host"
5668
- msgstr ""
5669
-
5670
- #: views/premium_old.html:58
5671
- msgid "Third party"
5672
- msgstr ""
5673
-
5674
- #: views/premium_old.html:63
5675
- msgid "Speed"
5676
- msgstr ""
5677
-
5678
- #: views/premium_old.html:64
5679
- msgid "50,000 / hour"
5680
- msgstr ""
5681
-
5682
- #: views/premium_old.html:65
5683
- msgid "300 / hour"
5684
- msgstr ""
5685
-
5686
- #: views/premium_old.html:66
5687
- msgid "2,000 / hour"
5688
- msgstr ""
5689
-
5690
- #: views/premium_old.html:69
5691
- msgid "Daily email limits"
5692
- msgstr ""
5693
-
5694
- #: views/premium_old.html:72 views/premium_old.html:84
5695
- #: views/premium_old.html:90
5696
- msgid "Depends"
5697
- msgstr ""
5698
-
5699
- #: views/premium_old.html:75
5700
- msgid "Personal deliverability support"
5701
- msgstr ""
5702
-
5703
- #: views/premium_old.html:76
5704
- msgid "Yes!"
5705
- msgstr ""
5706
-
5707
- #: views/premium_old.html:81
5708
- msgid "SPF and DKIM Signatures"
5709
- msgstr ""
5710
-
5711
- #: views/premium_old.html:82
5712
- msgid "No need!"
5713
- msgstr ""
5714
-
5715
- #: views/premium_old.html:83
5716
- msgid "Update your DNS"
5717
- msgstr ""
5718
-
5719
- #: views/premium_old.html:87
5720
- msgid "Double opt-in"
5721
- msgstr ""
5722
-
5723
- #: views/premium_old.html:88
5724
- msgid "Enforced"
5725
- msgstr ""
5726
-
5727
- #: views/premium_old.html:89
5728
- msgid "Not enforced"
5729
- msgstr ""
5730
-
5731
- #: views/premium_old.html:100
5732
- msgid "View full comparison table"
5733
- msgstr ""
5734
-
5735
- #: views/premium_old.html:107
5736
- msgid ""
5737
- "Spammers are ineligible to use the MailPoet Sending Service. We reserve the "
5738
- "right to cancel any sending plan if we detect more than 5% hard bounces. "
5739
- "[link]Customers are required to clean their lists before joining "
5740
- "MailPoet[/link]."
5741
- msgstr ""
5742
-
5743
- #: views/premium_old.html:116
5744
- msgid "We’re Here to Help!"
5745
- msgstr ""
5746
-
5747
- #: views/premium_old.html:122
5748
- msgid ""
5749
- "We pride ourselves on giving nearly round-the-clock support. Our remote "
5750
- "team spans several continents, hemispheres, and time-zones! If you’ve got a "
5751
- "problem, we will help you fix it!"
5752
- msgstr ""
5753
-
5754
- #: views/premium_old.html:127
5755
- msgid "Get Started for Just $15"
5756
- msgstr ""
5757
-
5758
- #: views/premium_old.html:130
5759
- msgid ""
5760
- "Our plans start at just $15 per month. Plus, if you pay annually, you’ll "
5761
- "get two months for free!"
5762
- msgstr ""
5763
-
5764
- #: views/premium_old.html:142
5765
- msgid "Already a Premium customer? [link]Add your Key in the Settings page[/link]."
5766
- msgstr ""
5767
-
5768
- #: views/premium_old.html:146
5769
- msgid ""
5770
- "Don’t need to use our sending service? Not a problem; we understand. You "
5771
- "can also [link]buy the Premium[/link] features separately. Prices start at "
5772
- "$149 per year for 1 website, $249 for 4 sites and $499 for an unlimited "
5773
- "number of sites."
5774
- msgstr ""
5775
-
5776
  #: views/segments.html:20
5777
  msgid "Loading lists..."
5778
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2019-11-05 09:09:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
547
  msgstr ""
548
 
549
  #: lib/Config/Capabilities.php:77 lib/Config/Menu.php:501
550
+ #: lib/Config/PrivacyPolicy.php:13
551
  msgid "MailPoet"
552
  msgstr ""
553
 
1525
  msgid "Preview in a new tab"
1526
  msgstr ""
1527
 
1528
+ #: lib/Cron/CronHelper.php:209
1529
  msgid "Site URL is unreachable."
1530
  msgstr ""
1531
 
1532
+ #: lib/Cron/CronHelper.php:215
1533
  msgid "Maximum execution time has been reached."
1534
  msgstr ""
1535
 
2323
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:79
2324
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:174
2325
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:218
 
2326
  #: views/settings/advanced.html:159 views/settings/advanced.html:270
2327
  #: views/settings/basics.html:352 views/settings/mta.html:538
2328
  #: views/settings/mta.html:592 views/settings/signup.html:48
3101
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:251
3102
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:73
3103
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:212
3104
+ #: views/settings/advanced.html:147 views/settings/advanced.html:258
3105
+ #: views/settings/basics.html:341 views/settings/mta.html:581
3106
+ #: views/settings/signup.html:35 views/subscribers/importExport/import.html:106
 
3107
  msgid "Yes"
3108
  msgstr ""
3109
 
4114
  #: views/newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs:184
4115
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:141
4116
  #: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:134
 
4117
  msgid "None"
4118
  msgstr ""
4119
 
5555
  msgid "Sign Up for Free"
5556
  msgstr ""
5557
 
5558
+ #: views/newsletters.html:394
5559
  msgid "Purchase Now"
5560
  msgstr ""
5561
 
5613
  msgid "Not having MailPoet branding in the footer of your emails."
5614
  msgstr ""
5615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5616
  #: views/segments.html:20
5617
  msgid "Loading lists..."
5618
  msgstr ""
lib/AdminPages/Pages/Premium.php CHANGED
@@ -6,35 +6,20 @@ if (!defined('ABSPATH')) exit;
6
 
7
 
8
  use MailPoet\AdminPages\PageRenderer;
9
- use MailPoet\Config\Menu;
10
- use MailPoet\Features\FeaturesController;
11
  use MailPoet\Models\Subscriber;
12
 
13
  class Premium {
14
  /** @var PageRenderer */
15
  private $page_renderer;
16
 
17
- /** @var FeaturesController */
18
- private $features_controller;
19
-
20
- function __construct(PageRenderer $page_renderer, FeaturesController $features_controller) {
21
  $this->page_renderer = $page_renderer;
22
- $this->features_controller = $features_controller;
23
  }
24
 
25
  function render() {
26
- if ($this->features_controller->isSupported(FeaturesController::NEW_PREMIUM_PAGE)) {
27
- $data = [
28
- 'subscriber_count' => Subscriber::getTotalSubscribers(),
29
- ];
30
- $this->page_renderer->displayPage('premium.html', $data);
31
- } else {
32
- $data = [
33
- 'subscriber_count' => Subscriber::getTotalSubscribers(),
34
- 'sub_menu' => Menu::MAIN_PAGE_SLUG,
35
- 'display_discount' => time() <= strtotime('2018-11-30 23:59:59'),
36
- ];
37
- $this->page_renderer->displayPage('premium_old.html', $data);
38
- }
39
  }
40
  }
6
 
7
 
8
  use MailPoet\AdminPages\PageRenderer;
 
 
9
  use MailPoet\Models\Subscriber;
10
 
11
  class Premium {
12
  /** @var PageRenderer */
13
  private $page_renderer;
14
 
15
+ function __construct(PageRenderer $page_renderer) {
 
 
 
16
  $this->page_renderer = $page_renderer;
 
17
  }
18
 
19
  function render() {
20
+ $data = [
21
+ 'subscriber_count' => Subscriber::getTotalSubscribers(),
22
+ ];
23
+ $this->page_renderer->displayPage('premium.html', $data);
 
 
 
 
 
 
 
 
 
24
  }
25
  }
lib/Cron/CronHelper.php CHANGED
@@ -97,13 +97,17 @@ class CronHelper {
97
  return Security::generateRandomString();
98
  }
99
 
100
- static function pingDaemon() {
 
 
 
101
  $url = self::getCronUrl(
102
- CronDaemonEndpoint::ACTION_PING_RESPONSE
 
 
103
  );
104
  $result = self::queryCronUrl($url);
105
  if (is_wp_error($result)) return $result->get_error_message();
106
- $wp = new WPFunctions();
107
  $response = $wp->wpRemoteRetrieveBody($result);
108
  $response = substr(trim($response), -strlen(DaemonHttpRunner::PING_SUCCESS_RESPONSE)) === DaemonHttpRunner::PING_SUCCESS_RESPONSE ?
109
  DaemonHttpRunner::PING_SUCCESS_RESPONSE :
@@ -115,7 +119,10 @@ class CronHelper {
115
  return $response === DaemonHttpRunner::PING_SUCCESS_RESPONSE;
116
  }
117
 
118
- static function accessDaemon($token) {
 
 
 
119
  $data = ['token' => $token];
120
  $url = self::getCronUrl(
121
  CronDaemonEndpoint::ACTION_RUN,
@@ -127,8 +134,7 @@ class CronHelper {
127
  }
128
  $daemon['run_accessed_at'] = time();
129
  self::saveDaemon($daemon);
130
- $result = self::queryCronUrl($url);
131
- $wp = new WPFunctions();
132
  return $wp->wpRemoteRetrieveBody($result);
133
  }
134
 
97
  return Security::generateRandomString();
98
  }
99
 
100
+ static function pingDaemon($wp = null) {
101
+ if (is_null($wp)) {
102
+ $wp = new WPFunctions();
103
+ }
104
  $url = self::getCronUrl(
105
+ CronDaemonEndpoint::ACTION_PING_RESPONSE,
106
+ false,
107
+ $wp
108
  );
109
  $result = self::queryCronUrl($url);
110
  if (is_wp_error($result)) return $result->get_error_message();
 
111
  $response = $wp->wpRemoteRetrieveBody($result);
112
  $response = substr(trim($response), -strlen(DaemonHttpRunner::PING_SUCCESS_RESPONSE)) === DaemonHttpRunner::PING_SUCCESS_RESPONSE ?
113
  DaemonHttpRunner::PING_SUCCESS_RESPONSE :
119
  return $response === DaemonHttpRunner::PING_SUCCESS_RESPONSE;
120
  }
121
 
122
+ static function accessDaemon($token, $wp = null) {
123
+ if (is_null($wp)) {
124
+ $wp = new WPFunctions();
125
+ }
126
  $data = ['token' => $token];
127
  $url = self::getCronUrl(
128
  CronDaemonEndpoint::ACTION_RUN,
134
  }
135
  $daemon['run_accessed_at'] = time();
136
  self::saveDaemon($daemon);
137
+ $result = self::queryCronUrl($url, $wp);
 
138
  return $wp->wpRemoteRetrieveBody($result);
139
  }
140
 
lib/Cron/CronTrigger.php CHANGED
@@ -11,10 +11,14 @@ class CronTrigger {
11
  /** @var SettingsController */
12
  private $settings;
13
 
 
 
 
 
14
  public static $available_methods = [
15
- 'mailpoet' => 'MailPoet',
16
- 'wordpress' => 'WordPress',
17
- 'linux_cron' => 'Linux Cron',
18
  'none' => 'Disabled',
19
  ];
20
  const DEFAULT_METHOD = 'WordPress';
11
  /** @var SettingsController */
12
  private $settings;
13
 
14
+ const METHOD_LINUX_CRON = 'Linux Cron';
15
+ const METHOD_MAILPOET = 'MailPoet';
16
+ const METHOD_WORDPRESS = 'WordPress';
17
+
18
  public static $available_methods = [
19
+ 'mailpoet' => self::METHOD_MAILPOET,
20
+ 'wordpress' => self::METHOD_WORDPRESS,
21
+ 'linux_cron' => self::METHOD_LINUX_CRON,
22
  'none' => 'Disabled',
23
  ];
24
  const DEFAULT_METHOD = 'WordPress';
lib/Doctrine/Types/JsonType.php CHANGED
@@ -31,7 +31,7 @@ class JsonType extends Type {
31
  }
32
 
33
  function convertToPHPValue($value, AbstractPlatform $platform) {
34
- if ($value === null) {
35
  return null;
36
  }
37
 
31
  }
32
 
33
  function convertToPHPValue($value, AbstractPlatform $platform) {
34
+ if ($value === null || $value === '') {
35
  return null;
36
  }
37
 
lib/DynamicSegments/Persistence/Loading/SubscribersCount.php CHANGED
@@ -5,11 +5,23 @@ namespace MailPoet\DynamicSegments\Persistence\Loading;
5
  if (!defined('ABSPATH')) exit;
6
 
7
 
 
8
  use MailPoet\Models\DynamicSegment;
9
  use MailPoet\Models\Subscriber;
 
10
 
11
  class SubscribersCount {
12
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * @param DynamicSegment $dynamic_segment
15
  *
@@ -17,6 +29,9 @@ class SubscribersCount {
17
  */
18
  function getSubscribersCount(DynamicSegment $dynamic_segment) {
19
  $orm = Subscriber::selectExpr('count(distinct ' . Subscriber::$_table . '.id) as cnt');
 
 
 
20
  foreach ($dynamic_segment->getFilters() as $filter) {
21
  $orm = $filter->toSql($orm);
22
  }
5
  if (!defined('ABSPATH')) exit;
6
 
7
 
8
+ use MailPoet\DynamicSegments\RequirementsChecker;
9
  use MailPoet\Models\DynamicSegment;
10
  use MailPoet\Models\Subscriber;
11
+ use MailPoet\WooCommerce\Helper as WooCommerceHelper;
12
 
13
  class SubscribersCount {
14
 
15
+ /** @var RequirementsChecker */
16
+ private $requirements_checker;
17
+
18
+ function __construct(RequirementsChecker $requirements_checker = null) {
19
+ if (!$requirements_checker) {
20
+ $requirements_checker = new RequirementsChecker(new WooCommerceHelper());
21
+ }
22
+ $this->requirements_checker = $requirements_checker;
23
+ }
24
+
25
  /**
26
  * @param DynamicSegment $dynamic_segment
27
  *
29
  */
30
  function getSubscribersCount(DynamicSegment $dynamic_segment) {
31
  $orm = Subscriber::selectExpr('count(distinct ' . Subscriber::$_table . '.id) as cnt');
32
+ if ($this->requirements_checker->shouldSkipSegment($dynamic_segment)) {
33
+ return 0;
34
+ }
35
  foreach ($dynamic_segment->getFilters() as $filter) {
36
  $orm = $filter->toSql($orm);
37
  }
lib/DynamicSegments/Persistence/Loading/SubscribersIds.php CHANGED
@@ -5,11 +5,23 @@ namespace MailPoet\DynamicSegments\Persistence\Loading;
5
  if (!defined('ABSPATH')) exit;
6
 
7
 
 
8
  use MailPoet\Models\DynamicSegment;
9
  use MailPoet\Models\Subscriber;
 
10
 
11
  class SubscribersIds {
12
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * Finds subscribers in a dynamic segment and returns their ids.
15
  *
@@ -20,6 +32,9 @@ class SubscribersIds {
20
  */
21
  function load(DynamicSegment $dynamic_segment, $limit_to_subscribers_ids = null) {
22
  $orm = Subscriber::selectExpr(Subscriber::$_table . '.id');
 
 
 
23
  foreach ($dynamic_segment->getFilters() as $filter) {
24
  $orm = $filter->toSql($orm);
25
  }
5
  if (!defined('ABSPATH')) exit;
6
 
7
 
8
+ use MailPoet\DynamicSegments\RequirementsChecker;
9
  use MailPoet\Models\DynamicSegment;
10
  use MailPoet\Models\Subscriber;
11
+ use MailPoet\WooCommerce\Helper as WooCommerceHelper;
12
 
13
  class SubscribersIds {
14
 
15
+ /** @var RequirementsChecker */
16
+ private $requirements_checker;
17
+
18
+ function __construct(RequirementsChecker $requirements_checker = null) {
19
+ if (!$requirements_checker) {
20
+ $requirements_checker = new RequirementsChecker(new WooCommerceHelper());
21
+ }
22
+ $this->requirements_checker = $requirements_checker;
23
+ }
24
+
25
  /**
26
  * Finds subscribers in a dynamic segment and returns their ids.
27
  *
32
  */
33
  function load(DynamicSegment $dynamic_segment, $limit_to_subscribers_ids = null) {
34
  $orm = Subscriber::selectExpr(Subscriber::$_table . '.id');
35
+ if ($this->requirements_checker->shouldSkipSegment($dynamic_segment)) {
36
+ return [];
37
+ }
38
  foreach ($dynamic_segment->getFilters() as $filter) {
39
  $orm = $filter->toSql($orm);
40
  }
lib/DynamicSegments/RequirementsChecker.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace MailPoet\DynamicSegments;
4
+
5
+ if (!defined('ABSPATH')) exit;
6
+
7
+
8
+ use MailPoet\DynamicSegments\Filters\Filter;
9
+ use MailPoet\Models\DynamicSegment;
10
+ use MailPoet\WooCommerce\Helper;
11
+
12
+ class RequirementsChecker {
13
+
14
+ /** @var Helper */
15
+ private $woocommerce_helper;
16
+
17
+ function __construct(Helper $woocommerce_helper = null) {
18
+ if (!$woocommerce_helper) {
19
+ $woocommerce_helper = new Helper();
20
+ }
21
+ $this->woocommerce_helper = $woocommerce_helper;
22
+ }
23
+
24
+ function shouldSkipSegment(DynamicSegment $segment) {
25
+ foreach ($segment->getFilters() as $filter) {
26
+ if ($this->shouldSkipFilter($filter)) {
27
+ return true;
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+
33
+ private function shouldSkipFilter(Filter $filter) {
34
+ if ($this->woocommerce_helper->isWooCommerceActive()) {
35
+ return false;
36
+ }
37
+
38
+ $class_name = get_class($filter);
39
+ $ref = new \ReflectionClass($class_name);
40
+ $constants = $ref->getConstants();
41
+ if (!array_key_exists('SEGMENT_TYPE', $constants)) {
42
+ return true;
43
+ }
44
+
45
+ return $constants['SEGMENT_TYPE'] === 'woocommerce';
46
+ }
47
+
48
+ }
lib/Features/FeaturesController.php CHANGED
@@ -13,7 +13,6 @@ class FeaturesController {
13
  // const FEATURE_NAME_OF_FEATURE = 'name-of-feature';
14
  const NEW_DEFAULT_LIST_NAME = 'new-default-list-name';
15
  const SEND_WORDPRESS_MAILS_WITH_MP3 = 'send-wordpress-mails-with-mp3';
16
- const NEW_PREMIUM_PAGE = 'new-premium-page';
17
  const WC_TRANSACTIONAL_EMAILS_CUSTOMIZER = 'wc-transactional-emails-customizer';
18
  const DISPLAY_MSS_PITCH = 'display-mss-pitch';
19
 
@@ -22,7 +21,6 @@ class FeaturesController {
22
  private $defaults = [
23
  self::NEW_DEFAULT_LIST_NAME => false,
24
  self::SEND_WORDPRESS_MAILS_WITH_MP3 => false,
25
- self::NEW_PREMIUM_PAGE => false,
26
  self::WC_TRANSACTIONAL_EMAILS_CUSTOMIZER => false,
27
  self::DISPLAY_MSS_PITCH => false,
28
  ];
13
  // const FEATURE_NAME_OF_FEATURE = 'name-of-feature';
14
  const NEW_DEFAULT_LIST_NAME = 'new-default-list-name';
15
  const SEND_WORDPRESS_MAILS_WITH_MP3 = 'send-wordpress-mails-with-mp3';
 
16
  const WC_TRANSACTIONAL_EMAILS_CUSTOMIZER = 'wc-transactional-emails-customizer';
17
  const DISPLAY_MSS_PITCH = 'display-mss-pitch';
18
 
21
  private $defaults = [
22
  self::NEW_DEFAULT_LIST_NAME => false,
23
  self::SEND_WORDPRESS_MAILS_WITH_MP3 => false,
 
24
  self::WC_TRANSACTIONAL_EMAILS_CUSTOMIZER => false,
25
  self::DISPLAY_MSS_PITCH => false,
26
  ];
lib/Models/SubscribersInDynamicSegment.php CHANGED
@@ -7,7 +7,8 @@ if (!defined('ABSPATH')) exit;
7
 
8
  use MailPoet\DynamicSegments\Mappers\DBMapper;
9
  use MailPoet\DynamicSegments\Persistence\Loading\SingleSegmentLoader;
10
- use MailPoet\Models\Subscriber;
 
11
 
12
  class SubscribersInDynamicSegment extends Subscriber {
13
 
@@ -15,6 +16,9 @@ class SubscribersInDynamicSegment extends Subscriber {
15
  $query = self::select(self::$_table . '.*');
16
  $single_segment_loader = new SingleSegmentLoader(new DBMapper());
17
  $dynamic_segment = $single_segment_loader->load($data['filter']['segment']);
 
 
 
18
  foreach ($dynamic_segment->getFilters() as $filter) {
19
  $query = $filter->toSql($query);
20
  }
@@ -27,4 +31,10 @@ class SubscribersInDynamicSegment extends Subscriber {
27
  return $query;
28
  }
29
 
 
 
 
 
 
 
30
  }
7
 
8
  use MailPoet\DynamicSegments\Mappers\DBMapper;
9
  use MailPoet\DynamicSegments\Persistence\Loading\SingleSegmentLoader;
10
+ use MailPoet\DynamicSegments\RequirementsChecker;
11
+ use MailPoet\WooCommerce\Helper as WooCommerceHelper;
12
 
13
  class SubscribersInDynamicSegment extends Subscriber {
14
 
16
  $query = self::select(self::$_table . '.*');
17
  $single_segment_loader = new SingleSegmentLoader(new DBMapper());
18
  $dynamic_segment = $single_segment_loader->load($data['filter']['segment']);
19
+ if (self::shouldSkip($dynamic_segment)) {
20
+ return $query->whereRaw('0=1');
21
+ }
22
  foreach ($dynamic_segment->getFilters() as $filter) {
23
  $query = $filter->toSql($query);
24
  }
31
  return $query;
32
  }
33
 
34
+ private static function shouldSkip($dynamic_segment) {
35
+ $requirements_checker = new RequirementsChecker(new WooCommerceHelper());
36
+ return $requirements_checker->shouldSkipSegment($dynamic_segment);
37
+ }
38
+
39
+
40
  }
lib/Subscription/Blacklist.php CHANGED
@@ -8,22 +8,41 @@ if (!defined('ABSPATH')) exit;
8
  class Blacklist {
9
  const SALT = 'mailpoet';
10
 
11
- private $blacklist = [
12
  'e60c6e0e73997c92d4ceac78a6b6cbbe6249244c4106a3c31de421fc50370ecd' => 1,
 
 
13
  ];
14
 
15
- public function __construct(array $blacklist = null) {
16
- if ($blacklist) {
17
- $this->blacklist = array_fill_keys(array_map([$this, 'hash'], $blacklist), 1);
 
 
 
 
 
 
 
 
 
 
 
18
  }
19
  }
20
 
21
  public function isBlacklisted($email) {
22
  $hashed_email = $this->hash($email);
23
- return isset($this->blacklist[$hashed_email]);
 
 
 
 
 
 
24
  }
25
 
26
- private function hash($email) {
27
- return hash('sha256', $email . self::SALT);
28
  }
29
  }
8
  class Blacklist {
9
  const SALT = 'mailpoet';
10
 
11
+ private $blacklistedEmails = [
12
  'e60c6e0e73997c92d4ceac78a6b6cbbe6249244c4106a3c31de421fc50370ecd' => 1,
13
+ '4a7fb8fba0a800ad5cf324704d3510d019586765aef6d5081fa5aed3f93d9dce' => 1,
14
+ '7151c278028263ace958b66616e69a438f23e5058a5df42ed734e9e6704f8332' => 1,
15
  ];
16
 
17
+ private $blacklistedDomains = [
18
+ '2ea570cf0c440b2ec7d6e1335108625a5f62162b2116a25c9c909dc5b54c213f' => 1,
19
+ '1e10eb32b615217baa4d8f54191891e107851a2057d1128f067f1df096896e45' => 1,
20
+ 'dc2bfb04e38d3c25c8a465a5fed841a1cb1685044d12241efe01f0fc044f2182' => 1,
21
+ 'f17c13fe5a1d8cd2e78a04528377cc607881ad12b6295b6fa8b6a789d1d04c10' => 1,
22
+ '813cbef72da3542e783470ecd62589bceb3883d15ab2435ec2486f9762602b8c' => 1,
23
+ ];
24
+
25
+ public function __construct(array $blacklistedEmails = null, array $blacklistedDomains = null) {
26
+ if ($blacklistedEmails) {
27
+ $this->blacklistedEmails = array_fill_keys(array_map([$this, 'hash'], $blacklistedEmails), 1);
28
+ }
29
+ if ($blacklistedDomains) {
30
+ $this->blacklistedDomains = array_fill_keys(array_map([$this, 'hash'], $blacklistedDomains), 1);
31
  }
32
  }
33
 
34
  public function isBlacklisted($email) {
35
  $hashed_email = $this->hash($email);
36
+ if (isset($this->blacklistedEmails[$hashed_email])) {
37
+ return true;
38
+ }
39
+ $email_parts = explode('@', $email);
40
+ $domain = end($email_parts);
41
+ $hashed_domain = $this->hash($domain);
42
+ return isset($this->blacklistedDomains[$hashed_domain]);
43
  }
44
 
45
+ private function hash($key) {
46
+ return hash('sha256', $key . self::SALT);
47
  }
48
  }
mailpoet-cron.php CHANGED
@@ -34,7 +34,16 @@ if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
34
  set_time_limit(0);
35
  }
36
 
37
- $data = \MailPoet\Cron\CronHelper::createDaemon(null);
38
  $container = \MailPoet\DI\ContainerWrapper::getInstance(WP_DEBUG);
 
 
 
 
 
 
 
 
 
 
39
  $trigger = $container->get(\MailPoet\Cron\Daemon::class);
40
  $trigger->run($data);
34
  set_time_limit(0);
35
  }
36
 
 
37
  $container = \MailPoet\DI\ContainerWrapper::getInstance(WP_DEBUG);
38
+
39
+ // Check if Linux Cron method is set in plugin settings
40
+ $settings = $container->get(\MailPoet\Settings\SettingsController::class);
41
+ if ($settings->get('cron_trigger.method') !== \MailPoet\Cron\CronTrigger::METHOD_LINUX_CRON) {
42
+ echo 'MailPoet is not configured to run with Linux Cron.';
43
+ exit(1);
44
+ }
45
+
46
+ // Run Cron Daemon
47
+ $data = \MailPoet\Cron\CronHelper::createDaemon(null);
48
  $trigger = $container->get(\MailPoet\Cron\Daemon::class);
49
  $trigger->run($data);
mailpoet.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
 
6
  /*
7
  * Plugin Name: MailPoet 3 (New)
8
- * Version: 3.39.0
9
  * Plugin URI: http://www.mailpoet.com
10
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
11
  * Author: MailPoet
@@ -19,7 +19,7 @@ if (!defined('ABSPATH')) exit;
19
  */
20
 
21
  $mailpoet_plugin = [
22
- 'version' => '3.39.0',
23
  'filename' => __FILE__,
24
  'path' => dirname(__FILE__),
25
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
5
 
6
  /*
7
  * Plugin Name: MailPoet 3 (New)
8
+ * Version: 3.39.1
9
  * Plugin URI: http://www.mailpoet.com
10
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
11
  * Author: MailPoet
19
  */
20
 
21
  $mailpoet_plugin = [
22
+ 'version' => '3.39.1',
23
  'filename' => __FILE__,
24
  'path' => dirname(__FILE__),
25
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
3
  Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
- Stable tag: 3.39.0
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -159,6 +159,11 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
162
  = 3.39.0 - 2019-10-29 =
163
  * Added: Google Analytics tracking is now in free;
164
  * Fixed: WooCommerce email options not saving;
3
  Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
+ Stable tag: 3.39.1
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
159
 
160
  == Changelog ==
161
 
162
+ = 3.39.1 - 2019-11-05 =
163
+ * Added: new premium page in the MailPoet admin;
164
+ * Fixed: Linux cron now only runs when set as the task scheduler method;
165
+ * Fixed: WooCommerce segments are now skipped when WooCommerce is not active.
166
+
167
  = 3.39.0 - 2019-10-29 =
168
  * Added: Google Analytics tracking is now in free;
169
  * Fixed: WooCommerce email options not saving;
vendor/autoload.php CHANGED
@@ -7,4 +7,4 @@ if (!defined('ABSPATH')) exit;
7
 
8
  require_once __DIR__ . '/composer/autoload_real.php';
9
 
10
- return ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040::getLoader();
7
 
8
  require_once __DIR__ . '/composer/autoload_real.php';
9
 
10
+ return ComposerAutoloaderInit2c1701bfe1c27585977bf05557ed3beb::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
 
6
  // autoload_real.php @generated by Composer
7
 
8
- class ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040
9
  {
10
  private static $loader;
11
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit46996ead08a2467e5f6600bc217c6040::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit46996ead08a2467e5f6600bc217c6040
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit46996ead08a2467e5f6600bc217c6040::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire46996ead08a2467e5f6600bc217c6040($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire46996ead08a2467e5f6600bc217c6040($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
5
 
6
  // autoload_real.php @generated by Composer
7
 
8
+ class ComposerAutoloaderInit2c1701bfe1c27585977bf05557ed3beb
9
  {
10
  private static $loader;
11
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit2c1701bfe1c27585977bf05557ed3beb', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit2c1701bfe1c27585977bf05557ed3beb', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire2c1701bfe1c27585977bf05557ed3beb($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire2c1701bfe1c27585977bf05557ed3beb($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -7,7 +7,7 @@ namespace Composer\Autoload;
7
  if (!defined('ABSPATH')) exit;
8
 
9
 
10
- class ComposerStaticInit46996ead08a2467e5f6600bc217c6040
11
  {
12
  public static $files = array (
13
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -1661,10 +1661,10 @@ class ComposerStaticInit46996ead08a2467e5f6600bc217c6040
1661
  public static function getInitializer(ClassLoader $loader)
1662
  {
1663
  return \Closure::bind(function () use ($loader) {
1664
- $loader->prefixLengthsPsr4 = ComposerStaticInit46996ead08a2467e5f6600bc217c6040::$prefixLengthsPsr4;
1665
- $loader->prefixDirsPsr4 = ComposerStaticInit46996ead08a2467e5f6600bc217c6040::$prefixDirsPsr4;
1666
- $loader->fallbackDirsPsr4 = ComposerStaticInit46996ead08a2467e5f6600bc217c6040::$fallbackDirsPsr4;
1667
- $loader->classMap = ComposerStaticInit46996ead08a2467e5f6600bc217c6040::$classMap;
1668
 
1669
  }, null, ClassLoader::class);
1670
  }
7
  if (!defined('ABSPATH')) exit;
8
 
9
 
10
+ class ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb
11
  {
12
  public static $files = array (
13
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
1661
  public static function getInitializer(ClassLoader $loader)
1662
  {
1663
  return \Closure::bind(function () use ($loader) {
1664
+ $loader->prefixLengthsPsr4 = ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::$prefixLengthsPsr4;
1665
+ $loader->prefixDirsPsr4 = ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::$prefixDirsPsr4;
1666
+ $loader->fallbackDirsPsr4 = ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::$fallbackDirsPsr4;
1667
+ $loader->classMap = ComposerStaticInit2c1701bfe1c27585977bf05557ed3beb::$classMap;
1668
 
1669
  }, null, ClassLoader::class);
1670
  }
views/premium_old.html DELETED
@@ -1,163 +0,0 @@
1
- <% extends 'layout.html' %>
2
-
3
- <% block content %>
4
- <div class="wrap mailpoet-about-wrap">
5
-
6
- <% if display_discount %>
7
- <div class="mailpoet-discount-container">
8
- <h1><%= __('Discounts up to 50% for a limited time') %></h1>
9
- <p><%= __('Don’t miss out on our only sale of the year which ends on November 30.') %></p>
10
- <p><%= __('There’s never been a better time to change gears.') %></p>
11
- <a
12
- href="<%= add_referral_id('https://account.mailpoet.com/?s=' ~ subscriber_count ~ '&utm_source=plugin&utm_medium=premium&utm_campaign=discount') %>"
13
- class="button button-primary"
14
- style="font-size: 1.5em; padding: 10px 18px; height: 46px;"
15
- >
16
- <%= __('Save up to 50%') %>
17
- </a>
18
- </div>
19
- <% endif %>
20
-
21
- <h1 style="text-align: center; margin-right: 0;"><%= __('What is MailPoet Premium?') %></h1>
22
-
23
- <p class="about-text" style="text-align: center; margin-right: 0;"><%= __("Check out the brief video below. Or, keep reading!") %></p>
24
-
25
- <hr>
26
-
27
- <div class="headline-feature feature-video">
28
- <div class="videoWrapper">
29
- <iframe src="https://player.vimeo.com/video/225337083" width="1050" height="591" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
30
- </div>
31
- </div>
32
-
33
- <hr>
34
-
35
- <h2><%= __("Insightful Statistics") %></h2>
36
-
37
- <div class="feature-section one-col">
38
- <p class="lead-description"><%= __("Which links get the most clicks? Which subscribers opened your emails? With MailPoet's stats program, it's easy to find out. Need even more details? Integrating with Google Analytics is as easy as 1-2-3.") %></p>
39
- <% set video_url = cdn_url('premium/premium-page-animated-stats.mp4') %>
40
- <video autoplay loop width="100%" class="mailpoet_video">
41
- <source type="video/mp4" src="<%= video_url %>" />
42
- <a href="<%= video_url %>"><%= video_url %></a>
43
- </video>
44
- </div>
45
-
46
- <hr>
47
-
48
- <h2><%= __("Hello Inbox, Goodbye Spambox!") %></h2>
49
-
50
- <div class="feature-section one-col">
51
- <p class="lead-description"><%= __("Having issues with reaching your subscribers? Always ending up in the spam box? Don't panic! You're not alone - over a quarter of our plugin users have sending issues, usually because they are sending emails via their web host. Instead, try using the new MailPoet Sending Service.") %></p>
52
- <table class="widefat">
53
- <thead>
54
- <tr>
55
- <td></td>
56
- <td><strong><%= __("MailPoet") %></strong></td>
57
- <td><strong><%= __("Web host") %></strong></td>
58
- <td><strong><%= __("Third party") %></strong></td>
59
- </tr>
60
- </thead>
61
- <tbody>
62
- <tr class="alternate">
63
- <td><strong><%= __("Speed") %></strong></td>
64
- <td><%= __("50,000 / hour") %></td>
65
- <td><%= __("300 / hour") %></td>
66
- <td><%= __("2,000 / hour") %></td>
67
- </tr>
68
- <tr>
69
- <td><strong><%= __("Daily email limits") %></strong></td>
70
- <td><%= __("None") %></td>
71
- <td><%= __("Yes") %></td>
72
- <td><%= __("Depends") %></td>
73
- </tr>
74
- <tr class="alternate">
75
- <td><strong><%= __("Personal deliverability support") %></strong></td>
76
- <td><%= __("Yes!") %></td>
77
- <td><%= __("No") %></td>
78
- <td><%= __("No") %></td>
79
- </tr>
80
- <tr>
81
- <td><strong><%= __("SPF and DKIM Signatures") %></strong></td>
82
- <td><%= __("No need!") %></td>
83
- <td><%= __("Update your DNS") %></td>
84
- <td><%= __("Depends") %></td>
85
- </tr>
86
- <tr class="alternate">
87
- <td><strong><%= __("Double opt-in") %></strong></td>
88
- <td><%= __("Enforced") %></td>
89
- <td><%= __("Not enforced") %></td>
90
- <td><%= __("Depends") %></td>
91
- </tr>
92
- <tr>
93
- <td colspan="4">
94
- <div style="text-align: center">
95
- <a
96
- href="https://kb.mailpoet.com/article/181-comparison-table-of-sending-methods?utm_source=plugin&utm_medium=premium&utm_campaign=compare"
97
- data-beacon-article="58a7182a2c7d3a576d3548c5"
98
- target="_blank"
99
- >
100
- <%= __("View full comparison table") %>
101
- </a>
102
- </div>
103
- </td>
104
- </tr>
105
- </tbody>
106
- </table>
107
- <p><%= __("Spammers are ineligible to use the MailPoet Sending Service. We reserve the right to cancel any sending plan if we detect more than 5% hard bounces. [link]Customers are required to clean their lists before joining MailPoet[/link].")
108
- |replaceLinkTags('https://kb.mailpoet.com/article/127-checklist-before-importing-subscribers?utm_source=plugin&utm_medium=premium&utm_campaign=clean-lists', {'target': '_blank', 'data-beacon-article': '57ce07ffc6979108399a044b'})
109
- |raw
110
- %></p>
111
- </div>
112
-
113
- <hr>
114
-
115
- <div class="feature-section">
116
- <h2><%= __("We’re Here to Help!") %></h2>
117
- <% set video_url = cdn_url('premium/premium-page-animated-support.mp4') %>
118
- <video autoplay loop width="100%" class="mailpoet_video half-width-centered">
119
- <source type="video/mp4" src="<%= video_url %>" />
120
- <a href="<%= video_url %>"><%= video_url %></a>
121
- </video>
122
- <p><%= __("We pride ourselves on giving nearly round-the-clock support. Our remote team spans several continents, hemispheres, and time-zones! If you’ve got a problem, we will help you fix it!") %></p>
123
- </div>
124
-
125
- <hr>
126
-
127
- <h2><%= __("Get Started for Just $15") %></h2>
128
-
129
- <div class="feature-section one-col">
130
- <p class="lead-description"><%= __("Our plans start at just $15 per month. Plus, if you pay annually, you’ll get two months for free!") %></p>
131
- <br>
132
- <p style="text-align: center">
133
- <a
134
- target="_blank"
135
- href="<%= add_referral_id('https://account.mailpoet.com?s=' ~ subscriber_count ~ '&utm_source=plugin&utm_medium=premium&utm_campaign=purchase') %>"
136
- class="button button-primary"
137
- style="font-size: 1.5em; padding: 10px 18px; height: 46px;"
138
- ><%= __("Purchase Now") %></a>
139
- </p>
140
- <br>
141
- <div style="width: 65%; margin: 0 auto;">
142
- <p style="text-align: center"><%= __("Already a Premium customer? [link]Add your Key in the Settings page[/link].")
143
- |replaceLinkTags(admin_url('admin.php?page=mailpoet-settings#premium'), {'target': '_blank'})
144
- |raw
145
- %></p>
146
- <p style="text-align: center"><%= __("Don’t need to use our sending service? Not a problem; we understand. You can also [link]buy the Premium[/link] features separately. Prices start at $149 per year for 1 website, $249 for 4 sites and $499 for an unlimited number of sites.")
147
- |replaceLinkTags(add_referral_id('https://account.mailpoet.com/premium?utm_source=plugin&utm_medium=premium&utm_campaign=buy-premium'), {'target': '_blank'})
148
- |raw
149
- %></p>
150
- </div>
151
- </div>
152
-
153
- </div>
154
-
155
- <% endblock %>
156
-
157
- <% block after_javascript %>
158
- <script type="text/javascript">
159
- MailPoet.trackEvent('Premium page viewed', {
160
- 'MailPoet Free version': window.mailpoet_version
161
- });
162
- </script>
163
- <% endblock %>