Automattic\WooCommerce\Internal\OrderWithdrawal

OrderWithdrawalFeatureHighlightNotification::note_exists │ private │ WC 1.0

Whether a note exists, including soft-deleted notes.

Method of the class: OrderWithdrawalFeatureHighlightNotification{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->note_exists( $note_name ): bool;
$note_name(string) (required)
Note name stored in the data store.

OrderWithdrawalFeatureHighlightNotification::note_exists() code WC 11.3.0

private function note_exists( string $note_name ): bool {
	/**
	 * Data store instance.
	 *
	 * @var NotesDataStore $data_store
	 */
	$data_store = Notes::load_data_store();
	$note_ids   = $data_store->get_notes_with_name( $note_name );

	return ! empty( $note_ids );
}