Update `lostpassword_post` action and add missing parameter

`lostpassword_post` is a WP action that is duplicated in WooCommerce to replicate the functionality to retrieve user password in the 'My Account' pages. WP recently added the variable `$user_data` as a second parameter to this action (a6cecef42f). This commit simply copies this change to the version of the action that we maintain. Similar to what was done in 1a99235dc8 when a first parameter as added to the action in WP and we had to do the same in WC core.
This commit is contained in:
Rodrigo Primo 2020-12-02 09:49:11 -03:00
parent f698fbdeee
commit ba538147c1
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ class WC_Shortcode_My_Account {
$errors = new WP_Error();
do_action( 'lostpassword_post', $errors );
do_action( 'lostpassword_post', $errors, $user_data );
if ( $errors->get_error_code() ) {
wc_add_notice( $errors->get_error_message(), 'error' );