How to customize password reset work-flow?
-
Hello,
I want to modify the password reset work-flow. More specifically, lines 238 to 241 of woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php:
if ( is_multisite() && ! is_user_member_of_blog( $user_data->ID, get_current_blog_id() ) ) { wc_add_notice( __( 'Invalid username or e-mail.', 'woocommerce' ), 'error' ); return false; }What’s the recommended way of doing so, without editing the WC files directly? Is there a hook I can use?
I want to allow store admins to enable a bypass for this error (allow password reset for users that are not members of the blog) and to perform some other code of my own instead of running “wc_add_notice” and “return false” (so, being more precise, I want to replace the lines 239 and 240 only, with other custom code).
I am not asking for the code 😉 I was able to make it work the way I need by directly editing the file, but I know this is not the right way (it will be lost on plugin update), so I just need some guidance on how to customize it the right way.
Thanks.
The topic ‘How to customize password reset work-flow?’ is closed to new replies.