Wrap your function in if( ! function_exists( 'wp_authenticate' ) )
to get rid of the error and successfully activate your plugin:
if( ! function_exists( 'wp_authenticate' ) ){
function wp_authenticate(){}
}
This is necessary because in the context of activating a plugin, the function does already exist, only after it is activated will your plugin load first and override the original in pluggable.php
. Plugins are activated in a sandbox to capture any fatal errors which may prevent activation and successful recovery to a working state.
Related Posts:
- How to redirect to settings page once the plugin is activated?
- How to output message during plugin activation
- Prevent network activation of plugin
- Inserting Taxonomy Terms During a Plugin Activation?
- How do I “replace a function via plugins” in WordPress?
- Using wp_cron with custom time interval and the register activation hook
- function triggered by “manage_users_custom_column” filter not working
- Overwriting Core WordPress Functions with Plugins
- Call activation hook multiple times
- Only allow plugin to be activated on root site of multisite
- Problems with removing admin bar
- why creating tables using $wpdb is not being executed while installing plugins?
- Plugin activation error due to unexpected output
- Do I have to override the wp_mail() pluggable function with writing a plugin?
- Settings not set after calling register_setting()
- override pluggable.php functions
- Insert terms for custom taxonomy on plugin activation, or each page load (init hook)
- Add Link Category on Activation?
- WordPress Plugin Activate / Deactive Failing
- Multiple array for post_content on plugin activation
- Class cannot be found, but it’s available in the file, I get: Fatal Error: Uncaught Error: Class ‘Blocks\Base\Activation’ not found
- Plugin can’t be activated [closed]
- Clean way to initialize plugin in newly-added site when plugin has been network activated?
- Activate / Deactivate plugin
- Adding tables to dashboard pages programmatically?
- WordPress Fatal error: Uncaught Error: Call to undefined function dbDelta()
- Custom Plugin activation error in Multisite
- How to store in the database directly the translation?
- Unable to show a message after plugin activation
- Refresh or redirect page after activate my plugin
- I can install my plugin in localhost but not in my server
- WordPress plugin tables become corrupt
- Deactivate plugin on registration
- how can a plugin return an error message on activation?
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- plugabble wp_authenticate function not works from wp-login.php
- My activator class isn’t running the code inside
- Is there any plugin development framework
- How do I add CSS options to my plugin without using inline styles?
- How to override existing plugin action with new action
- How do I create links at the top of WP_List_table?
- Why Does get_posts() Return an Empty Set?
- Get list of available wordpress actions
- Where to enqueue stylesheets for plugin?
- How can i list current author’s categories?
- stray elements
- Deletion of shared options using uninstall.php
- Plugin Settings not Saving on Ajax re-ordered table
- Add Post and Comments menu no longer visible
- Handling form request from plugin file
- Timeout on Admin-Ajax?
- Is there a way to verified if an add_filter is already applied?
- Rearranging Dashboard meta boxes with use of plugin/functions.php
- Finding the paragraphs in content
- When I deactive WooCommerce Plugin, I want to take a action in My plugin
- Create a custom display order in the main menu
- Override the default Add/Edit site forms of the Network Panel in custom plugin
- add more custom post types and custom role to the code
- Executing a function upon webhook calling wordpress
- A better way to include localized labels in WordPress plugins
- How a deprecated function can crash WordPress site while upgrading
- Clearing caches on plugin uninstall
- plugin settings – uploading multiple files with a single button
- Getting term_id for newly created or edited term
- How to insert text at the current cursor position in Gutenberg?
- How to fix this URL error in WordPress ” data-wplink-url-error=”true”>
- Remove unwanted elements for a wp_nav_menu
- Edit Images From the Front End without Access to WP Admin
- How to remove or add submenu item on plugin activate or deactive
- how to add stylesheet to particular plugin only?
- Difference between wp_salt schemes
- WordPress daily cron is executing more frequently than once a day
- How can I replace the search results displayed by WordPress?
- What is the best way to store a few fields?
- I18n not working in plugin
- making a plugin that moves other plugins wp_head actions to wp_footer
- How to redirect to login page when user not loggedin on a particular page
- Non editable custom taxonomy
- How to resize WordPress images on upload to specific height and width without cropping it
- Get section of input passed to the sanitize_callback
- Checking for existing title in custom db query not working
- How to add a new taxonomy link to the admin menu
- Many Single Sites, One Plugin directory – adjust plugins_url()
- insufficient permissions; coding an action for plugin governed by custom capability
- My plugin creates custom widgets, How can I programatically add them to existing sidebar widget areas?
- How to know if current plugin is going to be used while rendering the page?
- Dynamically modify content added to table via javascript
- functions won’t fire after I converted my code from procedural code to OOP
- CPT UI and custom database table
- Updating a WP Plugin SVN not showing on WordPress Website or Zip
- Download stopped working in 4.7.4
- $wpdb Mysql trigger problem
- How to add chunk of php, html, and sql code to variable an append to $content
- edit-tags.php in plugin admin menu hides when is the active page
- WordPress postboxes On Tabbed Views and Hiding Registered Pages
- Best way to handle a form post in plugin
- Yet another wp_insert_post infinite loop. What is wrong?
- Why does this fail: Disabling plugins enqueue_script() in functions.php
- Remove text from confirmation message
- Can I use an array to create multiple tables?