From 32e9291971bb3b0f557ce03da6369edf5b1dc33d Mon Sep 17 00:00:00 2001 From: dkmyta <43220201+dkmyta@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:04:08 -0800 Subject: [PATCH] Protect: Update Scan History extension types (#40548) --- .../protect/src/class-scan-history.php | 4 +++ .../js/routes/firewall/firewall-footer.jsx | 2 -- .../src/js/routes/firewall/styles.module.scss | 30 ------------------- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/projects/plugins/protect/src/class-scan-history.php b/projects/plugins/protect/src/class-scan-history.php index 8ea1dec7156e7..23019ccd634ad 100644 --- a/projects/plugins/protect/src/class-scan-history.php +++ b/projects/plugins/protect/src/class-scan-history.php @@ -219,6 +219,10 @@ private static function normalize_api_data( $scan_data ) { } foreach ( $scan_data->threats as $source_threat ) { + if ( ! empty( $source_threat->extension ) && in_array( $source_threat->extension->type, array( 'plugin', 'theme' ), true ) ) { + $source_threat->extension->type .= 's'; + } + $history->threats[] = new Threat_Model( $source_threat ); } diff --git a/projects/plugins/protect/src/js/routes/firewall/firewall-footer.jsx b/projects/plugins/protect/src/js/routes/firewall/firewall-footer.jsx index 0e28d7bae7c98..0c175b1cd651f 100644 --- a/projects/plugins/protect/src/js/routes/firewall/firewall-footer.jsx +++ b/projects/plugins/protect/src/js/routes/firewall/firewall-footer.jsx @@ -69,7 +69,6 @@ const ShareData = () => {