FormFields
2 years ago
FormTemplate
2 years ago
ActiveCampaign.php
2 years ago
ConstantContact.php
2 years ago
ConvertKit.php
2 years ago
CurrencySwitcher.php
2 years ago
DonationGoal.php
2 years ago
DonationOptions.php
2 years ago
DoubleTheDonation.php
2 years ago
EmailSettings.php
2 years ago
FeeRecovery.php
2 years ago
FormExcerpt.php
2 years ago
FormFeaturedImage.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
FundsAndDesignations.php
2 years ago
GiftAid.php
2 years ago
Mailchimp.php
2 years ago
MigrateMeta.php
2 years ago
OfflineDonations.php
2 years ago
PaymentGateways.php
2 years ago
PdfSettings.php
2 years ago
PerFormGateways.php
2 years ago
RazorpayPerFormSettings.php
1 year ago
RecurringDonationOptions.php
2 years ago
TermsAndConditions.php
2 years ago
OfflineDonations.php
26 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 OfflineDonations extends FormMigrationStep |
| 9 | { |
| 10 | public function canHandle(): bool |
| 11 | { |
| 12 | return $this->formV2->isOfflineDonationsCustomized(); |
| 13 | } |
| 14 | |
| 15 | public function process() |
| 16 | { |
| 17 | if($this->formV2->isOfflineDonationsBillingFieldEnabled()) { |
| 18 | $this->fieldBlocks->findParentByChildName('givewp/payment-gateways') |
| 19 | ->innerBlocks->append(BlockFactory::billingAddress()); |
| 20 | } |
| 21 | |
| 22 | // @todo Map donation instructions to v3 form. |
| 23 | $this->formV3->settings->offlineDonationInstructions = $this->formV2->getOfflineDonationInstructions(); |
| 24 | } |
| 25 | } |
| 26 |