← All changes
|
src/DonationForms/resources/app/utilities/handleFormSubmitRequest.ts
+3
-0
4.16.2
→
4.18.0
View file →
| @@ -12,10 +12,12 @@ | ||
| 12 | 12 | import handleRedirect from '@givewp/forms/app/utilities/handleFormRedirect'; |
| 13 | 13 | import getCurrentFormUrlData from '@givewp/forms/app/utilities/getCurrentFormUrlData'; |
| 14 | 14 | import postFormData from '@givewp/forms/app/utilities/postFormData'; |
| 15 | 15 | import convertValuesToFormData from '@givewp/forms/app/utilities/convertValuesToFormData'; |
| 16 | +import {getAuthToken} from '@givewp/forms/app/utilities/authToken'; | |
| 16 | 17 | |
| 17 | 18 | /** |
| 19 | + * @since 4.17.0 Send the auth token so embedded forms stay signed in without cookies | |
| 18 | 20 | * @since 3.22.0 Add locale support |
| 19 | 21 | */ |
| 20 | 22 | export default async function handleSubmitRequest( |
| 21 | 23 | values, |
| @@ -41,8 +43,9 @@ | ||
| 41 | 43 | originUrl, |
| 42 | 44 | isEmbed, |
| 43 | 45 | embedId, |
| 44 | 46 | locale, |
| 47 | + authToken: getAuthToken(), | |
| 45 | 48 | }; |
| 46 | 49 | |
| 47 | 50 | const formData = convertValuesToFormData(formValues); |
| 48 | 51 | |