';
+ }
+ }
/**
* Save settings submitted via the Paywall Settings page.
*/
diff --git a/paybutton.php b/paybutton.php
index 7bd48f3..b6b18a6 100644
--- a/paybutton.php
+++ b/paybutton.php
@@ -64,3 +64,14 @@
// Initialize AJAX handlers.
new PayButton_AJAX();
}, 1); // Use a priority to ensure this runs before other actions that might depend on session data.
+
+add_action('admin_init', function() {
+ if (get_option('paybutton_activation_redirect', false)) {
+ delete_option('paybutton_activation_redirect');
+ // Prevent redirect during bulk plugin activation
+ if (!isset($_GET['activate-multi'])) {
+ wp_redirect(admin_url('admin.php?page=paybutton-paywall'));
+ exit;
+ }
+ }
+});
\ No newline at end of file
diff --git a/templates/admin/paywall-settings.php b/templates/admin/paywall-settings.php
index c54d209..d1142f7 100644
--- a/templates/admin/paywall-settings.php
+++ b/templates/admin/paywall-settings.php
@@ -11,12 +11,17 @@