Skip to content

Commit

Permalink
refactor: use canHandle method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ante Laca committed Mar 25, 2024
1 parent 6ea2c6c commit 8adabbe
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/FormMigration/Steps/DoubleTheDonation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ class DoubleTheDonation extends FormMigrationStep
/**
* @unreleased
*/
public function process()
public function canHandle(): bool
{
if ($this->formV2->getDoubleTheDonationStatus() !== 'enabled') {
return;
}
return $this->formV2->getDoubleTheDonationStatus() === 'enabled';
}

/**
* @unreleased
*/
public function process()
{
$block = BlockModel::make([
'name' => 'givewp/dtd',
'attributes' => [
Expand Down

0 comments on commit 8adabbe

Please sign in to comment.