Member list and Version 3 deprecated function
-
Hi I have a page which shows a list of members and their metadata (name, type address etc) but since upgrading to V3 I am getting a lot of php notices and it’s not quite working as expected. I think it is the if statement code that is causing the problem:
the members are drawn from a custom query with $args, which seems to work fine still.members = get_users( $args ); // get the members from query. foreach ($members as $member) { if ( $member->rcp_subscription_level != 1 ) { ...do somethingThe code checks to make sure its not a certain subscription type and then does stuff. But I am getting this notice:
Notice: get_user_meta() was called incorrectly. All user meta has been deprecated since Restrict Content Pro 3.0! Use the RCP_Membership class instead.`
I have tried to change rcp_get_customer_membership_level_ids which removes the notice but doesnt produce the right output. Any ideas on what I’m doing wrong or any good tutorials on how to output a list of members and their data?
Many thanks,
The topic ‘Member list and Version 3 deprecated function’ is closed to new replies.