Automattic\WooCommerce\Internal\Admin\Notes
ExtensionsWithoutSubscription::delete_note_unless_dismissed_or_actioned
Delete the note now that nothing is missing a subscription, unless the merchant already dealt with it.
A dismissed or actioned note is hidden anyway, and keeping it means it stays that way if the extensions come back, for example after deactivating every plugin to find a conflict.
Метод класса: ExtensionsWithoutSubscription{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$result = ExtensionsWithoutSubscription::delete_note_unless_dismissed_or_actioned(): void;
Код ExtensionsWithoutSubscription::delete_note_unless_dismissed_or_actioned() ExtensionsWithoutSubscription::delete note unless dismissed or actioned WC 11.3.0
private static function delete_note_unless_dismissed_or_actioned(): void {
$note = Notes::get_note_by_name( self::NOTE_NAME );
if ( ! $note instanceof Note ) {
return;
}
if ( $note->get_is_deleted() || Note::E_WC_ADMIN_NOTE_ACTIONED === $note->get_status() ) {
return;
}
self::possibly_delete_note();
}