Hi all, I am trying to add additional metadat and for this i am using get_user_meta like this see the code :
if ( !get_user_meta( $wcm_users[$i], $key, '' ) ) {
add_user_meta( $wcm_users[$i]->ID, $key, '' );
}
here $get_user_meta is an array, which is coming with several meta and here I am trying to check if that meta is already added so want to skip that product.
Some how facing this error:
Notice: Object of class WP_User could not be converted to int in /.../wp-includes/functions.php on line 2999
When I remove get_user_meta error doesn't come.
Please help me out on the same.