wp_create_nonce('sodino_search_products'), ]); } }); // Handle delete for any Sodino admin page if (isset($_GET['page']) && strpos($_GET['page'], 'sodino') === 0 && isset($_GET['action']) && $_GET['action'] === 'delete') { add_action('admin_init', [$adminController, 'handleDelete']); } // Handle upsell actions if (isset($_GET['page']) && strpos($_GET['page'], 'sodino') === 0 && isset($_GET['action']) && in_array($_GET['action'], ['delete_upsell', 'toggle_upsell_status'], true)) { add_action('admin_init', [$adminController, 'handleUpsellActions']); }