PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
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 2.3.2 2.30.0 All 255 releases
give / src / DonationForms / resources / app / utilities / mountWindowData.ts

mountWindowData.ts in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/DonationForms/resources/app/utilities/mountWindowData.ts

26 lines 870 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {useFormContext, useFormState, useWatch} from 'react-hook-form';
2 import useCurrencyFormatter from '@givewp/forms/app/hooks/useCurrencyFormatter';
3 import useDonationSummary from '@givewp/forms/app/hooks/useDonationSummary';
4 import {useDonationFormSettings} from '@givewp/forms/app/store/form-settings';
5 import useFormSubmitButton from '@givewp/forms/app/hooks/useFormSubmitButton';
6 import useFormData from '@givewp/forms/app/hooks/useFormData';
7
8 /**
9 *
10 * This mounts data to the window object, so it can be accessed by form designs and add-ons
11 *
12 * @since 3.0.0
13 */
14 export default function mountWindowData(): void {
15 window.givewp.form.hooks = {
16 useFormContext,
17 useWatch,
18 useFormState,
19 useCurrencyFormatter,
20 useDonationSummary,
21 useDonationFormSettings,
22 useFormSubmitButton,
23 useFormData
24 };
25 }
26