fep_filter_rest_users_args not working


Home Forums Front End PM PRO fep_filter_rest_users_args not working

This topic is: Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41954
    sarkis.salleh
    Participant

    Hi,
    I want to populate custom users in To field , for this I am using this fep_filter_rest_users_args but not working
    The code using in function.php is below :

    add_action( ‘fep_filter_rest_users_args’, ‘populate_pm_users’ );
    function populate_pm_users($args){
    global $wpdb;
    $args = get_users( array(
    ‘search’ => 1419,
    ‘search_columns’ => array(‘ID’),
    ) );
    return $args;
    }

    Please suggest what arguments are wrong .

    Thanks

    #41961
    Shamim Hasan
    Keymaster

    You need to change $args parameters only. Not full get_users function.
    Eg.

    add_filter( 'fep_filter_rest_users_args', function( $args ){
        $args['search'] = 1449,
        return $args;
    });
    
Viewing 2 posts - 1 through 2 (of 2 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.