Remove force link - it can be done in AS
This commit is contained in:
parent
dbcfd7dcdc
commit
d59b1c39d7
|
@ -8,19 +8,9 @@
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
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">
|
<div id="message" class="updated woocommerce-message wc-connect">
|
||||||
<p>
|
<p>
|
||||||
<strong><?php esc_html_e( 'WooCommerce data update', 'woocommerce' ); ?></strong> – <?php esc_html_e( 'Your database is being updated in the background.', 'woocommerce' ); ?>
|
<strong><?php esc_html_e( 'WooCommerce database update', 'woocommerce' ); ?></strong> – <?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' ); ?>
|
||||||
<a href="<?php echo esc_url( $force_update_url ); ?>">
|
|
||||||
<?php esc_html_e( 'Taking a while? Click here to run it now.', 'woocommerce' ); ?>
|
|
||||||
</a>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -239,17 +239,6 @@ class WC_Install {
|
||||||
self::update();
|
self::update();
|
||||||
WC_Admin_Notices::add_notice( '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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue