Calls the WishList Member API internally. This is the sister function of the wlmapiclass class which handles all external API requests.
Parameters
- request (int) – The resource to request (e.g. “/levels”)
- method (int) – The method to use (GET, POST, PUT, DELETE). Default is GET
- data (array) – An associative array of data to pass to the API (required by some requests)
Return
Returns the result of the API request.
Example Code
<?php $args = array('name' => 'Test Level 4'); $response = WishListMemberAPIRequest('/levels', 'POST', $args); print_r($response); ?>
Example Output
Array ( [success] => 1 [level] => Array ( [id] => 1344363854 [name] => Test Level 4 [registration_url] => BFKdgl [after_login_redirect] => global [after_registration_redirect] => global [access_all_pages] => 0 [access_all_categories] => 0 [access_all_posts] => 0 [access_all_comments] => 0 [no_expiry] => 1 [expiry] => [expiry_period] => Days [sequential_upgrade_to] => [sequential_upgrade_after] => [sequential_upgrade_method] => [member_count] => [require_captcha] => 0 [require_email_confirmation] => 0 [require_admin_approval] => 0 [grant_continued_access] => 0 [disable_existing_users_link] => 0 [registration_date_reset] => 0 [uncancel_on_registration] => 0 [wordpress_role] => subscriber [level_order] => [remove_from_levels] => [_more_] => Array ( [0] => /levels/1344363854/members [1] => /levels/1344363854/posts [2] => /levels/1344363854/pages [3] => /levels/1344363854/comments [4] => /levels/1344363854/categories ) ) [supported_verbs] => Array ( [0] => GET [1] => PUT [2] => DELETE ) )
Notes
This function can be found at core/Functions.php