How to add custom detail page for a Subscriber at Admin Panel

It sounds like maybe you need to add a settings page, (https://developer.wordpress.org/plugins/settings/custom-settings-page/) This would be good if you had something really custom (customer user meta) and a layout that you wanted to keep separate from the regular user pages. Otherwise, why not just link to the core wordpress user pages? Just build your links like … Read more

How to display Most Recently Read 10 Posts by a logged in user in wordpress

At first you need to set a meta value when a post is visited using this way if( is_user_logged_in() ) { update_post_meta( $post_id, ‘post_readed_by’, get_current_user_id() ); } Then you can get the recent visited posts <?php $args = array( ‘posts_per_page’ => 10, ‘meta_key’ => ‘post_readed_by’, ‘meta_value’ => get_current_user_id(), ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ); … Read more

Why does a super admin on multi site get a rest_user_invalid_id error code when requesting user details through REST?

Deleting users with the REST API isn’t supported for multisite, as seen in the source code: // We don’t support delete requests in multisite. if ( is_multisite() ) { return new WP_Error( ‘rest_cannot_delete’, __( ‘The user cannot be deleted.’ ), array( ‘status’ => 501 ) ); } For GET requests the user ID is checked … Read more

How to get user contact info

It sounds like you’re after the get_userdata() function. As a basic example, you could retrieve a users email like this: <?php if ( $user_id ) { $user = get_userdata($user_id); echo ‘Users Email is: ‘ . $user->user_email; } ?>

Create users from frontend without password

it’s right here in the codex. This is example code, showing how a new user is created: $user_id = username_exists( $user_name ); if ( !$user_id and email_exists($user_email) == false ) { $random_password = wp_generate_password( $length=12, $include_standard_special_chars=false ); $user_id = wp_create_user( $user_name, $random_password, $user_email ); } else { $random_password = __(‘User already exists. Password inherited.’); } … Read more

New User Registration email

In the admin interface under Settings > General there is a field named E-mail Address. Unless you have a plugin managing your user registration separately, this should be the default email address for registration confirmations.

Shopping plugin with user groups [closed]

You don’t say if you are setting up a new e-commerce site or a trying to change an existing one. If you are setting up a new site from scratch … then WooCommerce has a premium plugin called Dynamic Pricing which can create different pricing for different types of users.

Problem with update_user_meta() meta_value

I fixed it doing like below: $meta_value = //data from an API (e.g.: 19, 34, 1290 etc) $meta_value_string = “”. $meta_value; $user_id = wp_insert_user( $new_user_data ); update_user_meta( $user_id, ‘my_meta_key’, $meta_value_string ); Now it works fine.