@@ -89,7 +89,6 @@ public function __construct() {
89
89
'20.5-RC0 ' => 'upgrade_205 ' ,
90
90
'20.7-RC0 ' => 'upgrade_207 ' ,
91
91
'20.8-RC0 ' => 'upgrade_208 ' ,
92
- '21.6-rc0 ' => 'upgrade_216 ' ,
93
92
];
94
93
95
94
array_walk ( $ routines , [ $ this , 'run_upgrade_routine ' ], $ version );
@@ -1014,14 +1013,6 @@ private function upgrade_208() {
1014
1013
}
1015
1014
}
1016
1015
1017
- /**
1018
- * Performs the 21.6 upgrade routine.
1019
- * Avoid storing the full WP_User object in each notification and saves just the user id instead.
1020
- */
1021
- private function upgrade_216 () {
1022
- add_action ( 'init ' , [ $ this , 'update_notifications_user_id_for_216 ' ] );
1023
- }
1024
-
1025
1016
/**
1026
1017
* Sets the home_url option for the 15.1 upgrade routine.
1027
1018
*
@@ -1663,42 +1654,6 @@ static function ( $duplicate ) use ( $object_type ) {
1663
1654
// phpcs:enable
1664
1655
}
1665
1656
1666
- /**
1667
- * Function to update all users' notifications to store the user id instead of the full WP_User object.
1668
- */
1669
- private function update_notifications_user_id_for_216 () {
1670
- global $ wpdb ;
1671
- $ meta_key = $ wpdb ->get_blog_prefix () . Yoast_Notification_Center::STORAGE_KEY ;
1672
-
1673
- $ usermetas = $ wpdb ->get_results (
1674
- $ wpdb ->prepare (
1675
- '
1676
- SELECT user_id, meta_value
1677
- FROM ' . $ wpdb ->usermeta . '
1678
- WHERE meta_key = %s
1679
- ' ,
1680
- $ meta_key
1681
- ),
1682
- ARRAY_A
1683
- );
1684
-
1685
- if ( empty ( $ usermetas ) ) {
1686
- return ;
1687
- }
1688
-
1689
- foreach ( $ usermetas as $ usermeta ) {
1690
- $ notifications = maybe_unserialize ( $ usermeta ['meta_value ' ] );
1691
-
1692
- foreach ( $ notifications as $ notification ) {
1693
- if ( ! empty ( $ notification ['options ' ]['user ' ] ) ) {
1694
- unset( $ notification ['options ' ]['user ' ] );
1695
- $ notification ['options ' ]['user_id ' ] = $ usermeta ['user_id ' ];
1696
- }
1697
- }
1698
- update_user_meta ( $ usermeta ['user_id ' ], Yoast_Notification_Center::STORAGE_KEY , $ notifications );
1699
- }
1700
- }
1701
-
1702
1657
/**
1703
1658
* Removes the settings' introduction modal data for users.
1704
1659
*
0 commit comments