Fix/7938 navigation feedback follow up note should self delete when not relevant (https://github.com/woocommerce/woocommerce-admin/pull/7939)

* Add NavigationFeedbackFollowUp to daily possibly_delete_notes().

* Implement is_applicable() in NavigationFeedbackFollowUp.

* Changelog for 7938/7939

* Update changelogs/fix-7938-navigation-feedback-follow-up-note-should-self-delete-when-not-relevant

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
This commit is contained in:
Jacob Sewell 2021-11-22 11:16:05 -06:00 committed by GitHub
parent ff12150b7c
commit 1182b47331
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: Fix
Self-delete NavigationFeedbackFollowUp note when navigation feature is not present. #7939

View File

@ -163,6 +163,7 @@ class Events {
protected function possibly_delete_notes() { protected function possibly_delete_notes() {
NavigationNudge::delete_if_not_applicable(); NavigationNudge::delete_if_not_applicable();
NavigationFeedback::delete_if_not_applicable(); NavigationFeedback::delete_if_not_applicable();
NavigationFeedbackFollowUp::delete_if_not_applicable();
} }
/** /**

View File

@ -24,6 +24,13 @@ class NavigationFeedbackFollowUp {
*/ */
const NOTE_NAME = 'wc-admin-navigation-feedback-follow-up'; const NOTE_NAME = 'wc-admin-navigation-feedback-follow-up';
/**
* Should this note exist? (The navigation feature should exist.)
*/
public static function is_applicable() {
return Features::exists( 'navigation' );
}
/** /**
* Get the note. * Get the note.
* *