Merge pull request #5210 from plprofetes/master
REST API: fix for generating API keys for different user
This commit is contained in:
commit
392e1d57c0
|
@ -236,7 +236,7 @@ class WC_Admin_Profile {
|
||||||
|
|
||||||
if ( current_user_can( 'edit_user', $user_id ) ) {
|
if ( current_user_can( 'edit_user', $user_id ) ) {
|
||||||
|
|
||||||
$user = wp_get_current_user();
|
$user = get_userdata( $user_id );
|
||||||
|
|
||||||
// creating/deleting key
|
// creating/deleting key
|
||||||
if ( isset( $_POST['woocommerce_generate_api_key'] ) ) {
|
if ( isset( $_POST['woocommerce_generate_api_key'] ) ) {
|
||||||
|
|
Loading…
Reference in New Issue