Title: Undefined constant &#8220;WP2FA\Admin\Views\php&#8221;
Last modified: January 25, 2022

---

# Undefined constant “WP2FA\Admin\Views\php”

 *  Resolved [horrorfacts](https://wordpress.org/support/users/horrorfacts/)
 * (@horrorfacts)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/)
 * Hey, thanks so much for the plugin its been working good for a few months now,
   but today when I navigate to the 2FA panel on the wordpress site its giving an
   error and the wordpress recovery email was also sent.
 *     ```
       WordPress version 5.8.3
       Current theme: GeneratePress (version 3.1.1)
       Current plugin: WP 2FA - Two-factor authentication for WordPress (version 2.1.0)
       PHP version 8.0.14
   
       Error Details
       =============
       An error of type E_ERROR was caused in line 94 of the file /wp-content/plugins/wp-2fa/includes/classes/Admin/Views/FirstTimeWizardSteps.php. Error message: Uncaught Error: Undefined constant "WP2FA\Admin\Views\php" in /wp-content/plugins/wp-2fa/includes/classes/Admin/Views/FirstTimeWizardSteps.php:94
   
       Stack trace:
       #0 /wp-content/plugins/wp-2fa/includes/classes/Admin/SettingsPages/class-settings-page-policies.php(601): WP2FA\Admin\Views\FirstTimeWizardSteps::select_method()
       #1 /wp-content/plugins/wp-2fa/includes/classes/Admin/SettingsPages/class-settings-page-policies.php(124): WP2FA\Admin\SettingsPages\Settings_Page_Policies->select_method_setting()
       #2 /wp-includes/class-wp-hook.php(303): WP2FA\Admin\SettingsPages\Settings_Page_Policies->render()
       #3 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /wp-admin/admin.php(259): do_action()
       #6 {main}
       thrown
       ```
   
 * Not sure what the issue is but that is what is happening.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15291983)
 * Hello [@horrorfacts](https://wordpress.org/support/users/horrorfacts/)
 * Thank you very much for using our plugin.
 * I am sorry to read about your issue, but we already identified the problem and
   have a fix. Can you please install [this version of the plugin]([https://www.wpwhitesecurity.com/downloads/support/20220117_wp-2fa.zip](https://www.wpwhitesecurity.com/downloads/support/20220117_wp-2fa.zip))?
 * This fixes a small edge case issue we have in some cases with plugin installs
   on PHP 8+.
 * Please keep us posted.
 *  Thread Starter [horrorfacts](https://wordpress.org/support/users/horrorfacts/)
 * (@horrorfacts)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15292211)
 * Thank you for the update
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15294877)
 * You’re welcome. Please let us know if there is anything else we can assist you
   with. Also, don’t forget to spare a minute to [rate our plugin and service](https://wordpress.org/support/plugin/wp-2fa/reviews/).
   These ratings really help us.
 *  [thalakus](https://wordpress.org/support/users/thalakus/)
 * (@thalakus)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15335782)
 * Hello [@robert681](https://wordpress.org/support/users/robert681/) I got the 
   same error once:
    03.02.2022 16:37:40 PHP Warning: Use of undefined constant 
   php – assumed ‘php’ (this will throw an Error in a future version of PHP) in /
   wp-content/plugins/wp-2fa/includes/classes/Admin/Views/FirstTimeWizardSteps.php
   on line 94
 * It’s no problem for me now, so I prefer not to install the plugin manually but
   only via the official WordPress-updater because it’s more comfortable 🙂
 * Since it’s not urgent, I’m just curious: Will this fix be rolled out the next
   days officially on your plugin?
 * Have a great start in the new week 🙂
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15339913)
 * Hello [@thalakus](https://wordpress.org/support/users/thalakus/)
 * Thank you for using our plugin. We are currently working on the next update of
   the plugin. However, at this stage we do not have any date in mind of when the
   next update will be available, sorry.
 * Should you have any other questions, do not hesitate to ask.
 * Have a great day.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Undefined constant “WP2FA\Admin\Views\php”’ is closed to new replies.

 * ![](https://ps.w.org/wp-2fa/assets/icon-256x256.png?rev=2961533)
 * [WP 2FA - Two-factor authentication for WordPress](https://wordpress.org/plugins/wp-2fa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-2fa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-2fa/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-2fa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-2fa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-2fa/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [robertabela](https://wordpress.org/support/users/robert681/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/undefined-constant-wp2faadminviewsphp/#post-15339913)
 * Status: resolved