Snippet to get whether user has a membership plan or not
-
Kindly assist with a hook or snippet that can return true or false if a user has a membership plan or not. I’ve tried some snippet but none works
$author_id = get_post_field( ‘post_author’, $post_id );
$plan_id = wps_membership_get_meta_data( $post_id, ‘plan_obj’, true );if ( is_array( $plan_id ) && ! empty( $plan_id ) ) {
$plan_id = $plan_id['ID'];
} else {
$plan_id = 0;
}
$withdrawal_status = wps_membership_get_meta_data( $post_id, 'member_status', true );
if ( 'complete' === $withdrawal_status ) {Kindly assist on this. Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.