Automattic\WooCommerce\Blueprint\Importers
ImportActivateTheme::process
Process the step.
Метод класса: ImportActivateTheme{}
Хуков нет.
Возвращает
StepProcessorResult.
Использование
$ImportActivateTheme = new ImportActivateTheme(); $ImportActivateTheme->process( $schema ): StepProcessorResult;
- $schema(объект) (обязательный)
- The schema for the step.
Код ImportActivateTheme::process() ImportActivateTheme::process WC 10.7.0
public function process( $schema ): StepProcessorResult {
$result = StepProcessorResult::success( ActivateTheme::get_step_name() );
// phpcs:ignore
$name = $schema->themeName;
$this->wp_switch_theme( $name );
$current_theme = $this->wp_get_theme()->get_stylesheet();
if ( $current_theme === $name ) {
$result->add_debug( "Switched theme to '$name'." );
}
return $result;
}