From 801667324a3cce96ce4c383867fc27b3c8b064a8 Mon Sep 17 00:00:00 2001 From: Paul Dechov Date: Wed, 2 May 2018 17:23:36 -0400 Subject: [PATCH] Show plugins to install in shipping step --- assets/js/admin/wc-setup.js | 6 ++++++ includes/admin/class-wc-admin-setup-wizard.php | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/assets/js/admin/wc-setup.js b/assets/js/admin/wc-setup.js index 6787c3a8a30..208ae3974dc 100644 --- a/assets/js/admin/wc-setup.js +++ b/assets/js/admin/wc-setup.js @@ -196,6 +196,12 @@ jQuery( function( $ ) { } ); } ); + $( '.wc-wizard-shipping-method-select .method' ).each( function() { + if ( 'live_rates' === $( this ).val() ) { + addPlugins( $( this ).data( 'plugins' ) ); + } + } ); + // Render list of plugins. if ( Object.keys( pluginLinkBySlug ).length ) { var pluginLinks = []; diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 2d6e89fe2d5..12e911cc43d 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -772,7 +772,12 @@ class WC_Admin_Setup_Wizard { ?>
- " + name="" + class="method wc-enhanced-select" + data-plugins="get_wcs_requisite_plugins() ) ); ?>" + > $method ) : ?> @@ -935,6 +940,7 @@ class WC_Admin_Setup_Wizard {

+ plugin_install_info(); ?>