Automattic\WooCommerce\Internal\PushNotifications\DataStores
NotificationPreferencesDataStore::delete
Delete a user's stored preferences for this site.
Multisite keeps a separate envelope per site, so this removes only the one belonging to the current site.
Метод класса: NotificationPreferencesDataStore{}
Хуков нет.
Возвращает
bool. True when an envelope was removed, false when there was nothing stored.
Использование
$NotificationPreferencesDataStore = new NotificationPreferencesDataStore(); $NotificationPreferencesDataStore->delete( $user_id ): bool;
- $user_id(int) (обязательный)
- The user ID.
Список изменений
| С версии 11.2.0 | Введена. |
Код NotificationPreferencesDataStore::delete() NotificationPreferencesDataStore::delete WC 11.2.2
public function delete( int $user_id ): bool {
return Users::delete_site_user_meta( $user_id, self::META_KEY );
}