• I am using PHP 7.2 and a conditional !current_user_can(access_s2member_level1)

    I see a PHP warning:

    Use of undefined constant access_s2member_level1 - assumed 'access_s2member_level1' (this will throw an Error in a future version of PHP) in /var/www/html/wp-content/plugins/menu-items-visibility-control/init.php(112) : eval()'d code on line 1

Viewing 1 replies (of 1 total)
  • Plugin Author shazdeh

    (@shazdeh)

    The $capability name should be an string, so try:

    
    ! current_user_can( 'access_s2member_level1' )
    
Viewing 1 replies (of 1 total)
  • The topic ‘Use of undefined constant’ is closed to new replies.