Remove force link - it can be done in AS

This commit is contained in:
Mike Jolley 2019-02-28 11:15:58 +00:00
parent dbcfd7dcdc
commit d59b1c39d7
2 changed files with 1 additions and 22 deletions

View File

@ -8,19 +8,9 @@
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$force_update_url = wp_nonce_url(
add_query_arg( 'force_update_woocommerce', 'true', admin_url( 'admin.php?page=wc-settings' ) ),
'wc_force_db_update',
'wc_force_db_update_nonce'
);
?>
<div id="message" class="updated woocommerce-message wc-connect">
<p>
<strong><?php esc_html_e( 'WooCommerce data update', 'woocommerce' ); ?></strong> &#8211; <?php esc_html_e( 'Your database is being updated in the background.', 'woocommerce' ); ?>
<a href="<?php echo esc_url( $force_update_url ); ?>">
<?php esc_html_e( 'Taking a while? Click here to run it now.', 'woocommerce' ); ?>
</a>
<strong><?php esc_html_e( 'WooCommerce database update', 'woocommerce' ); ?></strong> &#8211; <?php esc_html_e( 'WooCommerce is updating the database in the background. The database update process may take a little while, so please be patient.', 'woocommerce' ); ?>
</p>
</div>

View File

@ -239,17 +239,6 @@ class WC_Install {
self::update();
WC_Admin_Notices::add_notice( 'update' );
}
if ( ! empty( $_GET['force_update_woocommerce'] ) ) { // WPCS: input var ok.
check_admin_referer( 'wc_force_db_update', 'wc_force_db_update_nonce' );
$blog_id = get_current_blog_id();
// Used to fire an action added in WP_Background_Process::_construct() that calls WP_Background_Process::handle_cron_healthcheck().
// This method will make sure the database updates are executed even if cron is disabled. Nothing will happen if the updates are already running.
do_action( 'wp_' . $blog_id . '_wc_updater_cron' );
wp_safe_redirect( admin_url( 'admin.php?page=wc-settings' ) );
exit;
}
}
/**