Automattic\WooCommerce\Internal\CLI\Migrator\Core
PlatformRegistry::get_platform_display_name
Gets the display name for a platform.
Метод класса: PlatformRegistry{}
Хуков нет.
Возвращает
Строку. The proper display name (e.g., 'Shopify').
Использование
$PlatformRegistry = new PlatformRegistry(); $PlatformRegistry->get_platform_display_name( $platform_slug ): string;
- $platform_slug(строка) (обязательный)
- The platform identifier (e.g., 'shopify').
Код PlatformRegistry::get_platform_display_name() PlatformRegistry::get platform display name WC 10.9.4
public function get_platform_display_name( string $platform_slug ): string {
$platform = $this->get_platform( $platform_slug );
if ( is_array( $platform ) && isset( $platform['name'] ) ) {
return $platform['name'];
}
// Fallback to ucfirst if platform not found or no name configured.
return ucfirst( $platform_slug );
}