| 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 |
|