Automattic\WooCommerce\Internal\DataStores\StockNotifications

StockNotificationsMetaDataStore::delete_by_notification_idpublicWC 1.0

Delete by notification ID.

Method of the class: StockNotificationsMetaDataStore{}

No Hooks.

Returns

true|false. True if the metadata were deleted, false otherwise.

Usage

$StockNotificationsMetaDataStore = new StockNotificationsMetaDataStore();
$StockNotificationsMetaDataStore->delete_by_notification_id( $notification_id );
$notification_id(int) (required)
The notification ID.

StockNotificationsMetaDataStore::delete_by_notification_id() code WC 10.3.6

public function delete_by_notification_id( $notification_id ) {
	global $wpdb;

	$table  = $this->get_table_name();
	$result = $wpdb->delete(
		$table,
		array( 'notification_id' => $notification_id ),
		array( '%d' )
	);

	return false === $result ? false : true;
}