WC_Admin_Setup_Wizard::wc_setup_recommended()publicWC 1.0

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.

Recommended step

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->wc_setup_recommended();

Changelog

Deprecated since 4.6.0

WC_Admin_Setup_Wizard::wc_setup_recommended() code WC 8.7.0

<?php
public function wc_setup_recommended() {
	_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
	?>
	<h1><?php esc_html_e( 'Recommended for All WooCommerce Stores', 'woocommerce' ); ?></h1>
	<p>
		<?php esc_html_e( 'Enhance your store with these recommended free features.', 'woocommerce' ); ?>
	</p>
	<form method="post">
		<ul class="recommended-step">
			<?php
			if ( $this->should_show_theme() ) :
				$theme      = wp_get_theme();
				$theme_name = $theme['Name'];
				$this->display_recommended_item( array(
					'type'        => 'storefront_theme',
					'title'       => __( 'Storefront Theme', 'woocommerce' ),
					'description' => sprintf(
						/* translators: %s: theme name. */
						__(
							'Design your store with deep WooCommerce integration. If toggled on, we’ll install <a href="https://woo.com/storefront/" target="_blank" rel="noopener noreferrer">Storefront</a>, and your current theme <em>%s</em> will be deactivated.',
							'woocommerce'
						),
						$theme_name
					),
					'img_url'     => WC()->plugin_url() . '/assets/images/obw-storefront-icon.svg',
					'img_alt'     => __( 'Storefront icon', 'woocommerce' ),
				) );
			endif;

			if ( $this->should_show_automated_tax() ) :
				$this->display_recommended_item( array(
					'type'        => 'automated_taxes',
					'title'       => __( 'Automated Taxes', 'woocommerce' ),
					'description' => __( 'Save time and errors with automated tax calculation and collection at checkout. Powered by WooCommerce Services and Jetpack.', 'woocommerce' ),
					'img_url'     => WC()->plugin_url() . '/assets/images/obw-taxes-icon.svg',
					'img_alt'     => __( 'automated taxes icon', 'woocommerce' ),
					'plugins'     => $this->get_wcs_requisite_plugins(),
				) );
			endif;

			if ( $this->should_show_wc_admin() ) :
				$this->display_recommended_item( array(
					'type'        => 'wc_admin',
					'title'       => __( 'WooCommerce Admin', 'woocommerce' ),
					'description' => __( 'Manage your store\'s reports and monitor key metrics with a new and improved interface and dashboard.', 'woocommerce' ),
					'img_url'     => WC()->plugin_url() . '/assets/images/obw-woocommerce-admin-icon.svg',
					'img_alt'     => __( 'WooCommerce Admin icon', 'woocommerce' ),
					'plugins'     => array( array( 'name' => __( 'WooCommerce Admin', 'woocommerce' ), 'slug' => 'woocommerce-admin' ) ),
				) );
			endif;

			if ( $this->should_show_mailchimp() ) :
				$this->display_recommended_item( array(
					'type'        => 'mailchimp',
					'title'       => __( 'Mailchimp', 'woocommerce' ),
					'description' => __( 'Join the 16 million customers who use Mailchimp. Sync list and store data to send automated emails, and targeted campaigns.', 'woocommerce' ),
					'img_url'     => WC()->plugin_url() . '/assets/images/obw-mailchimp-icon.svg',
					'img_alt'     => __( 'Mailchimp icon', 'woocommerce' ),
					'plugins'     => array( array( 'name' => __( 'Mailchimp for WooCommerce', 'woocommerce' ), 'slug' => 'mailchimp-for-woocommerce' ) ),
				) );
			endif;

			if ( $this->should_show_facebook() ) :
				$this->display_recommended_item( array(
					'type'        => 'facebook',
					'title'       => __( 'Facebook', 'woocommerce' ),
					'description' => __( 'Enjoy all Facebook products combined in one extension: pixel tracking, catalog sync, messenger chat, shop functionality and Instagram shopping (coming soon)!', 'woocommerce' ),
					'img_url'     => WC()->plugin_url() . '/assets/images/obw-facebook-icon.svg',
					'img_alt'     => __( 'Facebook icon', 'woocommerce' ),
					'plugins'     => array( array( 'name' => __( 'Facebook for WooCommerce', 'woocommerce' ), 'slug' => 'facebook-for-woocommerce' ) ),
				) );
			endif;
		?>
	</ul>
		<p class="wc-setup-actions step">
			<?php $this->plugin_install_info(); ?>
			<button type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step"><?php esc_html_e( 'Continue', 'woocommerce' ); ?></button>
			<?php wp_nonce_field( 'wc-setup' ); ?>
		</p>
	</form>
	<?php
}