Skip to content

Commit

Permalink
refactor: Update redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnson committed Aug 26, 2024
1 parent c42bfe7 commit 3cf2bf9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Campaigns/Actions/EditCampaignPageRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ class EditCampaignPageRedirect
*/
public function __invoke()
{
$campaign = Campaign::find(
// @TODO (Maybe) refactor to request object.
isset($_GET['campaign_id']) ? absint($_GET['campaign_id']) : 0
);
// $campaign = Campaign::find(
// // @TODO (Maybe) refactor to request object.
// isset($_GET['campaign_id']) ? absint($_GET['campaign_id']) : 0
// );

$page = $campaign->page ?: CampaignPage::create([
$page = /*$campaign->page ?:*/ CampaignPage::create([
// TODO: Add default attributes.
]);

wp_redirect($page->getEditLinkUrl());
wp_safe_redirect($page->getEditLinkUrl(), 303);
exit();
}
}

0 comments on commit 3cf2bf9

Please sign in to comment.