WordPress filter hook

woocommerce_lost_password_message

Defined by WooCommerce and fired by 7 plugins in total, running on 7M+ sites between them.

“This filter is documented in woocommerce/templates/myaccount/form-lost-password.php”

How to use woocommerce_lost_password_message

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_lost_password_message', function( $html__ ) {
	// Change $html__ here.
	return $html__;
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

7 plugins that fire woocommerce_lost_password_message

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_lost_password_message', esc_html__( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'woocommerce' ) ) templates/myaccount/form-lost-password.php:25
  2. ReCaptcha Integration for WordPress icon ReCaptcha Integration for WordPress9,000+ installs apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'wp-recaptcha-integration' ) ) inc/woocommerce/myaccount/form-lost-password.php:21
  3. SysBasics Customize My Account for WooCommerce icon SysBasics Customize My Account for WooCommerce7,000+ installs apply_filters( 'woocommerce_lost_password_message', esc_html__( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'customize-my-account-for-woocommerce' ) ) templates/myaccount/form-login.php:209
  4. ShopEngine Gutenberg WooCommerce Builder Blocks Addon icon ShopEngine Gutenberg WooCommerce Builder Blocks Addon3,000+ installs apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'shopengine-gutenberg-addon' ) ) blocks/account-form-login/password/password-reset-mail-form.php:11
  5. Kubelio Companion icon Kubelio Companion500+ installs apply_filters( 'woocommerce_lost_password_message', __( 'Enter your username or email address and we will send you a link to reset your password.', 'kubelio-companion' ) ) src/Account/views/lost-password.php:17
  6. StoreBuild icon StoreBuild400+ installs apply_filters( 'woocommerce_lost_password_message', esc_html__('Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'shopbuild') ) public/woocommerce/myaccount/form-lost-password.php:40
  7. ShopCurator icon ShopCuratorFewer than 10 installs apply_filters( 'woocommerce_lost_password_message', esc_html__( 'Enter your email address or mobile number, and we will send you a way to choose a new password.', 'shopcurator' ) ) templates/woocommerce/myaccount/form-lost-password.php:69

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.