Description
Removes user access for a given membership.
Replaces wpmem_remove_user_product()
Parameters
$membership
(string) (required) The meta key of the membership to remove access from.
$user_id
(integer) (required) The user ID to remove access from. If no user ID is passed, it will remove the membership for the currently logged in user.
Return Value
boolean (true|false) Returns true if removing the product was successful.
Examples
Changelog
Introduced in version 3.4.2
Source
wpmem_remove_user_membership() is located in /includes/api/api-users.php.