PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
← All changes | src/DonationForms/resources/app/utilities/handleValidationRequest.ts +3 -1 4.16.2 → 4.18.0 View file →
@@ -5,10 +5,12 @@
5 5 import {__} from '@wordpress/i18n';
6 6 import {FieldValues, UseFormSetError} from 'react-hook-form';
7 7 import postFormData from '@givewp/forms/app/utilities/postFormData';
8 8 import convertValuesToFormData from '@givewp/forms/app/utilities/convertValuesToFormData';
9 +import {getAuthToken} from '@givewp/forms/app/utilities/authToken';
9 10
10 11 /**
12 + * @since 4.17.0 Send the auth token so embedded forms stay signed in without cookies
11 13 * @since 3.0.0
12 14 */
13 15 export default async function handleValidationRequest(
14 16 validateUrl: string,
@@ -25,9 +27,9 @@
25 27 });
26 28 }
27 29
28 30 try {
29 - const formData = convertValuesToFormData(values);
31 + const formData = convertValuesToFormData({...values, authToken: getAuthToken()});
30 32
31 33 const {response} = await postFormData(validateUrl, formData);
32 34
33 35 const formResponse = await response.json();