WC_Admin_Setup_Wizard::install_theme()protectedWC 1.0

Устарела с версии 4.6.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Helper method to queue the background install of a theme.

Метод класса: WC_Admin_Setup_Wizard{}

Хуков нет.

Возвращает

null. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->install_theme( $theme_id );
$theme_id(строка) (обязательный)
Theme id used for background install.

Список изменений

Устарела с 4.6.0

Код WC_Admin_Setup_Wizard::install_theme() WC 8.7.0

protected function install_theme( $theme_id ) {
	_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
	if ( empty( $this->deferred_actions ) ) {
		add_action( 'shutdown', array( $this, 'run_deferred_actions' ) );
	}
	array_push(
		$this->deferred_actions,
		array(
			'func' => array( 'WC_Install', 'theme_background_installer' ),
			'args' => array( $theme_id ),
		)
	);
}