Remove one value in dismissed_wp_pointers?

For some reason the dismissed pointers are just stored as a comma separated list. Not even a serialised array. So the way to remove an item from it would be to get the value, turn it into an array, remove the desired element, put back together, and save:

// Get the dismissed pointers as saved in the database.
$pointers = get_user_meta( $user_id, 'dismissed_wp_pointers', true );

// Create an array by separating the list by comma.
$pointers = explode( ',', $pointers );

// Get the index in the array of the value we want to remove.
$index = array_search( 'wp496_privacy', $pointers );

// Remove it.
unset( $pointers[$index] );

// Make the list a comma separated string again.
$pointers = implode( ',', $pointers );

// Save the updated value.
update_user_meta( $user_id, 'dismissed_wp_pointers', $points );

Just replace wp496_privacy with your pointer’s ID.

An alternative is just to replace the string of the ID with an empty string:

pointers = get_user_meta( $user_id, 'dismissed_wp_pointers', true );

$pointers = str_replace( 'wp496_privacy', '', $pointers );

update_user_meta( $user_id, 'dismissed_wp_pointers', $points );

But if it’s not the last item in the list then you could end up with values like:

wp390_widgets,,text_widget_custom_html

Which might not cause problems, but is sort of messing with the way WordPress will expect this value to look. You could always then just replace any double commas ,, with single commas , the same way, but you’ve then got to deal with a trailing comma on the end if it was the last value. So ultimately I just find the Array method much cleaner.