Cart / Checkout: Customize the Require Password Notice

Customize the "Required Password" notice for the create account password field label at checkout. 

Important: Always test customizations to your site on a staging environment before making changes to your live / production site.  If you are not experienced with testing changes on a staging site, here is a good article to review.

/**
* Adjusts the Required Notice for the Create account password field.
*
* @param string $notice The current required Notice.
* @param string $field_label The current field label associated with the error.
* @return string The adjusted notice.
*/
function xx_adjust_required_password_notice( $notice, $field_label ){

  return ( 'Create account password' == $field_label ) ? sprintf( __( 'To proceed with this checkout and create an autoship schedule, please register an account or sign in.' ) ) : $notice;

}
add_filter( 'woocommerce_checkout_required_field_notice', 'xx_adjust_required_password_notice', 10, 2 );

Still need help? Contact Us Contact Us