delete_user_meta problem matching substring
-
In the database I have the following user meta;
I use the following function to delete the user meta
delete_user_meta( $user_id, 'dismissed_wp_pointers', 'lu_ban_settings_pointer' );
Where
lu_ban_settings_pointer
is the meta value I want to match, the problem here is that the data contains comma separated values, so a full string match will failwp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media,wp360_revisions,wp360_locks,lu_ban_settings_pointer
The problem is that the function only deletes the meta value as long as the full string matches, meaning that I have to go through the array and match the substring.
What would be the best way to achieve this?
- The topic ‘delete_user_meta problem matching substring’ is closed to new replies.