I have a code to link our students users with the wp-user. It was working without problems, and creating wp users without problems, but between July 29th and June 2nd, I think some plugin have been updated and now I can't edit passwords or create useres from my php code. It looks like Wordpress is working fine but my code not.
require_once $_SERVER["DOCUMENT_ROOT"] . '/wp-load.php';
require_once $_SERVER["DOCUMENT_ROOT"] . '/wp-config.php';
require_once $_SERVER['DOCUMENT_ROOT'] . "/wp-includes/formatting.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/wp-includes/user.php";
wp_set_password($password, $id);
this code returns an error.
Fatal error: Uncaught Error: Call to a member function add_query_var() on string in /var/app/current/wordpress-beanstalk/wp-includes/class-wp-taxonomy.php:460
Stack trace:
#0 /var/.../wp-includes/taxonomy.php(441): WP_Taxonomy->add_rewrite_rules()
#1 /var/.../wp-includes/taxonomy.php(79): register_taxonomy('category', 'post', Array)
#2 /var/.../wp-settings.php(375): create_initial_taxonomies()
#3 /var/.../wp-config.php(36): require_once('/var/app/curren...')
#4 /var/.../api/wp.php(6): require_once('/var/app/curren...')
#5 /var/.../api/customers/changepassword.php(22): updateWpPassword('********', '3')
#6 {main} thrown in /var/app/current/wordpress-beanstalk/wp-includes/class-wp-taxonomy.php on line 460
Notice: is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/app/current/wordpress-beanstalk/wp-includes/functions.php on line 5313
Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/app/current/wordpress-beanstalk/wp-includes/functions.php on line 5313
I don't know what is happening, I have updated the plugins and the problem is there. I can't understand how Wordpress keep working but the code I have created calling to the wp function's is not.