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:
parent
ff12150b7c
commit
1182b47331
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: Fix
|
||||
|
||||
Self-delete NavigationFeedbackFollowUp note when navigation feature is not present. #7939
|
|
@ -163,6 +163,7 @@ class Events {
|
|||
protected function possibly_delete_notes() {
|
||||
NavigationNudge::delete_if_not_applicable();
|
||||
NavigationFeedback::delete_if_not_applicable();
|
||||
NavigationFeedbackFollowUp::delete_if_not_applicable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,13 @@ class NavigationFeedbackFollowUp {
|
|||
*/
|
||||
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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue