| @@ -89,9 +89,12 @@ | ||
| 89 | 89 | * @param array<string, array<string, mixed>> $data Addon rows keyed by namespace. |
| 90 | 90 | * @return array<string, array<string, mixed>> |
| 91 | 91 | */ |
| 92 | 92 | private function filter_addons_by_platform( array $data, string $platform ): array { |
| 93 | - $is_yaymail = ( $platform === 'yaymail' ) ? true : false; | |
| 93 | + // Unknown/absent platform falls through to the WordPress catalog, matching | |
| 94 | + // the prior exact-match behavior ( $platform === 'yaymail' ). | |
| 95 | + $platform_obj = '' !== $platform ? \YayMail\Platform\PlatformRegistry::get( $platform ) : null; | |
| 96 | + $is_yaymail = $platform_obj ? $platform_obj->is_woo_product() : false; | |
| 94 | 97 | |
| 95 | 98 | return array_filter( |
| 96 | 99 | $data, |
| 97 | 100 | function ( $addon ) use ( $is_yaymail ) { |