Skip to content

Commit 07590eb

Browse files
committed
Merge branch 'release/4.14.2'
2 parents 523aede + 5e6eb17 commit 07590eb

File tree

26 files changed

+508
-57
lines changed

26 files changed

+508
-57
lines changed

assets/src/css/frontend/form-grid.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ $MIN_REM_SIZE: 16px;
107107
font-weight: 400;
108108
}
109109

110-
& > button {
110+
& > button,
111+
& > .give-card__button {
111112
background-color: transparent!important;
112113
padding: 0 !important;
113114
border: none;

give.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
77
* Author: GiveWP
88
* Author URI: https://givewp.com/
9-
* Version: 4.14.1
9+
* Version: 4.14.2
1010
* Requires at least: 6.6
1111
* Requires PHP: 7.4
1212
* Text Domain: give
@@ -425,7 +425,7 @@ private function setup_constants()
425425
{
426426
// Plugin version.
427427
if (!defined('GIVE_VERSION')) {
428-
define('GIVE_VERSION', '4.14.1');
428+
define('GIVE_VERSION', '4.14.2');
429429
}
430430

431431
// Plugin Root File.

readme.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: donation, donate, recurring donations, fundraising, crowdfunding
55
Requires at least: 6.6
66
Tested up to: 6.9
77
Requires PHP: 7.4
8-
Stable tag: 4.14.1
8+
Stable tag: 4.14.2
99
License: GPLv3
1010
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1111

@@ -274,6 +274,15 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
274274

275275
== Changelog ==
276276

277+
= 4.14.2: February 25th, 2026 =
278+
* Enhancement: Added form migration and campaign compatibility for P2P.
279+
* Fix: Resolved an accessibility issue with the Form Grid Block where screen readers announced all nested content as a single links
280+
* Fix: Resolved an accessibility issue with buttons on the View Subscription screen on Donor Dashboard page
281+
* Fix: Resolved an issue with the Donation Form modal when opened in a mobile device
282+
* Fix: Resolved an issue with emailTags not being assigned to block fields
283+
* Fix: Resolved an issue with the Donor Confirmation header and description colors on changing text
284+
* Fix: Resolved an issue where campaign default form title didn’t match campaign name
285+
277286
= 4.14.1: February 11th, 2026 =
278287
* Fix: Resolved an issue with the Stripe refunded webhook
279288
* Fix: Resolved an issue with importing Subscriptions without a donor_id

src/Campaigns/Actions/CreateDefaultCampaignForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
class CreateDefaultCampaignForm
1919
{
2020
/**
21+
* @since 4.14.2 add formTitle to FormSettings
2122
* @since 4.2.0 return if campaign already has default form set
2223
* @since 4.1.0 Added inheritCampaignColors property to FormSettings
2324
* @since 4.0.0
@@ -34,6 +35,7 @@ public function __invoke(Campaign $campaign)
3435
'title' => $campaign->title,
3536
'status' => DonationFormStatus::PUBLISHED(),
3637
'settings' => FormSettings::fromArray([
38+
'formTitle' => $campaign->title,
3739
'showHeader' => false,
3840
'enableDonationGoal' => false,
3941
'goalAmount' => $campaign->goal,

src/Campaigns/Actions/RedirectLegacyCreateFormToCreateCampaign.php

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Give\Campaigns\Actions;
44

55
use Give\Campaigns\Models\Campaign;
6-
use Give\Campaigns\ValueObjects\CampaignType;
76
use Give\Framework\Database\DB;
87

98
/**
@@ -91,23 +90,67 @@ private function isCampaignIdInvalidOrMissing(): bool
9190
}
9291

9392
/**
93+
* @since 4.14.2 updated logic to search the DB explicitly for P2P campaigns
9494
* @since 4.0.0
9595
*/
9696
private function isP2PCampaignFormIdInvalidOrMissing(): bool
9797
{
98-
$form = DB::table('give_campaigns')
99-
->where('form_id', $_GET['donationFormID'])
100-
->where('campaign_type', CampaignType::CORE, '!=')
98+
if (!isset($_GET['donationFormID'])) {
99+
return true;
100+
}
101+
102+
$formId = absint($_GET['donationFormID']);
103+
104+
// Check give_campaigns.form_id for P2P campaigns
105+
$campaign = DB::table('give_campaigns', 'c')
106+
->select('c.id')
107+
->innerJoin('give_p2p_campaigns', 'c.id', 'p2p.campaign_id', 'p2p')
108+
->where('c.form_id', $formId)
101109
->get();
102110

103-
return ! isset($_GET['donationFormID']) || ! $form;
111+
if ($campaign) {
112+
return false;
113+
}
114+
115+
// Also check give_campaign_forms junction table for P2P campaigns
116+
// (migrated v3 forms are stored in the junction table)
117+
$campaignForm = DB::table('give_campaign_forms')
118+
->where('form_id', $formId)
119+
->get();
120+
121+
if ($campaignForm) {
122+
$p2pCampaign = DB::table('give_p2p_campaigns')
123+
->where('campaign_id', $campaignForm->campaign_id)
124+
->get();
125+
126+
return !$p2pCampaign;
127+
}
128+
129+
return true;
104130
}
105131

106132
/**
133+
* @since 4.14.2 Also check give_campaign_forms junction table for non-core campaigns (e.g., migrated P2P forms).
107134
* @since 4.0.0
108135
*/
109136
private function isCampaignFormIdInvalidOrMissing(): bool
110137
{
111-
return ! isset($_GET['donationFormID']) || ! Campaign::findByFormId(absint($_GET['donationFormID']));
138+
if (!isset($_GET['donationFormID'])) {
139+
return true;
140+
}
141+
142+
$formId = absint($_GET['donationFormID']);
143+
144+
// Check core campaigns first
145+
if (Campaign::findByFormId($formId)) {
146+
return false;
147+
}
148+
149+
// Fallback: check give_campaign_forms junction table for non-core campaigns
150+
$campaignForm = DB::table('give_campaign_forms')
151+
->where('form_id', $formId)
152+
->get();
153+
154+
return !$campaignForm;
112155
}
113156
}

src/Campaigns/Blocks/shared/components/ModalForm/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
top: 0;
3434
left: 0;
3535
width: 100vw;
36-
height: var(--visual-viewport-height);
36+
height: 100dvh;
3737
background: rgba(0 0 0 / .7);
3838
display: flex;
3939
flex-direction: column;

src/DonationForms/Actions/ConvertDonationFormBlocksToFieldsApi.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ protected function createNodeFromConsentBlock(BlockModel $block, int $blockIndex
392392
}
393393

394394
/**
395+
* @since 4.14.2 add emailTag to field
395396
* @since 3.4.1 updated to be field specific and prevent overwriting of existing values
396397
* @since 3.0.0
397398
*/
@@ -420,6 +421,10 @@ protected function mapGenericBlockAttributesToField(BlockModel $block, Field $fi
420421
$field->showInReceipt($block->getAttribute('displayInReceipt'));
421422
}
422423

424+
if ($block->hasAttribute('emailTag') && method_exists($field, 'emailTag')) {
425+
$field->emailTag($block->getAttribute('emailTag'));
426+
}
427+
423428
return $field;
424429
}
425430

src/DonationForms/V2/DonationFormsAdminPage.php

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Give\Campaigns\Models\Campaign;
77
use Give\DonationForms\V2\ListTable\DonationFormsListTable;
88
use Give\FeatureFlags\OptionBasedFormEditor\OptionBasedFormEditor;
9+
use Give\FormMigration\Actions\GetMigratedFormId;
910
use Give\Helpers\EnqueueScript;
1011
use Give\Helpers\Language;
1112
use Give\Framework\Permissions\Facades\UserPermissions;
@@ -168,6 +169,36 @@ public function loadMigrationScripts()
168169
if ($this->isShowingEditV2FormPage()) {
169170
$formId = (int)$_GET['post'];
170171
$campaign = Campaign::findByFormId($formId);
172+
$isMigrated = _give_is_form_migrated($formId);
173+
174+
$campaignUrl = $campaign
175+
? admin_url('edit.php?post_type=give_forms&page=give-campaigns&id=' . $campaign->id)
176+
: '';
177+
178+
/**
179+
* Filters the campaign URL displayed on the v2 form edit screen.
180+
* Allows add-ons (e.g., P2P) to provide their own campaign URL.
181+
*
182+
* @since 4.14.2
183+
*
184+
* @param string $campaignUrl The campaign admin URL, or empty string if not found.
185+
* @param int $formId The donation form ID being edited.
186+
*/
187+
$campaignUrl = apply_filters('givewp_form_builder_campaign_url', $campaignUrl, $formId);
188+
189+
$migratedFormUrl = '';
190+
if ($isMigrated) {
191+
$v3FormId = (new GetMigratedFormId)($formId);
192+
if ($v3FormId) {
193+
$migratedFormUrl = add_query_arg([
194+
'post_type' => 'give_forms',
195+
'page' => 'givewp-form-builder',
196+
'donationFormID' => $v3FormId,
197+
'showTransfer' => '1',
198+
], admin_url('edit.php'));
199+
}
200+
}
201+
171202
EnqueueScript::make('give-edit-v2form', 'build/assets/dist/js/give-edit-v2form.js')
172203
->loadInFooter()
173204
->registerTranslations()
@@ -176,8 +207,9 @@ public function loadMigrationScripts()
176207
'supportedGateways' => $this->getSupportedGateways(),
177208
'migrationApiRoot' => $this->migrationApiRoot,
178209
'apiNonce' => $this->apiNonce,
179-
'isMigrated' => _give_is_form_migrated($formId),
180-
'campaignUrl' => $campaign ? admin_url('edit.php?post_type=give_forms&page=give-campaigns&id=' . $campaign->id) : '',
210+
'isMigrated' => $isMigrated,
211+
'migratedFormUrl' => $migratedFormUrl,
212+
'campaignUrl' => $campaignUrl,
181213
])
182214
->enqueue();
183215

src/DonationForms/V2/resources/components/DonationFormsListTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ declare global {
2929
pluginUrl: string;
3030
showUpgradedTooltip: boolean;
3131
isMigrated: boolean;
32+
migratedFormUrl: string;
3233
supportedAddons: Array<string>;
3334
supportedGateways: Array<string>;
3435
isOptionBasedFormEditorEnabled: boolean;

src/DonationForms/V2/resources/components/Onboarding/Components/EditForm.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export default function EditForm() {
1212
upgrading: false
1313
});
1414

15+
const {isMigrated, migratedFormUrl} = window.GiveDonationForms;
16+
1517
return (
1618
<>
1719
<FormBuilderButtonPortal
@@ -21,7 +23,28 @@ export default function EditForm() {
2123
isEditing={true}
2224
/>
2325

24-
{!window.GiveDonationForms.isMigrated && (
26+
{isMigrated && migratedFormUrl ? (
27+
<div className={styles.migrationGuideBox}>
28+
<div className={styles.migrationGuideTitle}>
29+
<CompassIcon />
30+
{__('Upgrade in Progress', 'give')}
31+
</div>
32+
33+
<div className={styles.migrationGuideContent}>
34+
{__('This form has been upgraded to the Visual Form Builder. Complete the transfer to finalize the upgrade.', 'give')}
35+
</div>
36+
37+
<Button
38+
onClick={(e) => {
39+
e.preventDefault();
40+
window.location.href = migratedFormUrl;
41+
}}
42+
style={{width: '100%'}}
43+
>
44+
{__('Continue editing upgraded form', 'give')}
45+
</Button>
46+
</div>
47+
) : !isMigrated && (
2548
<div className={styles.migrationGuideBox}>
2649
<div className={styles.migrationGuideTitle}>
2750
<CompassIcon />

0 commit comments

Comments
 (0)