Support » Plugin: Protect WP Admin » PHP Notice

  • Hello, i found this error on my debug file.
    PHP Warning: Use of undefined constant DOING_AJAX – assumed ‘DOING_AJAX’ (this will throw an Error in a future version of PHP) in /home/username/domains/sitename/public_html/wp-content/plugins/protect-wp-admin/pwa-class.php on line 170

    in this link say:
    error fixed.
    just added this code inside condition.
    defined( ‘DOING_AJAX’ )

    where i add code ?! “defined( ‘DOING_AJAX’ )

Viewing 1 replies (of 1 total)
  • Hello,
    find this file: wp-content/plugins/protect-wp-admin/pwa-class.php

    In line 170 you’ll find this:
    if(DOING_AJAX && $newUrl[0]==home_url('/wp-admin/admin-ajax.php'))

    Change it for this:
    if(defined( 'DOING_AJAX' ) && $newUrl[0]==home_url('/wp-admin/admin-ajax.php'))

    And that’s all 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice’ is closed to new replies.