Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingThemes::add_uploaded_theme_data()
Add theme data to response from themes controller.
Method of the class: OnboardingThemes{}
No Hooks.
Return
WP_REST_Response
.
Usage
$result = OnboardingThemes::add_uploaded_theme_data( $response );
- $response(WP_REST_Response) (required)
- Rest response.
OnboardingThemes::add_uploaded_theme_data() OnboardingThemes::add uploaded theme data code WC 8.7.0
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; }