WC_Admin_Setup_Wizard::setup_wizard_steps()
Deprecated from version 4.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.
Output the steps.
Method of the class: WC_Admin_Setup_Wizard{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Admin_Setup_Wizard = new WC_Admin_Setup_Wizard(); $WC_Admin_Setup_Wizard->setup_wizard_steps();
Changelog
Deprecated since | 4.6.0 |
WC_Admin_Setup_Wizard::setup_wizard_steps() WC Admin Setup Wizard::setup wizard steps code WC 9.7.1
<?php public function setup_wizard_steps() { _deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' ); $output_steps = $this->steps; $selected_features = array_filter( $this->wc_setup_activate_get_feature_list() ); // Hide the activate step if Jetpack is already active, unless WooCommerce Services // features are selected, or unless the Activate step was already taken. if ( class_exists( 'Jetpack' ) && Jetpack::is_active() && empty( $selected_features ) && 'yes' !== get_transient( 'wc_setup_activated' ) ) { unset( $output_steps['activate'] ); } unset( $output_steps['new_onboarding'] ); ?> <ol class="wc-setup-steps"> <?php foreach ( $output_steps as $step_key => $step ) { $is_completed = array_search( $this->step, array_keys( $this->steps ), true ) > array_search( $step_key, array_keys( $this->steps ), true ); if ( $step_key === $this->step ) { ?> <li class="active"><?php echo esc_html( $step['name'] ); ?></li> <?php } elseif ( $is_completed ) { ?> <li class="done"> <a href="<?php echo esc_url( add_query_arg( 'step', $step_key, remove_query_arg( 'activate_error' ) ) ); ?>"><?php echo esc_html( $step['name'] ); ?></a> </li> <?php } else { ?> <li><?php echo esc_html( $step['name'] ); ?></li> <?php } } ?> </ol> <?php }