import {__, sprintf} from '@wordpress/i18n'; import ModalDialog from '@givewp/components/AdminUI/ModalDialog'; import {CheckVerified, StarsIcon} from '@givewp/components/AdminUI/Icons'; import Button from '@givewp/components/AdminUI/Button'; import styles from '../style.module.scss'; import {createInterpolateElement} from '@wordpress/element'; export default function FeatureNoticeDialog({isUpgrading, isEditing, handleClose}) { const {supportedAddons, supportedGateways, migrationApiRoot, apiNonce} = window.GiveDonationForms; const handleUpgrade = async () => { // @ts-ignore const response = await fetch(migrationApiRoot + '/' + window.give_vars.post_id, { method: 'post', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': apiNonce, }, }); const data = await response.json(); if (response.ok) { window.location = data.redirect; } else { alert('Error migrating form'); } }; // @note the ) : ( )}
{__('Read more on Add-ons and Gateways compatibility', 'give')}
); }