• Hello,

    I have installed Wishlist Member, and used this code https://www.ads-software.com/support/topic/custom-conditions-for-wishlist-member-levels/ with a couple of modifications to make it work without error in admin panel.

    My problem is the exact thing the post above is having, on front-end the condition parameter I’ve set is returning 1, but IF Menu doesn’t seem to recognize it and doesn’t SHOW the menu items when parameter is true.

    I found this in error.log:
    PHP Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in <root-dir>/wp-content/plugins/if-menu/if-menu.php on line 106

    I’m using the latest version of the plugin.

    Help please?

    thanks,
    Froi

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrei

    (@andreiigna)

    Hi Froi,

    First of all, thanks for using the plugin!

    Fram a quick glance I can see that the code example sends a variable to condition option. That needs to be a callable function, something like 'condition' => function() {return $check}

    In a few days there will be a update for If Menu with third-party plugin integrations, Wishlist Member will be one of them.

    Cheers

    Thread Starter froirandom

    (@froirandom)

    Hello Andrei,

    The integration sounds awesome.

    Unfortunately, I just gotta fix this today
    I have tried

    'condition' => function(){
            return wlmapi_is_user_a_member( $level_id, $member_id);
    }

    and
    'condition' => wlmapi_is_user_a_member( $level_id, $member_id)
    still doesn’t work

    Thanks,
    Froi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Rules not working on front-end’ is closed to new replies.