Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save HideyukHira/b6d9560405653babcb72223271422556 to your computer and use it in GitHub Desktop.
Save HideyukHira/b6d9560405653babcb72223271422556 to your computer and use it in GitHub Desktop.
Adds a captcha to the WooCommerce lost password form.
<?php
function add_captcha_to_woocommerce_lost_password_form() {
if ( isset( $GLOBALS['siteguard_captcha'] ) ) {
add_filter( 'woocommerce_lostpassword_form', [ $GLOBALS['siteguard_captcha'], 'handler_lostpassword_form' ] );
}
}
add_action( 'init', 'add_captcha_to_woocommerce_lost_password_form' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment