Membership Information

// Get current user ID
$user_id = get_current_user_id();

// Check if the user is member of the plan 'memberhsip'
if ( wc_memberships_is_user_active_member( $user_id, 'membership' ) ) {
echo 'This is a special message only for Gold members!';
} else {
echo 'I\'m sorry, you are not a gold member. There\'s nothing here for you!';
}