Automattic\WooCommerce\Blueprint\Importers
ImportActivateTheme::process
Process the step.
Method of the class: ImportActivateTheme{}
No Hooks.
Returns
StepProcessorResult
.
Usage
$ImportActivateTheme = new ImportActivateTheme(); $ImportActivateTheme->process( $schema ): StepProcessorResult;
- $schema(object) (required)
- The schema for the step.
ImportActivateTheme::process() ImportActivateTheme::process code WC 9.9.5
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; }