| @@ -19,9 +19,9 @@ | ||
| 19 | 19 | * @return string |
| 20 | 20 | */ |
| 21 | 21 | public function get_update_message( $data, $old_data, $module_name ) { |
| 22 | 22 | // Empty data after sanitizing. |
| 23 | - if ( empty( $data ) ) { | |
| 23 | + if ( ! isset( $data['enabled'] ) ) { | |
| 24 | 24 | return esc_html__( 'Your settings have been updated.', 'defender-security' ); |
| 25 | 25 | } |
| 26 | 26 | $new_data = (bool) $data['enabled']; |
| 27 | 27 | // If old data and new data is matched, then it is not activated or deactivated. |
| @@ -34,8 +34,7 @@ | ||
| 34 | 34 | return sprintf( esc_html__( '%s has been activated.', 'defender-security' ), $module_name ); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* translators: %s: Module name. */ |
| 38 | - | |
| 39 | 38 | return sprintf( esc_html__( '%s has been deactivated.', 'defender-security' ), $module_name ); |
| 40 | 39 | } |
| 41 | 40 | } |