remove values within an array of user_meta
-
create a subscription form and save the emails inside a user_meta
$dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) ); if ( ! in_array( $new_pointer, $dismissed ) ) { $dismissed[] = $new_pointer; $dismissed = implode( ',', $dismissed ); update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed ); }
but when I try to delete user meta with the specific value I can’t delete the email then. How is it deleted in this case?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘remove values within an array of user_meta’ is closed to new replies.