[LYS] Fix deprecation error with lowercase $user->id (#46747)
👌 Use uppercase $user->ID and some text updates
This commit is contained in:
parent
b575fd580e
commit
afc471d0ed
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: I fixed a deprecation error and updated some translations to a new functionality.
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ class LaunchYourStore {
|
|||
self::BANNER_DISMISS_USER_META_KEY,
|
||||
array(
|
||||
'type' => 'string',
|
||||
'description' => 'Indicate wheter user has dismissed coming soon notice or not',
|
||||
'description' => 'Indicate whether the user has dismissed the coming soon notice or not.',
|
||||
'single' => true,
|
||||
'show_in_rest' => true,
|
||||
)
|
||||
|
@ -193,9 +193,9 @@ class LaunchYourStore {
|
|||
* @param object $user user object.
|
||||
*/
|
||||
public function reset_woocommerce_coming_soon_banner_dismissed( $user_login, $user ) {
|
||||
$existing_meta = get_user_meta( $user->id, self::BANNER_DISMISS_USER_META_KEY, true );
|
||||
$existing_meta = get_user_meta( $user->ID, self::BANNER_DISMISS_USER_META_KEY, true );
|
||||
if ( 'yes' === $existing_meta ) {
|
||||
update_user_meta( $user->id, self::BANNER_DISMISS_USER_META_KEY, 'no' );
|
||||
update_user_meta( $user->ID, self::BANNER_DISMISS_USER_META_KEY, 'no' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue