Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingThemes::add_uploaded_theme_data()public staticWC 1.0

Add theme data to response from themes controller.

{} Это метод класса: OnboardingThemes{}

Хуков нет.

Возвращает

WP_REST_Response.

Использование

$result = OnboardingThemes::add_uploaded_theme_data( $response );
$response(WP_REST_Response) (обязательный)
Rest response.

Код OnboardingThemes::add_uploaded_theme_data() WC 6.6.1

public static function add_uploaded_theme_data( $response ) {
	if ( ! isset( $response->data['theme'] ) ) {
		return $response;
	}

	$theme                        = wp_get_theme( $response->data['theme'] );
	$response->data['theme_data'] = self::get_theme_data( $theme );

	return $response;
}