Fix: missing Landing Page for the campaign created during the onboarding wizard #7769
+32
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves GIVE-2282
Description
This PR moves the logic to create a new campaign landing page from the
CampaignRequestController.php
file to thegivewp_campaign_created
hook which is proper because this way we can have the landing page created and attached to the campaign automatically when using theCampaign::create()
method. So these changes fix the bug that was creating the campaign on the onboarding wizard without a campaign landing page attached to it.Affects
The campaign creation workflow and the campaign creation on the onboarding wizard.
Visuals
This PR fixes this bug:
https://www.loom.com/share/d6800929b2fd4f7f9082d4a86a9ef79f?sid=d37c73d1-8dc6-437b-9cfa-274dd55a8994
Testing Instructions
Give > Settings > Advanced > Setup Page
option and delete all your campaigns/forms directly on DB.wp-admin/edit.php
page.Pre-review Checklist
@unreleased
tags included in DocBlocks