Skip to content

Commit e7e6b60

Browse files
author
MemberPress
committed
Updates to 1.12.14
1 parent e3a0313 commit e7e6b60

File tree

9 files changed

+197
-166
lines changed

9 files changed

+197
-166
lines changed

app/controllers/MeprProactiveSupportCronCtrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function register_interval($schedules)
4747
public function schedule()
4848
{
4949
if (!wp_next_scheduled(self::CRON_HOOK)) {
50-
wp_schedule_event(time(), 'mepr_proactive_support_six_hours', self::CRON_HOOK);
50+
wp_schedule_event(time() + HOUR_IN_SECONDS, 'mepr_proactive_support_six_hours', self::CRON_HOOK);
5151
}
5252
}
5353

app/helpers/MeprProactiveSupportHelper.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,20 @@ public static function add_tracking_to_url($url): string
243243
return add_query_arg(self::tracking_params(), $url);
244244
}
245245

246+
/**
247+
* Determine if proactive support is enabled for this install.
248+
*
249+
* Returns true only when the flag was explicitly set during initial activation,
250+
* which happens exclusively on fresh installs, never on upgrades.
251+
*
252+
* @return boolean
253+
*/
254+
public static function is_enabled(): bool
255+
{
256+
$options = MeprOptions::fetch();
257+
return !empty($options->proactive_support_fresh_install);
258+
}
259+
246260
/**
247261
* Get the install timestamp.
248262
*

app/jobs/MeprProactiveSupportCronJob.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ class MeprProactiveSupportCronJob
1515
*/
1616
public function run(): void
1717
{
18+
if (!MeprProactiveSupportHelper::is_enabled()) {
19+
return;
20+
}
21+
1822
$recipients = MeprProactiveSupportHelper::get_admin_batch(50);
1923

2024
if (empty($recipients)) {

app/lib/MeprProactiveSupportMailer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function send($trigger, array $recipient, array $context): bool
6565
$headers = [
6666
'Content-Type: text/html; charset=UTF-8',
6767
'From: MemberPress Support <support@memberpress.com>',
68-
'Reply-To: onboarding@memberpress.com',
68+
'Reply-To: outreach@memberpress.com',
6969
'X-MemberPress-Trigger: ' . sanitize_key($trigger),
7070
'X-MemberPress-User-ID: ' . ($user instanceof WP_User ? $user->ID : 0),
7171
'X-MemberPress-Site-URL: ' . $site_url,

app/models/MeprOptions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ public function set_defaults()
214214
$this->proactive_support_batch_offset = 0;
215215
}
216216

217+
if (!isset($this->proactive_support_fresh_install)) {
218+
$this->proactive_support_fresh_install = false;
219+
}
220+
217221
if (!isset($this->emails)) {
218222
$this->emails = [];
219223

i18n/memberpress.pot

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GPL v2+.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: MemberPress 1.12.12\n"
5+
"Project-Id-Version: MemberPress 1.12.14\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/memberpress\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2026-02-25T19:45:12+00:00\n"
12+
"POT-Creation-Date: 2026-02-26T17:15:05+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.11.0\n"
1515
"X-Domain: memberpress\n"
@@ -2344,7 +2344,7 @@ msgstr ""
23442344

23452345
#: app/controllers/MeprProductsCtrl.php:315
23462346
#: app/helpers/MeprOnboardingHelper.php:677
2347-
#: app/models/MeprOptions.php:883
2347+
#: app/models/MeprOptions.php:887
23482348
#: memberpress.php:239
23492349
msgid "Your subscription has been set up successfully."
23502350
msgstr ""
@@ -4838,8 +4838,8 @@ msgstr ""
48384838

48394839
#: app/helpers/MeprAppHelper.php:78
48404840
#: app/helpers/MeprAppHelper.php:398
4841-
#: app/models/MeprOptions.php:1319
4842-
#: app/models/MeprOptions.php:1320
4841+
#: app/models/MeprOptions.php:1323
4842+
#: app/models/MeprOptions.php:1324
48434843
#: app/models/MeprTransaction.php:1245
48444844
msgid "Free"
48454845
msgstr ""
@@ -5677,8 +5677,8 @@ msgstr ""
56775677

56785678
#: app/helpers/MeprOptionsHelper.php:64
56795679
#: app/helpers/MeprTransactionsHelper.php:103
5680-
#: app/models/MeprOptions.php:1326
5681-
#: app/models/MeprOptions.php:1327
5680+
#: app/models/MeprOptions.php:1330
5681+
#: app/models/MeprOptions.php:1331
56825682
msgid "Manual"
56835683
msgstr ""
56845684

@@ -7124,80 +7124,80 @@ msgid "An unsupported Event type was used"
71247124
msgstr ""
71257125

71267126
#. Translators: %s: blog name.
7127-
#: app/models/MeprOptions.php:284
7127+
#: app/models/MeprOptions.php:288
71287128
msgid "Welcome to %s"
71297129
msgstr ""
71307130

7131-
#: app/models/MeprOptions.php:375
7131+
#: app/models/MeprOptions.php:379
71327132
msgctxt "ui"
71337133
msgid "I have read and agree to the Terms Of Service"
71347134
msgstr ""
71357135

7136-
#: app/models/MeprOptions.php:379
7137-
#: app/models/MeprOptions.php:970
7136+
#: app/models/MeprOptions.php:383
7137+
#: app/models/MeprOptions.php:974
71387138
msgctxt "ui"
71397139
msgid "This site collects names, emails and other user information. I consent to the terms set forth in the %Privacy Policy%."
71407140
msgstr ""
71417141

7142-
#: app/models/MeprOptions.php:449
7142+
#: app/models/MeprOptions.php:453
71437143
msgid "You are unauthorized to view this page."
71447144
msgstr ""
71457145

7146-
#: app/models/MeprOptions.php:794
7146+
#: app/models/MeprOptions.php:798
71477147
msgid "The Membership Pages Slug must be set"
71487148
msgstr ""
71497149

7150-
#: app/models/MeprOptions.php:798
7150+
#: app/models/MeprOptions.php:802
71517151
msgid "The Group Pages Slug must be set"
71527152
msgstr ""
71537153

7154-
#: app/models/MeprOptions.php:802
7154+
#: app/models/MeprOptions.php:806
71557155
msgid "The Membership Pages Slug must only contain letters, numbers and dashes."
71567156
msgstr ""
71577157

7158-
#: app/models/MeprOptions.php:806
7158+
#: app/models/MeprOptions.php:810
71597159
msgid "The Group Pages Slug must only contain letters, numbers and dashes."
71607160
msgstr ""
71617161

7162-
#: app/models/MeprOptions.php:810
7162+
#: app/models/MeprOptions.php:814
71637163
msgid "At least one Admin Email Address must be set"
71647164
msgstr ""
71657165

7166-
#: app/models/MeprOptions.php:815
7166+
#: app/models/MeprOptions.php:819
71677167
msgid "The Admin Email Address field must contain 1 or more valid email addresses"
71687168
msgstr ""
71697169

7170-
#: app/models/MeprOptions.php:968
7170+
#: app/models/MeprOptions.php:972
71717171
msgctxt "ui"
71727172
msgid "I have read and agree to the Terms of Service"
71737173
msgstr ""
71747174

7175-
#: app/models/MeprOptions.php:1486
7175+
#: app/models/MeprOptions.php:1490
71767176
msgctxt "ui"
71777177
msgid "Address Line 1"
71787178
msgstr ""
71797179

7180-
#: app/models/MeprOptions.php:1494
7180+
#: app/models/MeprOptions.php:1498
71817181
msgctxt "ui"
71827182
msgid "Address Line 2"
71837183
msgstr ""
71847184

7185-
#: app/models/MeprOptions.php:1502
7185+
#: app/models/MeprOptions.php:1506
71867186
msgctxt "ui"
71877187
msgid "City"
71887188
msgstr ""
71897189

7190-
#: app/models/MeprOptions.php:1510
7190+
#: app/models/MeprOptions.php:1514
71917191
msgctxt "ui"
71927192
msgid "Country"
71937193
msgstr ""
71947194

7195-
#: app/models/MeprOptions.php:1518
7195+
#: app/models/MeprOptions.php:1522
71967196
msgctxt "ui"
71977197
msgid "State/Province"
71987198
msgstr ""
71997199

7200-
#: app/models/MeprOptions.php:1526
7200+
#: app/models/MeprOptions.php:1530
72017201
msgctxt "ui"
72027202
msgid "Zip/Postal Code"
72037203
msgstr ""

lock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
defined('ABSPATH') || exit;
4-
53
/**
64
* File: lock.php
75
* Description: This file prevents access to static files & standalone php scripts if protected.
@@ -22,6 +20,8 @@ function mepr_lock(): void
2220
require_once($root . '/wp-config.php');
2321
}
2422

23+
defined('ABSPATH') || exit;
24+
2525
$mepr_uri = isset($_REQUEST['mepruri'])
2626
? untrailingslashit(esc_url_raw(wp_unslash($_REQUEST['mepruri'])))
2727
: esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'] ?? ''));

memberpress.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: MemberPress Pro 30 (Legacy)
55
Plugin URI: https://memberpress.com/
66
Description: The membership plugin that makes it easy to accept payments for access to your content and digital products.
7-
Version: 1.12.12
7+
Version: 1.12.14
88
Requires at least: 6.5
99
Tested up to: 6.9
1010
Requires PHP: 7.4
@@ -272,7 +272,13 @@ function mepr_on_activate(): void
272272
$mepr_options->design_enable_account_template = true;
273273
}
274274

275-
$mepr_options->setup_complete = 1;
275+
$mepr_options->setup_complete = 1;
276+
$mepr_options->activated_timestamp = time();
277+
$mepr_options->proactive_support_fresh_install = true;
278+
$mepr_options->store(false);
279+
} else {
280+
// Re-activation or edition switch: restart the proactive support delay clock
281+
// so the failed-onboarding trigger 3-day window begins from this activation.
276282
$mepr_options->activated_timestamp = time();
277283
$mepr_options->store(false);
278284
}
@@ -298,6 +304,9 @@ function mepr_on_deactivate(): void
298304

299305
$reminders_controller = new MeprRemindersCtrl();
300306
$reminders_controller->unschedule_reminders();
307+
308+
// Remove wp-cron proactive support event.
309+
wp_clear_scheduled_hook(MeprProactiveSupportCronCtrl::CRON_HOOK);
301310
}
302311

303312
register_activation_hook(MEPR_PLUGIN_SLUG, 'mepr_on_activate');

0 commit comments

Comments
 (0)