Version Description
- 2022-08-01 =
- Removed: premium license checks;
- Removed: 2000 subscribers limit;
- Added: cron configuration info page.
Download this release
Release Info
Developer | MailPoet |
Plugin | MailPoet Newsletters (Previous) |
Version | 2.22 |
Comparing to | |
See all releases |
Code changes from version 2.21 to 2.22
- controllers/ajax/config.php +0 -12
- controllers/back.php +3 -36
- controllers/back/campaigns.php +1 -28
- controllers/back/cron_info.php +24 -0
- core/base.php +5 -11
- helpers/back.php +3 -3
- helpers/licence.php +3 -159
- img/cron_info/control_panel.jpeg +0 -0
- img/cron_info/cp_cron_settings.jpeg +0 -0
- img/cron_info/cron_check.png +0 -0
- img/cron_info/cron_url.png +0 -0
- img/cron_info/free_users_settings.png +0 -0
- index.php +1 -1
- js/admin-wysija.js +1 -1
- models/config.php +0 -7
- readme.txt +8 -95
- views/back/campaigns.php +1 -4
- views/back/config.php +4 -13
- views/back/cron_info.php +76 -0
controllers/ajax/config.php
CHANGED
@@ -162,18 +162,6 @@ class WYSIJA_control_back_config extends WYSIJA_control{
|
|
162 |
return $res;
|
163 |
}
|
164 |
|
165 |
-
function validate(){
|
166 |
-
$this->requireSecurity();
|
167 |
-
$helper_licence = WYSIJA::get('licence','helper');
|
168 |
-
$result = $helper_licence->check();
|
169 |
-
|
170 |
-
if(!isset($result['result'])){
|
171 |
-
$result['result']=false;
|
172 |
-
}
|
173 |
-
|
174 |
-
return $result;
|
175 |
-
}
|
176 |
-
|
177 |
function _convertPostedInarray(){
|
178 |
$_POST = stripslashes_deep($_POST);
|
179 |
$data_temp = $_POST['data'];
|
162 |
return $res;
|
163 |
}
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
function _convertPostedInarray(){
|
166 |
$_POST = stripslashes_deep($_POST);
|
167 |
$data_temp = $_POST['data'];
|
controllers/back.php
CHANGED
@@ -88,21 +88,9 @@ class WYSIJA_control_back extends WYSIJA_control{
|
|
88 |
function variousCheck(){
|
89 |
$model_config = WYSIJA::get('config','model');
|
90 |
|
91 |
-
if(get_option('wysicheck')){
|
92 |
-
$helper_licence = WYSIJA::get('licence','helper');
|
93 |
-
$result = $helper_licence->check(true);
|
94 |
-
if($result['nocontact']){
|
95 |
-
// redirect instantly to a page with a javascript file where we check the domain is ok
|
96 |
-
$data = get_option('wysijey');
|
97 |
-
// remotely connect to host
|
98 |
-
wp_enqueue_script('wysija-verif-licence', 'http://www.mailpoet.com/?wysijap=checkout&wysijashop-page=1&controller=customer&action=checkDomain&js=1&data='.$data, array( 'jquery' ), time());
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
if (!get_option("wysija_dismiss_sunset_notice") && !$this->_notice_displayed) {
|
103 |
-
$notice = __("
|
104 |
-
$notice = str_replace(['[link1]', '[/link1]'], ['<a href="https://
|
105 |
-
$notice = str_replace(['[link2]', '[/link2]'], ['<a href="https://wordpress.org/plugins/mailpoet/" target="_blank">', '</a>'], $notice);
|
106 |
$notice .= '<br><br>' . str_replace( ['[link]', '[/link]'], ['<a href="javascript:;" class="wysija_dismiss_sunset_notice">', '</a>'], __("[link]Dismiss[/link] this notice."));
|
107 |
(new WYSIJA_object())->error($notice, true);
|
108 |
$this->_notice_displayed = true; // The method is called more than once so this is here to prevent multiple display
|
@@ -343,28 +331,7 @@ class WYSIJA_control_back extends WYSIJA_control{
|
|
343 |
|
344 |
|
345 |
function _checkTotalSubscribers(){
|
346 |
-
|
347 |
-
$config=WYSIJA::get('config','model');
|
348 |
-
$totalSubscribers=$config->getValue('total_subscribers');
|
349 |
-
$helper_licence = WYSIJA::get('licence','helper');
|
350 |
-
|
351 |
-
if((int)$totalSubscribers>1900){
|
352 |
-
if((int)$totalSubscribers>2000){
|
353 |
-
|
354 |
-
$url_checkout = $helper_licence->get_url_checkout('over200');
|
355 |
-
$this->error(str_replace(array('[link]','[/link]'),
|
356 |
-
array('<a title="'.__('Get Premium now',WYSIJA).'" target="_blank" href="'.$url_checkout.'">','</a>'),
|
357 |
-
sprintf(__('Yikes. You\'re over the limit of 2000 subscribers for the free version of MailPoet (%1$s in total). Sending is disabled now. Please upgrade your version to [link]premium[/link] to send without limits.',WYSIJA)
|
358 |
-
,$totalSubscribers)),true);
|
359 |
-
|
360 |
-
}else{
|
361 |
-
$url_checkout = $helper_licence->get_url_checkout('near200');
|
362 |
-
$this->notice(str_replace(array('[link]','[/link]'),
|
363 |
-
array('<a title="'.__('Get Premium now',WYSIJA).'" target="_blank" href="'.$url_checkout.'">','</a>'),
|
364 |
-
sprintf(__('Yikes! You\'re near the limit of %1$s subscribers for MailPoet\'s free version. Upgrade to [link]Premium[/link] to send without limits, and more.',WYSIJA)
|
365 |
-
,"2000")));
|
366 |
-
}
|
367 |
-
}
|
368 |
}
|
369 |
|
370 |
function edit($id=false){
|
88 |
function variousCheck(){
|
89 |
$model_config = WYSIJA::get('config','model');
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
if (!get_option("wysija_dismiss_sunset_notice") && !$this->_notice_displayed) {
|
92 |
+
$notice = __("This plugin is no longer supported. We recommend looking at [link1]MailPoet 3[/link1] as an alternative.");
|
93 |
+
$notice = str_replace(['[link1]', '[/link1]'], ['<a href="https://wordpress.org/plugins/mailpoet/" target="_blank">', '</a>'], $notice);
|
|
|
94 |
$notice .= '<br><br>' . str_replace( ['[link]', '[/link]'], ['<a href="javascript:;" class="wysija_dismiss_sunset_notice">', '</a>'], __("[link]Dismiss[/link] this notice."));
|
95 |
(new WYSIJA_object())->error($notice, true);
|
96 |
$this->_notice_displayed = true; // The method is called more than once so this is here to prevent multiple display
|
331 |
|
332 |
|
333 |
function _checkTotalSubscribers(){
|
334 |
+
// there is no more subscriber limit for MP2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
}
|
336 |
|
337 |
function edit($id=false){
|
controllers/back/campaigns.php
CHANGED
@@ -159,39 +159,12 @@ class WYSIJA_control_back_campaigns extends WYSIJA_control_back {
|
|
159 |
|
160 |
// when curl or any php remote function not available mailpoet.com returns lcheck to that function
|
161 |
function licok() {
|
162 |
-
|
163 |
-
$dt = get_option('wysijey');
|
164 |
-
|
165 |
-
if (isset($_REQUEST['xtz']) && $dt === $_REQUEST['xtz']) {
|
166 |
-
$dataconf = array(
|
167 |
-
'premium_key' => base64_encode(get_option('home') . time()),
|
168 |
-
'premium_val' => time(),
|
169 |
-
'premium_expire_at' => (int)$_REQUEST['expire_at']
|
170 |
-
);
|
171 |
-
$this->notice(__('Premium version is valid for your site.', WYSIJA));
|
172 |
-
} else {
|
173 |
-
$dataconf = array('premium_key' => '', 'premium_val' => '');
|
174 |
-
if(!empty($_REQUEST['expire_at'])){
|
175 |
-
$dataconf['premium_expire_at'] = (int)$_REQUEST['expire_at'];
|
176 |
-
}else{
|
177 |
-
$url_premium = 'http://www.mailpoet.com/checkout/?wysijadomain=' . $dt . '&nc=1&utm_source=wpadmin&utm_campaign=error_licence_activation';
|
178 |
-
$this->error(str_replace(array('[link]', '[/link]'), array('<a href="' . $url_premium . '" target="_blank">', '</a>'), __('Premium licence does not exist for your site. Purchase it [link]here[/link].', WYSIJA)), 1);
|
179 |
-
}
|
180 |
-
|
181 |
-
}
|
182 |
-
WYSIJA::update_option('wysicheck', false);
|
183 |
-
$modelConf = WYSIJA::get('config', 'model');
|
184 |
-
$modelConf->save($dataconf);
|
185 |
-
|
186 |
-
$this->redirect('admin.php?page=wysija_config#tab-premium');
|
187 |
}
|
188 |
|
189 |
/* END prem check hook */
|
190 |
|
191 |
function validateLic() {
|
192 |
-
$helpLic = WYSIJA::get('licence', 'helper');
|
193 |
-
$res = $helpLic->check();
|
194 |
-
|
195 |
$this->redirect();
|
196 |
}
|
197 |
|
159 |
|
160 |
// when curl or any php remote function not available mailpoet.com returns lcheck to that function
|
161 |
function licok() {
|
162 |
+
// removing all the code related to updating the license key but keeping the method empty in case it is still called somewhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
165 |
/* END prem check hook */
|
166 |
|
167 |
function validateLic() {
|
|
|
|
|
|
|
168 |
$this->redirect();
|
169 |
}
|
170 |
|
controllers/back/cron_info.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
defined('WYSIJA') or die('Restricted access');
|
4 |
+
|
5 |
+
class WYSIJA_control_back_cron_info extends WYSIJA_control_back {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Main view of this controller
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
public $view = 'cron_info';
|
12 |
+
public $model = 'config';
|
13 |
+
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Constructor
|
17 |
+
*/
|
18 |
+
function __construct(){
|
19 |
+
parent::__construct();
|
20 |
+
}
|
21 |
+
|
22 |
+
function defaultDisplay() {
|
23 |
+
}
|
24 |
+
}
|
core/base.php
CHANGED
@@ -19,7 +19,7 @@ class WYSIJA_object{
|
|
19 |
* Static variable holding core MailPoet's version
|
20 |
* @var array
|
21 |
*/
|
22 |
-
static $version = '2.
|
23 |
|
24 |
function __construct(){}
|
25 |
|
@@ -763,17 +763,11 @@ class WYSIJA extends WYSIJA_object{
|
|
763 |
WYSIJA::check_scheduled_newsletters();
|
764 |
}
|
765 |
|
766 |
-
$
|
767 |
-
|
768 |
-
|
769 |
-
if((int)$model_config->getValue('total_subscribers') < 2000 ){
|
770 |
-
$helper_queue = WYSIJA::get('queue','helper');
|
771 |
-
$helper_queue->report=false;
|
772 |
-
WYSIJA::log('croned_queue process',true,'cron');
|
773 |
-
|
774 |
-
$helper_queue->process();
|
775 |
-
}
|
776 |
|
|
|
777 |
}
|
778 |
|
779 |
public static function check_scheduled_newsletters(){
|
19 |
* Static variable holding core MailPoet's version
|
20 |
* @var array
|
21 |
*/
|
22 |
+
static $version = '2.22';
|
23 |
|
24 |
function __construct(){}
|
25 |
|
763 |
WYSIJA::check_scheduled_newsletters();
|
764 |
}
|
765 |
|
766 |
+
$helper_queue = WYSIJA::get('queue','helper');
|
767 |
+
$helper_queue->report=false;
|
768 |
+
WYSIJA::log('croned_queue process',true,'cron');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
|
770 |
+
$helper_queue->process();
|
771 |
}
|
772 |
|
773 |
public static function check_scheduled_newsletters(){
|
helpers/back.php
CHANGED
@@ -355,8 +355,8 @@ class WYSIJA_help_back extends WYSIJA_help{
|
|
355 |
'campaigns'=>array('title'=>'MailPoet '. $red_dot),
|
356 |
'subscribers'=>array('title'=>__('Subscribers',WYSIJA)), // if the key "subscribers" is changed, please change in the filter "wysija_menus" as well.
|
357 |
'config'=>array('title'=>__('Settings',WYSIJA)),
|
358 |
-
'
|
359 |
-
'
|
360 |
);
|
361 |
$this->menus = apply_filters('wysija_menus', $this->menus);
|
362 |
$this->menuHelp = $truelinkhelp;
|
@@ -441,7 +441,7 @@ class WYSIJA_help_back extends WYSIJA_help{
|
|
441 |
$position
|
442 |
);
|
443 |
}else{
|
444 |
-
$hookname=add_submenu_page($parentmenu,$menutemp['title'], $menutemp['subtitle'], $roleformenu, $actionFull , array($this->controller, 'render'));
|
445 |
}
|
446 |
|
447 |
//manage wp help tab
|
355 |
'campaigns'=>array('title'=>'MailPoet '. $red_dot),
|
356 |
'subscribers'=>array('title'=>__('Subscribers',WYSIJA)), // if the key "subscribers" is changed, please change in the filter "wysija_menus" as well.
|
357 |
'config'=>array('title'=>__('Settings',WYSIJA)),
|
358 |
+
'mp3'=>array('title'=>__('Try MailPoet 3',WYSIJA)),
|
359 |
+
'cron_info'=>array('title'=>'Cron Info')
|
360 |
);
|
361 |
$this->menus = apply_filters('wysija_menus', $this->menus);
|
362 |
$this->menuHelp = $truelinkhelp;
|
441 |
$position
|
442 |
);
|
443 |
}else{
|
444 |
+
$hookname=add_submenu_page(($action === 'cron_info' ? true : $parentmenu),$menutemp['title'], $menutemp['subtitle'], $roleformenu, $actionFull , array($this->controller, 'render'));
|
445 |
}
|
446 |
|
447 |
//manage wp help tab
|
helpers/licence.php
CHANGED
@@ -15,146 +15,12 @@ class WYSIJA_help_licence extends WYSIJA_help{
|
|
15 |
* @return string
|
16 |
*/
|
17 |
function get_url_checkout($source = 'not_specified', $campaign = 'wpadmin'){
|
18 |
-
|
19 |
-
$currency = 'USD';
|
20 |
-
if($helper_toolbox->is_european()){
|
21 |
-
$currency = 'EUR';
|
22 |
-
}
|
23 |
-
return 'http://www.mailpoet.com/checkout/?wysijadomain='.$this->getDomainInfo(true).'&nc=1&utm_medium=plugin&utm_campaign='.$campaign.'&utm_source='.$source.'¤cy='.$currency;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
*
|
28 |
-
* @param boolean $checkout_data
|
29 |
-
* @return string
|
30 |
-
*/
|
31 |
-
function getDomainInfo($checkout_data = false){
|
32 |
-
$domain_data = array();
|
33 |
-
|
34 |
-
$url = admin_url('admin.php');
|
35 |
-
|
36 |
-
$helper_toolbox = WYSIJA::get('toolbox','helper');
|
37 |
-
$domain_data['domain_name'] = $helper_toolbox->_make_domain_name($url);
|
38 |
-
|
39 |
-
if(is_multisite()) {
|
40 |
-
$domain_data['multisite_domain'] = $helper_toolbox->_make_domain_name(network_site_url());
|
41 |
-
}
|
42 |
-
$domain_data['url'] = $url;
|
43 |
-
$domain_data['cron_url'] = site_url( 'wp-cron.php').'?'.WYSIJA_CRON.'&action=wysija_cron&process=all&silent=1';
|
44 |
-
|
45 |
-
if($checkout_data){
|
46 |
-
$model_config = WYSIJA::get('config' , 'model');
|
47 |
-
if(!$model_config->getValue('poll_origin')){
|
48 |
-
$domain_data['poll_origin'] = 'unidentified';
|
49 |
-
}else{
|
50 |
-
$domain_data['poll_origin'] = $model_config->getValue('poll_origin');
|
51 |
-
$domain_data['poll_origin_url'] = $model_config->getValue('poll_origin_url');
|
52 |
-
}
|
53 |
-
|
54 |
-
$domain_data['installed_time'] = $model_config->getValue('installed_time');
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
return base64_encode(serialize($domain_data));
|
59 |
}
|
60 |
|
61 |
function check($js = false){
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
if($js === false) {
|
66 |
-
WYSIJA::update_option('wysijey', $domain_data);
|
67 |
-
}
|
68 |
-
|
69 |
-
$response=array();
|
70 |
-
$response['domain_name'] = $domain_data;
|
71 |
-
$response['nocontact'] = false;
|
72 |
-
|
73 |
-
$model_config=WYSIJA::get('config','model');
|
74 |
-
if($model_config->getValue('nocurl')){
|
75 |
-
$json_result=false;
|
76 |
-
}else{
|
77 |
-
$helper_http = WYSIJA::get('http','helper');
|
78 |
-
$json_result = $helper_http->wp_request('http://www.mailpoet.com/?wysijap=checkout&wysijashop-page=1&controller=customer&action=checkDomain&data='.urlencode($domain_data));
|
79 |
-
}
|
80 |
-
|
81 |
-
if($json_result!==false) {
|
82 |
-
$decoded = json_decode($json_result, true);
|
83 |
-
|
84 |
-
if(isset($decoded['result']) === false) {
|
85 |
-
// service unavailable
|
86 |
-
$response['nocontact'] = true;
|
87 |
-
// make sure to re check later
|
88 |
-
WYSIJA::update_option('wysicheck', true);
|
89 |
-
} else {
|
90 |
-
// set result
|
91 |
-
$response['result'] = $decoded['result'];
|
92 |
-
|
93 |
-
if($decoded['result'] === true) {
|
94 |
-
// set premium key
|
95 |
-
$config_data = array(
|
96 |
-
'premium_key' => base64_encode(get_option('home').time()),
|
97 |
-
'premium_val' => time(),
|
98 |
-
'premium_expire_at' => (int) $decoded['expire_at']
|
99 |
-
);
|
100 |
-
|
101 |
-
// success message
|
102 |
-
$this->notice(__('Premium version is valid for your site.', WYSIJA));
|
103 |
-
|
104 |
-
// stop checking premium
|
105 |
-
WYSIJA::update_option('wysicheck', false);
|
106 |
-
} else {
|
107 |
-
// set error
|
108 |
-
|
109 |
-
if(isset($decoded['error'])) {
|
110 |
-
$response['code'] = $decoded['code'];
|
111 |
-
switch($response['code']){
|
112 |
-
case 1: //Domain \'%1$s\' does not exist.
|
113 |
-
//$error_msg=__('\'%1$s\' does not exist!',WYSIJA);
|
114 |
-
|
115 |
-
$error_msg=__('Your website doesn\'t seem to have a license! Log into your [link]account manager[/link] to add a license for this website.',WYSIJA);
|
116 |
-
break;
|
117 |
-
case 2: //'Licence (id: %d) does not exist for domain "%s"
|
118 |
-
$error_msg=__('There\'s no license for "%1$s". If you\'re Premium, add this domain in your [link]account manager[/link].',WYSIJA);
|
119 |
-
break;
|
120 |
-
case 3: //Licence has expired
|
121 |
-
|
122 |
-
$renew_url = 'http://www.mailpoet.com/checkout/?utm_medium=plugin&utm_campaign=renewal_deal&utm_source=renewal_deal_';
|
123 |
-
$link_renew = '<a href="'.$renew_url.'has_expired'.'" target="_blank" >'.__('Renew now.', WYSIJA).'</a>';
|
124 |
-
$error_msg=__('Your Premium licence has expired.',WYSIJA). ' ' . $link_renew;
|
125 |
-
|
126 |
-
break;
|
127 |
-
case 4: //You need to manually add this domain to your [link]account manager[/link]
|
128 |
-
$error_msg=__('You can add this domain to your [link]account manager[/link].',WYSIJA);
|
129 |
-
break;
|
130 |
-
case 5: //Your licence does not allow more domains, please upgrade your licence in your [link]account manager[/link]
|
131 |
-
$error_msg=__('Your licence doesn\'t allow more domains. Upgrade from your [link]account manager[/link].',WYSIJA);
|
132 |
-
break;
|
133 |
-
default:
|
134 |
-
$error_msg=$decoded['error'];
|
135 |
-
}
|
136 |
-
$this->error(str_replace(
|
137 |
-
array('[link]','[/link]','%1$s'),
|
138 |
-
array('<a href="http://www.mailpoet.com/account/licences/" target="_blank">','</a>',$decoded['domain']),
|
139 |
-
$error_msg), true);
|
140 |
-
}
|
141 |
-
|
142 |
-
// reset premium key data
|
143 |
-
$config_data = array('premium_key' => '', 'premium_val' => '');
|
144 |
-
|
145 |
-
WYSIJA::update_option('wysicheck', false);
|
146 |
-
}
|
147 |
-
|
148 |
-
// update config
|
149 |
-
$model_config = WYSIJA::get('config','model');
|
150 |
-
$model_config->save($config_data);
|
151 |
-
}
|
152 |
-
}else{
|
153 |
-
$response['nocontact']=true;
|
154 |
-
WYSIJA::update_option('wysicheck',true);
|
155 |
-
}
|
156 |
-
|
157 |
-
return $response;
|
158 |
}
|
159 |
|
160 |
|
@@ -191,29 +57,7 @@ class WYSIJA_help_licence extends WYSIJA_help{
|
|
191 |
$mConfig->save($configData);
|
192 |
}
|
193 |
|
194 |
-
}else{//fetch them through a request to mailpoet.com
|
195 |
-
$domainData=$this->getDomainInfo();
|
196 |
-
$hHTTP = WYSIJA::get('http','helper');
|
197 |
-
|
198 |
-
$jsonResult = $hHTTP->wp_request('http://www.mailpoet.com/?wysijap=checkout&wysijashop-page=1&controller=customer&action=checkDkimNew&data='.$domainData);
|
199 |
-
|
200 |
-
//remotely connect to host
|
201 |
-
if($jsonResult!==false){
|
202 |
-
$decoded=json_decode($jsonResult);
|
203 |
-
|
204 |
-
$configData=array('dkim_domain'=>$dkim_domain,'dkim_privk'=>$decoded->dkim_privk,'dkim_pubk'=>$decoded->dkim_pubk->key,'dkim_1024'=>1);
|
205 |
-
|
206 |
-
$mConfig = WYSIJA::get('config','model');
|
207 |
-
$mConfig->save($configData);
|
208 |
-
WYSIJA::update_option('dkim_autosetup',false);
|
209 |
-
|
210 |
-
}else{
|
211 |
-
WYSIJA::update_option('dkim_autosetup',true);
|
212 |
-
}
|
213 |
-
|
214 |
}
|
215 |
-
|
216 |
}
|
217 |
|
218 |
}
|
219 |
-
|
15 |
* @return string
|
16 |
*/
|
17 |
function get_url_checkout($source = 'not_specified', $campaign = 'wpadmin'){
|
18 |
+
return 'https://kb.mailpoet.com/article/158-how-to-migrate-from-version-2-to-version-3';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
function check($js = false){
|
22 |
+
// removing all the code related to updating the license key but keeping the method empty in case it is still called somewhere.
|
23 |
+
return array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
|
57 |
$mConfig->save($configData);
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
|
|
61 |
}
|
62 |
|
63 |
}
|
|
img/cron_info/control_panel.jpeg
ADDED
Binary file
|
img/cron_info/cp_cron_settings.jpeg
ADDED
Binary file
|
img/cron_info/cron_check.png
ADDED
Binary file
|
img/cron_info/cron_url.png
ADDED
Binary file
|
img/cron_info/free_users_settings.png
ADDED
Binary file
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MailPoet 2
|
4 |
Plugin URI: http://www.mailpoet.com/
|
5 |
Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
|
6 |
-
Version: 2.
|
7 |
Author: MailPoet
|
8 |
Author URI: http://www.mailpoet.com/
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: MailPoet 2
|
4 |
Plugin URI: http://www.mailpoet.com/
|
5 |
Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
|
6 |
+
Version: 2.22
|
7 |
Author: MailPoet
|
8 |
Author URI: http://www.mailpoet.com/
|
9 |
License: GPLv2 or later
|
js/admin-wysija.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(i){i("#wysija-app .submitdelete").click(function(){return confirm(wysijatrans.suredelete)}),i("#wysija-app .linkignore, .wysija-version .linkignore").click(function(){var a=this;return wysijaAJAX.controller="config",wysijaAJAX.task="linkignore",wysijaAJAX.ignorewhat=i.trim(i(this).attr("class").replace(/linkignore/g,"")),wysijaAJAX._wpnonce=wysijanonces.config.linkignore,i.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){0<i(a).parents(".removeme").length?i(a).parents(".removeme").fadeOut():0<i(a).parents("li").siblings().size()?i(a).parents("li").fadeOut():i(a).parents("div.updated").fadeOut()},error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess=""},dataType:"json"}),!0}),i(document).on("click","#wysija-app .premium-tab, .wysija-msg .premium-tab, #theme-view .premium-tab",function(){i("#wysija-app .wysija-premium img").hide(),i(this).hasClass("ispopup")?(window.parent.tb_remove(),window.parent.location.href=wysijatrans.urlpremium):0<i("#wysija-tabs").length?i('#wysija-tabs a[href="#premium"]').trigger("click"):window.location.href=wysijatrans.urlpremium}),i("#install-wjp").click(function(){return confirm(i(this).data("warn"))&&(tb_show(i(this).attr("title"),i(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe()),!1}),i("#share_analytics").click(function(){var e=this;return wysijaAJAX.controller="config",wysijaAJAX.task="share_analytics",wysijaAJAX._wpnonce=wysijanonces.config.share_analytics,i(e).addClass("disabled"),i("#update-loading-icon").show(),i.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){i(e).after("<h2>Thanks!</h2>"),i(e).hide(),i("#update-loading-icon").hide()},error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess="",i(e).removeClass("disabled")},dataType:"json"}),!0})});
|
models/config.php
CHANGED
@@ -263,13 +263,6 @@ class WYSIJA_model_config extends WYSIJA_object{
|
|
263 |
}
|
264 |
}
|
265 |
|
266 |
-
// if the wysija's cron option has just been turned on from an off value
|
267 |
-
// then we check the licence from mailpoet.com to share the cron url with us
|
268 |
-
if ( isset( $data['cron_manual'] ) && $data['cron_manual'] != $this->getValue( 'cron_manual' ) ){
|
269 |
-
$helper_licence = WYSIJA::get( 'licence', 'helper' );
|
270 |
-
$helper_licence->check( true );
|
271 |
-
}
|
272 |
-
|
273 |
// loop through all of the checkboxes values
|
274 |
foreach ( $this->cboxes as $checkbox ){
|
275 |
// set the value as false if the value doesn't exist in the array (happens when checkbox is unchecked)
|
263 |
}
|
264 |
}
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
// loop through all of the checkboxes values
|
267 |
foreach ( $this->cboxes as $checkbox ){
|
268 |
// set the value as false if the value doesn't exist in the array (happens when checkbox is unchecked)
|
readme.txt
CHANGED
@@ -3,115 +3,28 @@ Contributors: mailpoet
|
|
3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 5.5
|
6 |
-
Stable tag: 2.
|
7 |
Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
-
|
12 |
-
We recommend looking at [MailPoet 3](https://wordpress.org/plugins/mailpoet/) as an alternative.
|
13 |
-
|
14 |
-
= Check out this 2 minute video. =
|
15 |
-
|
16 |
-
https://vimeo.com/130151897
|
17 |
|
18 |
= Features =
|
19 |
|
20 |
Please visit [MailPoet version 3 features](https://wordpress.org/plugins/mailpoet/) instead.
|
21 |
|
22 |
-
= Premium version =
|
23 |
-
|
24 |
-
MailPoet Premium offers these nifty extra features:
|
25 |
-
|
26 |
-
* Send to more than 2000 subscribers
|
27 |
-
* A beautiful statistics dashboard to compare your newsletters and subscribers
|
28 |
-
* Detailed stats for each subscriber and newsletter
|
29 |
-
* Automated bounce handling that keeps your subscribers' list clean
|
30 |
-
* Test your SPAM score before you send a newsletter to your subscribers
|
31 |
-
* Improve deliverability with DKIM signature
|
32 |
-
* Simple install process
|
33 |
-
* Priority support
|
34 |
-
|
35 |
= Support =
|
36 |
|
37 |
-
This version is no longer officially supported.
|
38 |
-
|
39 |
-
= Translations in your language =
|
40 |
-
|
41 |
-
* Arabic
|
42 |
-
* Basque
|
43 |
-
* Catalan
|
44 |
-
* Chinese
|
45 |
-
* Croatian
|
46 |
-
* Czech
|
47 |
-
* Danish
|
48 |
-
* Dutch
|
49 |
-
* French (but of course!)
|
50 |
-
* German
|
51 |
-
* Greek
|
52 |
-
* Hebrew
|
53 |
-
* Hungarian
|
54 |
-
* Indonesian
|
55 |
-
* Italian
|
56 |
-
* Japanese
|
57 |
-
* Norwegian
|
58 |
-
* Persian
|
59 |
-
* Polish
|
60 |
-
* Portuguese PT
|
61 |
-
* Portuguese BR
|
62 |
-
* Romanian
|
63 |
-
* Russian
|
64 |
-
* Serbian
|
65 |
-
* Slovak
|
66 |
-
* Slovenian
|
67 |
-
* Spanish
|
68 |
-
* Swedish
|
69 |
-
* Turkish
|
70 |
-
|
71 |
-
== Installation ==
|
72 |
-
|
73 |
-
There are 3 ways to install this plugin:
|
74 |
-
|
75 |
-
= 1. The super easy way =
|
76 |
-
1. In your Admin, go to menu Plugins > Add
|
77 |
-
1. Search for `mailpoet`
|
78 |
-
1. Click to install
|
79 |
-
1. Activate the plugin
|
80 |
-
1. A new menu `MailPoet` will appear in your Admin
|
81 |
-
|
82 |
-
= 2. The easy way =
|
83 |
-
1. Download the plugin (.zip file) on the right column of this page
|
84 |
-
1. In your Admin, go to menu Plugins > Add
|
85 |
-
1. Select the tab "Upload"
|
86 |
-
1. Upload the .zip file you just downloaded
|
87 |
-
1. Activate the plugin
|
88 |
-
1. A new menu `MailPoet` will appear in your Admin
|
89 |
-
|
90 |
-
= 3. The old and reliable way (FTP) =
|
91 |
-
1. Upload `wysija-newsletters` folder to the `/wp-content/plugins/` directory
|
92 |
-
1. Activate the plugin through the 'Plugins' menu in WordPress
|
93 |
-
1. A new menu `MailPoet` will appear in your Admin
|
94 |
-
|
95 |
-
== Frequently Asked Questions ==
|
96 |
-
|
97 |
-
= Got questions? =
|
98 |
-
|
99 |
-
Our [support site](https://www.mailpoet.com/support) has plenty of articles and a ticketing system.
|
100 |
-
|
101 |
-
[Read more the complete FAQ on version 2.](https://www.mailpoet.com/faq-mailpoet-version-2/)
|
102 |
-
|
103 |
-
== Screenshots ==
|
104 |
-
|
105 |
-
1. Sample newsletters.
|
106 |
-
2. The drag & drop editor.
|
107 |
-
3. Subscriber management.
|
108 |
-
4. Newsletter statistics.
|
109 |
-
5. Subscriber statistics (Premium version).
|
110 |
-
6. Sending method configuration in Settings.
|
111 |
-
7. Importing subscribers with a CSV.
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
115 |
= 2.21 - 2022-02-11 =
|
116 |
* Updated readme.txt
|
117 |
|
3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 2.22
|
7 |
Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
+
This plugin is no longer supported. We recommend looking at [MailPoet 3](https://wordpress.org/plugins/mailpoet/) as an alternative.
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
= Features =
|
14 |
|
15 |
Please visit [MailPoet version 3 features](https://wordpress.org/plugins/mailpoet/) instead.
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
= Support =
|
18 |
|
19 |
+
This version is no longer officially supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
== Changelog ==
|
22 |
|
23 |
+
= 2.22 - 2022-08-01 =
|
24 |
+
* Removed: premium license checks;
|
25 |
+
* Removed: 2000 subscribers limit;
|
26 |
+
* Added: cron configuration info page.
|
27 |
+
|
28 |
= 2.21 - 2022-02-11 =
|
29 |
* Updated readme.txt
|
30 |
|
views/back/campaigns.php
CHANGED
@@ -759,10 +759,7 @@ class WYSIJA_view_back_campaigns extends WYSIJA_view_back {
|
|
759 |
}
|
760 |
|
761 |
function sending_process() {
|
762 |
-
|
763 |
-
if ((int) $config->getValue('total_subscribers') < 2000)
|
764 |
-
return true;
|
765 |
-
return false;
|
766 |
}
|
767 |
|
768 |
function dataBatches($data, $row, $pause, $statuses, $pending = false) {
|
759 |
}
|
760 |
|
761 |
function sending_process() {
|
762 |
+
return true;
|
|
|
|
|
|
|
763 |
}
|
764 |
|
765 |
function dataBatches($data, $row, $pause, $statuses, $pending = false) {
|
views/back/config.php
CHANGED
@@ -214,7 +214,7 @@ class WYSIJA_view_back_config extends WYSIJA_view_back {
|
|
214 |
$field .= '<div class="cronright" id="'.$key.'_linkname">';
|
215 |
|
216 |
$text_cron_manual_trigger = __('I\'ll setup a cron job on my server to execute at the frequency I want. Read about [link]setting up a cron job yourself[/link].', WYSIJA).'<br/><span>'.__('Use this URL in your cron job: [cron_url]').'</span>';
|
217 |
-
$text_cron_manual_trigger = str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="
|
218 |
|
219 |
$text_cron_page_view = __('No thanks! I have enough visitors on my site. Their visits will trigger MailPoet\'s cron automatically.', WYSIJA);
|
220 |
$values_page_view_trigger = array( 2 => $text_cron_manual_trigger, 1 => $text_cron_page_view );
|
@@ -226,13 +226,12 @@ class WYSIJA_view_back_config extends WYSIJA_view_back {
|
|
226 |
$key = 'cron_page_hit_trigger';
|
227 |
|
228 |
$content_radios = $helper_forms->radios(array( 'id' => $key, 'name' => 'wysija['.$model.']['.$key.']' ), $values_page_view_trigger, $value);
|
229 |
-
|
230 |
-
$field .= apply_filters('wysija_extend_cron_config', $content_radios);
|
231 |
|
232 |
$field .= '</div></div>';
|
233 |
|
234 |
// replace the variable in the text
|
235 |
-
$field = str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="
|
236 |
|
237 |
return $field;
|
238 |
}
|
@@ -253,18 +252,10 @@ class WYSIJA_view_back_config extends WYSIJA_view_back {
|
|
253 |
$field = '<p>';
|
254 |
|
255 |
$text_cron_manual_trigger = __('If I want I can [link]create an additional cron job[/link] on my end to increase the frequency.', WYSIJA).'<br/><span>'.__('Use this URL in your cron job: [cron_url]').'</span>';
|
256 |
-
$field .= str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="
|
257 |
|
258 |
$field .= '</p>';
|
259 |
|
260 |
-
// $model_config = WYSIJA::get('config', 'model');
|
261 |
-
// if ($model_config->getValue('cron_manual') !== true) {
|
262 |
-
// $model_config->save(array('cron_manual' => true));
|
263 |
-
//
|
264 |
-
// $helper_licence = WYSIJA::get('licence', 'helper');
|
265 |
-
// $helper_licence->check(true);
|
266 |
-
// }
|
267 |
-
|
268 |
return $field;
|
269 |
}
|
270 |
|
214 |
$field .= '<div class="cronright" id="'.$key.'_linkname">';
|
215 |
|
216 |
$text_cron_manual_trigger = __('I\'ll setup a cron job on my server to execute at the frequency I want. Read about [link]setting up a cron job yourself[/link].', WYSIJA).'<br/><span>'.__('Use this URL in your cron job: [cron_url]').'</span>';
|
217 |
+
$text_cron_manual_trigger = str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="admin.php?page=wysija_cron_info" title="Seting up cron job" target="_blank">', '</a>', '<a href="'.$url_cron.'" target="_blank">'.$url_cron.'</a>' ), $text_cron_manual_trigger);
|
218 |
|
219 |
$text_cron_page_view = __('No thanks! I have enough visitors on my site. Their visits will trigger MailPoet\'s cron automatically.', WYSIJA);
|
220 |
$values_page_view_trigger = array( 2 => $text_cron_manual_trigger, 1 => $text_cron_page_view );
|
226 |
$key = 'cron_page_hit_trigger';
|
227 |
|
228 |
$content_radios = $helper_forms->radios(array( 'id' => $key, 'name' => 'wysija['.$model.']['.$key.']' ), $values_page_view_trigger, $value);
|
229 |
+
$field .= $content_radios;
|
|
|
230 |
|
231 |
$field .= '</div></div>';
|
232 |
|
233 |
// replace the variable in the text
|
234 |
+
$field = str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="admin.php?page=wysija_cron_info" title="Seting up cron job" target="_blank">', '</a>', '<a href="'.$url_cron.'" target="_blank">'.$url_cron.'</a>' ), $field);
|
235 |
|
236 |
return $field;
|
237 |
}
|
252 |
$field = '<p>';
|
253 |
|
254 |
$text_cron_manual_trigger = __('If I want I can [link]create an additional cron job[/link] on my end to increase the frequency.', WYSIJA).'<br/><span>'.__('Use this URL in your cron job: [cron_url]').'</span>';
|
255 |
+
$field .= str_replace(array( '[link]', '[/link]', '[cron_url]' ), array( '<a href="admin.php?page=wysija_cron_info" title="Seting up cron job" target="_blank">', '</a>', '<a href="'.$url_cron.'" target="_blank">'.$url_cron.'</a>' ), $text_cron_manual_trigger);
|
256 |
|
257 |
$field .= '</p>';
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
return $field;
|
260 |
}
|
261 |
|
views/back/cron_info.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('WYSIJA') or die('Restricted access');
|
3 |
+
|
4 |
+
class WYSIJA_view_back_cron_info extends WYSIJA_view_back{
|
5 |
+
function __construct(){
|
6 |
+
$this->skip_header = true;
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
function defaultDisplay(){
|
11 |
+
$this->displayInfo();
|
12 |
+
}
|
13 |
+
|
14 |
+
function displayInfo() {
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="wrap mpoet-wrap full-width-layout">
|
18 |
+
|
19 |
+
<div class="feature-section one-col" style="margin-left: 0;">
|
20 |
+
<div class="col">
|
21 |
+
<h2 style="text-align: left;">Guide to configure a Cron job on your server</h2>
|
22 |
+
<h3>When do I need to configure a Cron job on my server?</h3>
|
23 |
+
<ul>
|
24 |
+
<li>The emails on your site <strong>are not</strong> being sent <strong>automatically</strong>.</li>
|
25 |
+
<li>The emails on your site <strong>are not</strong> being sent <strong>on time</strong>.</li>
|
26 |
+
<li>You want to send at a <strong>regular frequency</strong>.</li>
|
27 |
+
</ul>
|
28 |
+
<p> Some hosts <strong>remove</strong>, <strong>rename</strong> or <strong>change</strong> the access rights of the file wp-cron.php located at the root of your site (for bandwidth and performance reasons). If that's your case, activating MailPoet's Cron option won't help you. Get in touch with your host or try to re-upload a wp-cron.php file manually. </p>
|
29 |
+
<h3>1. Activate MailPoet's Cron</h3>
|
30 |
+
<p> The path to enable MailPoet Cron is at <strong>Settings</strong> page > <strong>Advanced</strong> tab > <strong>Geeky Options</strong> link. </p>
|
31 |
+
<p> <img src="<?php echo WYSIJA_URL ?>img/cron_info/free_users_settings.png" width="685" width="294"> </p>
|
32 |
+
<p> Once you've activated MailPoet's Cron, there are three possible options: </p>
|
33 |
+
<ol>
|
34 |
+
<li>Manually setup a Cron job on your host's administration panel (cPanel or Plesk) that will access your MailPoet's Cron URL. See below how-to.</li>
|
35 |
+
<li>Do nothing and your visitors will automatically trigger your WP-Cron. This option is unreliable for <strong>low traffic</strong> websites.</li>
|
36 |
+
<li>You can use one of these services: <a href="https://www.easycron.com/">EasyCron</a> or <a href="https://www.setcronjob.com/">SetCronJob</a>.</li>
|
37 |
+
</ol>
|
38 |
+
<p> Once MailPoet's Cron is activated, it will enhance the default WP-Cron by preventing duplicated newsletters from being sent to the same subscriber, in the event that your website gets a lot of traffic. </p>
|
39 |
+
|
40 |
+
<h3 id="setting-up-cron-job-on-your-hosts-admin-panel">2. Setting up a Cron job on Your Host's Administration Panel</h3>
|
41 |
+
<p> This is where the fun begins! Each host may use a different configuration panel. </p>
|
42 |
+
<p> You should look for " <em>cron job</em>" or "<em>task scheduler</em>" option to configure in your host's administration panel. Read the most common ways to add a cron for <a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/CronJobs#Adding%20a%20cron%20job" target="_blank">cPanel</a>, <a title="Add a cron job with plesk" href="http://download1.parallels.com/Plesk/PP10/10.3.1/Doc/en-US/online/plesk-administrator-guide/plesk-control-panel-user-guide/index.htm?fileName=65208.htm" target="_blank">Plesk </a>or the <a title="Add a cron job the unix way" href="http://www.thegeekstuff.com/2011/07/php-cron-job/" target="_blank">crontab</a>. </p>
|
43 |
+
<p> The instructions below are from host's administration panel that uses cPanel. </p>
|
44 |
+
<h4>2.1 Access your account's cPanel</h4>
|
45 |
+
<p> Usually the link is http://yourwebsite.com/cpanel or http://yourwebsite.com:2082. Once your enter your user id and password and enter the control panel, scroll down to the "Advanced section". </p>
|
46 |
+
<h5 class="nolinks">2.2 Go to Cron Settings Page</h5>
|
47 |
+
<p> Click on the "Cron Jobs" icon in the advanced section. </p>
|
48 |
+
<p> <img src="<?php echo WYSIJA_URL ?>img/cron_info/control_panel.jpeg" width="600" height="447"> </p>
|
49 |
+
<h4 class="nolinks">2.3 Set up a Cron Job</h4>
|
50 |
+
<p> <img src="<?php echo WYSIJA_URL ?>img/cron_info/cp_cron_settings.jpeg" width="600" height="380"> </p>
|
51 |
+
<p> In the command field, you'll have to type a command that will run a program to call the MailPoet's Cron URL, which you can find in the <strong>MailPoet's Cron</strong> option in the Settings page: </p>
|
52 |
+
<p> <img src="<?php echo WYSIJA_URL ?>img/cron_info/cron_url.png" width="1000" height="101"> </p>
|
53 |
+
<p> Finally, click on the "Add New Cron Job" button. </p>
|
54 |
+
<p> From now on the server will make a request for the wp-cron.php file every 5 minutes. </p>
|
55 |
+
<h5 id="cron_commands">2.4 Cron job commands to call MailPoet's Cron URL</h5>
|
56 |
+
<p> Below are a few examples of commands you can use. </p> You'll only need to set up
|
57 |
+
<strong>one</strong> on your server, so simply pick the one which works on your server (
|
58 |
+
<strong>curl</strong> is safer):
|
59 |
+
<pre>curl --silent "http://www.yourwebsite.com/wp-cron.php?xxxx..." > /dev/null 2>&1</pre>
|
60 |
+
<pre>wget --quiet "http://www.yourwebsite.com/wp-cron.php?xxxx..."</pre>
|
61 |
+
<p> Don't forget to replace <strong>http://www.yourwebsite.com/wp-cron.php?xxxx...</strong> with your own MailPoet's Cron URL. </p>
|
62 |
+
<p> Some hosts may allow you to set up cron commands from their admin interfaces. But, the commands <strong>wget</strong>, <strong>curl</strong> and <strong>lynx</strong> may not be available, so if the cron doesn't seem to be running, get in touch with your host and they should be able to help you out. </p>
|
63 |
+
|
64 |
+
<h3>How do I know the Cron job is running properly?</h3>
|
65 |
+
<p> Simply check that the scheduled emails have been sent on time. </p>
|
66 |
+
<p> Make sure that the sending frequency you've setup on your MailPoet installation's <strong>Settings</strong> page > <strong>Send With...</strong> tab is matching the Cron job frequency you've configured on your host administration panel.</p>
|
67 |
+
<p> For example, if you want to send 50 emails every minute, then you'll need to have a Cron job running every minute, like this: </p>
|
68 |
+
<p> <img src="<?php echo WYSIJA_URL ?>img/cron_info/cron_check.png" width="1000" height="515"> </p>
|
69 |
+
<p> Remember! As soon as you select the option " <em>I'll setup a cron job on my server to execute at the frequency I want...</em>" your newsletters will <strong>only</strong> be sent if that URL <strong>is visited</strong>. So, make sure that MailPoet's servers are <strong>able to reach</strong> that URL (no Firewalls are blocking it) or you have a Cron job on your host's administration panel set up to <strong>visit</strong> that URL. </p>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
|
73 |
+
</div>
|
74 |
+
<?php
|
75 |
+
}
|
76 |
+
}
|