1. Home
  2. Knowledge Base
  3. API
  4. Function Reference
  5. Function Reference: wlmapi_update_level_member_data

Function Reference: wlmapi_update_level_member_data

Updates a member's membership level data according to the specified arguments.

Parameters

  • level_id (int) – The ID of the level to update data for
  • member_id (int) – The ID of the member to update
  • args (array) – An array of accepted arguments specified below:
Parameter Description Required Default
Cancelled (boolean) Cancellation status for the new member Optional false
CancelDate (int) Unix timestamp of scheduled cancellation date Optional
Pending (boolean) True to require admin approval Optional false
UnConfirmed (boolean) True to require email confirmation Optional false
Timestamp (int) Unix timestamp user was added to level Optional time()
TxnID (string) The transaction ID Optional auto-generated

Return

Returns a multi-dimensional array containing operation status and an array containing the member's level data.

Example Code

<?php
     $args = array(
          'Pending' => false
     );
     $members = wlmapi_update_level_member_data(1340726008, 11, $args);
     print_r($members);
?>

Example Output

Array
(
    [success] => 1
    [member] => Array
        (
            [id] => 11
            [user_login] => wray
            [user_email] => johnismyhero@wlptest.com
            [level] => stdClass Object
                (
                    [Cancelled] => 
                    [CancelDate] => 
                    [Pending] => 0
                    [UnConfirmed] => 
                    [Expired] => 
                    [ExpiryDate] => 
                    [Active] => 1
                    [Status] => Array
                        (
                            [0] => Active
                        )

                    [Timestamp] => 1344480785
                    [TxnID] => WL-11-1340726008
                )

        )

    [supported_verbs] => Array
        (
            [0] => GET
            [1] => PUT
            [2] => DELETE
        )

)

Notes

This functions returns WLMAPIMethods::update_level_member_data($level_id, $member_id, $args) in core/api-helper/class-api-methods.php

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support