Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // User IDs from the form.
- $form_data = [
- 14,
- 2346,
- 125,
- ];
- // Clear previous data in case user unsubscribed someone.
- delete_user_meta( $updated_user_id, 'subscribing_authors' );
- // Add each subscribed author ID as a single entry.
- foreach( $form_data as $author_id ) {
- add_user_meta( $updated_user_id, 'subscribing_authors', $author_id );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement