Tag Archives | levels

Tutorial: How to Delete a Membership Level Using the WishList Member API

Tutorial: How to Update a Membership Level Using the WishList Member API

Tutorial: How to Create a Membership Level Using the WishList Member API

Tutorial: How to Get a Membership Level Using the WishList Member API

Tutorial: How to Get All Membership Levels Using the WishList Member API

Membership Level Hooks

wishlistmember_remove_user_levels (action) Called when a member is removed from one or more levels Parameters: $id – Member ID $levels – Membership Levels wishlistmember_add_user_levels (action) Called when a member is added to one or more levels Parameters: $id – Member ID $levels – Membership Levels wishlistmember_unapprove_user_levels (action) Called when a member is unapproved on one or […]

Function Reference: wlmapi_unmanage_post

Un-protects posts and removes them from the membership level. Parameters level_id (int) – The ID of the level to remove posts from post_ids (int) – Accepts an array or comma-seprated list of post IDs Return Returns a multi-dimensional array containing operation status for each post. Example Code <?php $posts = wlmapi_unmanage_post(1340726008, ‘1,60,62’); print_r($posts); ?> Example Output Array ( […]

Function Reference: wlmapi_manage_post

Protects posts and adds them to the membership level. Parameters level_id (int) – The ID of the level to add posts to post_ids (int) – Accepts an array or comma-seprated list of post IDs Return Returns a multi-dimensional array containing operation status and an array containing data for all posts that belong to the specified level. Example Code […]

Function Reference: wlmapi_is_user_a_member

Checks if the specified member belongs to the specified level. Parameters level_id (int) – The ID of the level to check member_id (int) – The ID of the member to check Return Returns TRUE if the user belongs to the level and FALSE if not. Example Code <?php $check = wlmapi_is_user_a_member(1340726008, 1); if ( $check ) […]

Function Reference: wlmapi_get_member_levels

Retrieves the membership levels that the specified user belongs to. Parameters member_id (int) – The ID of the member Return Returns a multi-dimensional array containing data for the levels that the  specified member belongs to. Example Code <?php $levels = wlmapi_get_member_levels(1); print_r($levels); ?> Example Output Array ( [1340726008] => stdClass Object ( [Level_ID] => 1340726008 [Name] […]