FormFields
2 years ago
FormTemplate
2 years ago
DonationGoal.php
2 years ago
DonationOptions.php
2 years ago
EmailSettings.php
2 years ago
FeeRecovery.php
2 years ago
FormFieldManager.php
2 years ago
FormFields.php
2 years ago
FormGrid.php
2 years ago
FormMeta.php
2 years ago
FormTitle.php
2 years ago
MigrateMeta.php
2 years ago
OfflineDonations.php
2 years ago
PaymentGateways.php
2 years ago
PdfSettings.php
2 years ago
RecurringDonationOptions.php
2 years ago
TermsAndConditions.php
2 years ago
TermsAndConditions.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\FormMigration\Steps; |
| 4 | |
| 5 | use Give\FormMigration\Concerns\Blocks\BlockFactory;; |
| 6 | use Give\FormMigration\Contracts\FormMigrationStep; |
| 7 | |
| 8 | class TermsAndConditions extends FormMigrationStep |
| 9 | { |
| 10 | public function canHandle(): bool |
| 11 | { |
| 12 | return $this->formV2->isTermsEnabled(); |
| 13 | } |
| 14 | |
| 15 | public function process() |
| 16 | { |
| 17 | $this->fieldBlocks->insertAfter('givewp/payment-gateways', BlockFactory::termsAndConditions([ |
| 18 | 'checkboxLabel' => $this->formV2->getTermsAgreementLabel(), |
| 19 | 'agreementText' => $this->formV2->getTermsAgreementText(), |
| 20 | ])); |
| 21 | } |
| 22 | } |
| 23 |