Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created October 19, 2016 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/8b586e670cf120fc40a803daa6d8b205 to your computer and use it in GitHub Desktop.
Save joshfeck/8b586e670cf120fc40a803daa6d8b205 to your computer and use it in GitHub Desktop.
Remove Basic Auth functionality for Event Espresso 4 core. You can use the Application Passwords plugin instead. https://wordpress.org/plugins/application-passwords/
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'plugins_loaded', 'my_remove_basic_auth_from_ee', 2 );
function my_remove_basic_auth_from_ee() {
remove_filter( 'determine_current_user', 'json_basic_auth_handler', 20 );
remove_filter( 'json_authentication_errors', 'json_basic_auth_error' );
remove_filter( 'rest_authentication_errors', 'json_basic_auth_error' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment