????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.87 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././home/tempvsty/pontiacques.org/wp-content/plugins/give/src/FormMigration/Steps/ |
Upload File : |
<?php
namespace Give\FormMigration\Steps;
use Give\FormMigration\Contracts\FormMigrationStep;
use Give\Framework\Blocks\BlockModel;
class GiftAid extends FormMigrationStep
{
/**
* @since 3.4.0
*
* @return void
*/
public function process()
{
$giftAidStatus = $this->formV2->getGiftAidStatus();
$useGlobalSettings = $giftAidStatus === 'global';
if (empty($giftAidStatus) || (
$useGlobalSettings === true &&
!give_is_setting_enabled(give_get_option('give_gift_aid_enable_disable', 'disabled'))
) || !in_array($giftAidStatus, ['enabled', 'global'], true)) {
return;
}
$giftAidSettings = [
'useGlobalSettings' => $useGlobalSettings,
'title' => $this->formV2->getGiftAidTitle(),
'description' => $this->formV2->getGiftAidDescription(),
'longExplanationEnabled' => $this->formV2->getGiftAidLongExplanationEnabled(),
'linkText' => __('Tell me more', 'give-gift-aid'),
'modalHeader' => __('What is Gift Aid?', 'give-gift-aid'),
'longExplanation' => $this->formV2->getGiftAidLongExplanation(),
'checkboxLabel' => $this->formV2->getGiftAidCheckboxLabel(),
'agreementText' => $this->formV2->getGiftAidAgreementText(),
'declarationForm' => $this->formV2->getGiftAidDeclarationForm(),
];
$giftAidBlock = BlockModel::make([
'name' => 'givewp-gift-aid/gift-aid',
'attributes' => $giftAidSettings,
]);
$this->fieldBlocks->insertAfter('givewp/donation-amount', $giftAidBlock);
}
}