| @@ -263,11 +263,8 @@ | ||
| 263 | 263 | // 2026-05-13). REST routes use the separate `nonce` field |
| 264 | 264 | // above with action `wp_rest` — they live in different |
| 265 | 265 | // namespaces, so a single shared nonce won't work. |
| 266 | 266 | 'consentExportNonce' => wp_create_nonce( 'doi_consent_export' ), |
| 267 | - // Setup wizard state for the dashboard card. Null on sites that | |
| 268 | - // were installed before the wizard existed. | |
| 269 | - 'setup' => $this->setupState(), | |
| 270 | 267 | ); |
| 271 | 268 | |
| 272 | 269 | /** |
| 273 | 270 | * Filter the admin SPA configuration data. |
| @@ -294,24 +291,8 @@ | ||
| 294 | 291 | * |
| 295 | 292 | * @param string $from Entry point recorded on the link. |
| 296 | 293 | * @param string $fallback Used when core/feedback.php is not loaded. |
| 297 | 294 | */ |
| 298 | - /** | |
| 299 | - * @return array{status: string, step: int, steps: int}|null | |
| 300 | - */ | |
| 301 | - private function setupState(): ?array { | |
| 302 | - $state = new \Forge12\DoubleOptIn\Setup\SetupState(); | |
| 303 | - if ( ! $state->exists() ) { | |
| 304 | - return null; | |
| 305 | - } | |
| 306 | - $current = $state->get(); | |
| 307 | - return array( | |
| 308 | - 'status' => $current['status'], | |
| 309 | - 'step' => $current['step'], | |
| 310 | - 'steps' => \Forge12\DoubleOptIn\Setup\SetupState::STEPS, | |
| 311 | - ); | |
| 312 | - } | |
| 313 | - | |
| 314 | 295 | private function productUrl( string $from, string $fallback ): string { |
| 315 | 296 | $fn = '\\forge12\\contactform7\\CF7DoubleOptIn\\get_product_url'; |
| 316 | 297 | |
| 317 | 298 | return function_exists( $fn ) ? esc_url_raw( $fn( $from ) ) : $fallback; |