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.
Method of the class: ExtensionsWithoutSubscription{}
No Hooks.
Returns
void. Nothing (null).
Usage
$result = ExtensionsWithoutSubscription::delete_note_unless_dismissed_or_actioned(): void;
ExtensionsWithoutSubscription::delete_note_unless_dismissed_or_actioned() ExtensionsWithoutSubscription::delete note unless dismissed or actioned code 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();
}