Require confirmation of current user’s email before updating database and before send_email_change_email
I found an answer here i will give this a try.. Confirmation required on email change
I found an answer here i will give this a try.. Confirmation required on email change
The problem is this line $sales = get_user_meta($_POST[‘repID’], ‘sales’); change it to $sales = get_user_meta($_POST[‘repID’], ‘sales’, true); The last parameter says, that you are getting a single value – an array. Otherwise you get an array inside another array. https://developer.wordpress.org/reference/functions/get_post_meta/ EDIT: After reading the comments, as you have the meta in multiple rows, you should … Read more
Solved: There was different capitalization on the variable $key ($Key vs $key) Always the simple things you miss eh? 🙂
You can create a similar solution as the one with a form and submit button by adding an onclick event to your button: <button id=”updateMyUserMeta” name=”updateMyUserMeta” onclick=”window.location.href(‘http://example.com?my_custom_user_meta=true’);”>Update</button> Then add this to the functions.php of your theme. /** * Updates the ‘my_custom_user_meta’ field if the * user clicks the ‘Update’ button. */ function update_my_custom_user_meta() { if … Read more
Private messaging – Getting and displaying the avatar/url of a message recipient
As I see it, you could replace some things in the switch. You need to open and close , tag in the same case rule, do this avoid a lot error. Like this switch( $column ) { case ‘recipientname’ : <div class=”recipentusername”><a href=”https://wordpress.stackexchange.com/questions/243290/<?php echo um_user_profile_url(); ?>” target=”_blank”><?php _e(“”, ‘front-end-pm’); ?> <?php echo implode( $name );?> … Read more
You can store the user meta in a variable and check if the variable is empty or not, like below- $args = array( ‘role’ => ‘subscriber’, ‘meta_key’ => ‘user_designation’ ); // The Query $user_query = new WP_User_Query($args); // User Loop $u_meta_array = array(); if ( !empty($user_query->results) ) { foreach ( $user_query->results as $user ) { … Read more
Sounds like the $amount variable is empty so it’s not saving. Echo it out to see what’s happening. Make sure the $payment_user_id is an actual WordPress user_id. Wrap your update_user_meta within the if statement. // If charge is successful, store in user meta if (isset($event) && $event->type == “charge.succeeded”) { $amount = $event->data->object->amount / 100; … Read more
My first guess would be to try following: Create a separate clean install of multisite Move user tables from it to your site I vaguely remember encountering situation like this before, but not what the outcome was. Also backup current state immediately, so at least you have that captured, in case you make things worse … Read more
WordPress provides a function get_users which display all the user detail and which field you want just pass in the ‘fields’ array. $users = get_users( array( ‘fields’ => array( ‘ID’,’user_login’, ‘user_email’) ) ); foreach ( $blogusers as $user ) { $user_work = get_user_meta( $user->ID, ‘user_work’, true); $user_street = get_user_meta( $user->ID, ‘user_street’, true); $user_state = get_user_meta( … Read more