Server IP : 66.29.132.124 / Your IP : 18.188.218.134 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/tacafoundation.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); } }