>', 'wpseo_manage_options', self::PAGE, static function () { echo 'redirecting...'; }, ]; return $pages; } /** * Redirects to the yoast.com. * * @return void */ public function do_redirect(): void { if ( $this->current_page_helper->get_current_yoast_seo_page() !== self::PAGE ) { return; } $link = $this->shortlinker->build_shortlink( 'https://yoa.st/wordpress-menu-upgrade-premium' ); if ( $this->woocommerce_conditional->is_met() ) { $link = $this->shortlinker->build_shortlink( 'https://yoa.st/wordpress-menu-upgrade-woocommerce' ); } \wp_redirect( $link );//phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- Safe redirect is used here. exit; } }
Fatal error: Uncaught Error: Class "WPSEO_Shortlinker" not found in /htdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php:143 Stack trace: #0 /htdocs/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php(20): WPSEO_Admin_Bar_Menu->__construct() #1 /htdocs/wp-includes/class-wp-hook.php(324): wpseo_initialize_admin_bar('') #2 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /htdocs/wp-settings.php(749): do_action('wp_loaded') #5 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php on line 143