1. Home
  2. API
  3. Function Reference
  4. Function Reference: wlmapi_delete_level

Function Reference: wlmapi_delete_level

Deletes an existing membership level.

Parameters

  • level_id (int) – The ID of the level to delete

Return

Returns a multi-dimensional array containing the operation status and an array of remaining membership levels.

Example Code

<?php
     $level = wlmapi_delete_level(1344363854);
     print_r($level);
?>

Example Output

Array
(
    [success] => 1
    [levels] => Array
        (
            [level] => Array
                (
                    [0] => Array
                        (
                            [id] => 1340726008
                            [name] => Test Level 1
                            [_more_] => /levels/1340726008
                        )

                    [1] => Array
                        (
                            [id] => 1340896239
                            [name] => Test Level 2
                            [_more_] => /levels/1340896239
                        )

                    [2] => Array
                        (
                            [id] => 1340896250
                            [name] => Test Level 3
                            [_more_] => /levels/1340896250
                        )

                )

        )

    [supported_verbs] => Array
        (
            [0] => GET
            [1] => POST
        )

)

Notes

This functions returns WLMAPIMethods::delete_level($level_id) in core/api-helper/class-api-methods.php

Updated on August 14, 2020

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket