Automattic\WooCommerce\Internal\Email\Unsubscribes

Storage::mark_unsubscribed │ public │ WC 1.0

Record an unsubscribe for the given email + kind. Idempotent — repeated calls append new rows but the lookup only cares about the most recent.

Method of the class: Storage{}

No Hooks.

Returns

bool. True if a row was written, false if input was empty.

Usage

$Storage = new Storage();
$Storage->mark_unsubscribed( $email, $kind ): bool;
$email(string) (required)
Raw email address.
$kind(string) (required)
Email-kind identifier.

Storage::mark_unsubscribed() code WC 11.1.2

public function mark_unsubscribed( string $email, string $kind ): bool {
	return $this->record_action( self::hash_email( $email ), $kind, self::ACTION_UNSUBSCRIBED );
}