Open cientista opened 5 years ago
I temporary made it work editing the file "class-wp-rest-key-pair.php" adding my subdirectory in line 80 changing "$prefix = rest_get_url_prefix();" to "$prefix = "wpapi/" . rest_get_url_prefix();". After this change I can generate key-pairs normally.
I have some Wordpress installations in different subfolders and when why try generate key-pairs in the profile page nothing happens. After inspect the network request in browser inspector I noted that the subfolder is ignored on the request so it returns a 404.
For example the request made in "http://local.lab/wpapi/wp-admin/profile.php" on submission it requests on "http://local.lab/wp-json/wp/v2/key-pair/1" which returns a 404.
I don't know if is a mistake on my side but I tested in other server who also use the same installation system and the result is the same.
Thank you.