# automatorwp/5.8.5/integrations/wishlist-member/includes/functions.php

AutomatorWP – No-Code Workflow Automation, Integration &amp; Webhooks Plugin, now with AI, version 5.8.5. 49 lines.

- Page: https://pluginprobe.com/plugins/automatorwp/5.8.5/code/integrations/wishlist-member/includes/functions.php
- Raw: https://pluginprobe.com/plugins/automatorwp/5.8.5/raw/integrations/wishlist-member/includes/functions.php
- Modified: 2026-08-20T08:53:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/automatorwp/5.8.5/code/integrations/wishlist-member/includes/functions.php#L10-L20`.

```php
<?php
/**
 * Functions
 *
 * @package     AutomatorWP\Integrations\WishList_Member\Functions
 * @author      AutomatorWP <contact@automatorwp.com>, Ruben Garcia <rubengcdev@gmail.com>
 * @since       1.0.0
 */
// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) exit;

/**
 * Options callback for levels options
 *
 * @since 1.0.0
 *
 * @param stdClass $field
 *
 * @return array
 */
function automatorwp_wishlist_member_levels_options_cb( $field ) {

    $options = array(
        'any' => __( 'any level', 'automatorwp' ),
    );

    if( function_exists( 'wlmapi_get_levels' ) ) {

        // Get all registered levels
        $levels = wlmapi_get_levels();

        // Check that levels are correctly setup
        if ( is_array( $levels )
            && isset( $levels['levels'] )
            && isset( $levels['levels']['level'] )
            && ! empty( $levels['levels']['level'] ) ) {

            // Loop levels to add them as options
            foreach ( $levels['levels']['level'] as $level ) {
                $options[$level['id']] = $level['name'];
            }

        }

    }

    return $options;

}
```
