ap_set_notifications_as_seen( integer $user_id )

Description #

Set user’s notifications as seen.

Parameters #

  • $user_id
    integer (Required) User id.

Source #

File: addons/notifications/functions.php

function ap_set_notifications_as_seen( $user_id ) {
	global $wpdb;
	return $wpdb->update( // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
		$wpdb->prefix . 'ap_notifications',
		array(
			'noti_seen' => 1,
		),
		array(
			'noti_user_id' => $user_id,
		),
		array( '%d' ),
		array( '%d' )
	);
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment