Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::notification_exists_by_emailpublic staticWC 1.0

Check if a notification exists by email.

Method of the class: NotificationQuery{}

No Hooks.

Returns

true|false. True if the notification exists, false otherwise.

Usage

$result = NotificationQuery::notification_exists_by_email( $product_id, $email ): bool;
$product_id(int) (required)
The product ID.
$email(string) (required)
The email address.

NotificationQuery::notification_exists_by_email() code WC 10.3.6

public static function notification_exists_by_email( int $product_id, string $email ): bool {
	return \WC_Data_Store::load( 'stock_notification' )->notification_exists_by_email( $product_id, $email );
}