array (
0 =>
WC_Memberships_User_Membership::__set_state(array(
'id' => 52330,
'plan_id' => 18952,
'plan' =>
WC_Memberships_Membership_Plan::__set_state(array(
'id' => 18952,
'name' => 'Level 2 Access Until June',
'slug' => 'level-2-access-until-june',
'post' =>
WP_Post::__set_state(array(
'ID' => 18952,
'post_author' => '8',
'post_date' => '2017-09-11 11:05:13',
'post_date_gmt' => '2017-09-11 15:05:13',
)),
'access_method_meta' => '_access_method',
'rules' =>
array (
),
)),
'user_id' => '5213',
'status' => 'wcm-active',
'post' =>
WP_Post::__set_state(array(
'ID' => 52330,
'post_title' => 'Auto Draft',
)),
'product' => NULL,
'renewal_login_token_meta' => '_renewal_login_token',
'locked_meta' => '_locked',
)),
1 =>
WC_Memberships_User_Membership::__set_state(array(
'id' => 28639,
'plan_id' => 27786,
'plan' =>
WC_Memberships_Membership_Plan::__set_state(array(
'id' => 27786,
'name' => 'Level 1 – Ethical and Professional Standards',
'slug' => 'level-1-ethical-and-professional-standards',
'post' =>
WP_Post::__set_state(array(
'ID' => 27786,
'post_author' => '8',
'post_mime_type' => '',
'comment_count' => '0',
'filter' => 'raw',
)),
'access_method_meta' => '_access_method',
'email_content_meta' => '_email_content',
'rules' =>
array (
),
)),
'user_id' => '5213',
'status' => 'wcm-active',
'post' =>
WP_Post::__set_state(array(
'ID' => 28639,
'post_author' => '5213',
'post_date' => '2017-11-27 21:41:06',
'filter' => 'raw',
)),
'product' => NULL,
'type' => 'manually-assigned',
'locked_meta' => '_locked',
)),
);
我有 woocommerce 方法给出的这个数组: wc_memberships_get_user_active_memberships($user_id);
我需要提取用户拥有的成员资格的名称,它必须在一个循环中,因为用户可以拥有多个成员资格。我希望找回姓名 = 2 级访问权限,直到 6 月,1 级 - 道德和专业标准