• This should be an AND instead of an OR. With an OR it will execute the second statement every time and it continues to throw warnings if the captcha is not enabled on the lost password page. Warnings are better than errors, but they still fill up my logs just the same.

    background:
    I recently had to disable this on a lost password because it was not working and users could not reset their passwords because the link wasn’t working. The links emailed to them did not have any key, they contained an error instead.

    I disabled the feature on the lost password for the time being and hopefully will find a fix later. Perhaps due to a plugin conflict. That’s a separate issue though.

Viewing 1 replies (of 1 total)
  • I just recommend implementing your suggestion until it’s fixed by the developer. I did this a few months ago and haven’t had any issues since. Just replace the || with && as the first condition checks if the value is set and only if set should the second condition check if that value is equal to ‘yes’

    As you mentioned, currently with the || operator, the function will execute the second condition, but not every time. It will execute only when the value IS NOT set unfortunately, which means that if the value is set AND NOT equal to ‘yes’, the code will still execute.

    Replacing the || with && as mentioned above should fix this. Then if you would like, you can chattr +i -R this specific plugin folder “no-captcha-recaptcha-for-woocommerce” to make the folder immutable so WordPress cannot update the plugin until you verify the code has been corrected on any new version released.

Viewing 1 replies (of 1 total)
  • The topic ‘BUG: lost-password.php line 11’ is closed to new replies.