Fix undefined variable slug on theme activation error (https://github.com/woocommerce/woocommerce-admin/pull/3942)

This commit is contained in:
Jahidur Rahman Nadim 2020-03-24 09:26:02 +06:00 committed by GitHub
parent 7777a7b727
commit 57f8cbf3e8
1 changed files with 1 additions and 0 deletions

View File

@ -168,6 +168,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller {
require_once ABSPATH . 'wp-admin/includes/theme.php';
$slug = sanitize_key( $theme );
$installed_themes = wp_get_themes();
if ( ! in_array( $theme, array_keys( $installed_themes ), true ) ) {