Skip to content

Commit

Permalink
fix: improve logic to detect v2 donation form edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Feb 7, 2024
1 parent 966a967 commit 2193d15
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public function __invoke()
return;
}

$isDonationFormPage = isset($_GET['give_tab']) && $_GET['give_tab'] !== 'stripe_form_account_options';
$isSettingPage = isset($_GET['tab'], $_GET['tab'])
$isDonationFormPage = isset($_GET['give_tab'], $_GET['post_type'])
&& $_GET['post_type'] === 'give_forms'
&& $_GET['give_tab'] !== 'stripe_form_account_options';
$isSettingPage = isset($_GET['post_type'], $_GET['page'], $_GET['tab'], $_GET['section'])
&& $_GET['post_type'] === 'give_forms'
&& $_GET['page'] === 'give-settings'
&& Give_Admin_Settings::is_setting_page('gateways', 'stripe-settings');

// Exit if admin is not redirect to the GiveWP settings page or donation form page.
Expand Down

0 comments on commit 2193d15

Please sign in to comment.