Flushes
This commit is contained in:
parent
31bb8a8cdb
commit
dbc6d47197
|
@ -124,6 +124,10 @@ class WC_Welcome_Page {
|
|||
private function intro() {
|
||||
global $woocommerce;
|
||||
|
||||
// Flush after upgrades
|
||||
if ( ! empty( $_GET['wc-updated'] ) || ! empty( $_GET['wc-installed'] ) )
|
||||
flush_rewrite_rules();
|
||||
|
||||
// Drop minor version if 0
|
||||
$major_version = substr( $woocommerce->version, 0, 3 );
|
||||
?>
|
||||
|
|
|
@ -242,9 +242,6 @@ function woocommerce_admin_init() {
|
|||
delete_option( '_wc_needs_pages' );
|
||||
delete_transient( '_wc_activation_redirect' );
|
||||
|
||||
// Flush rules after install
|
||||
flush_rewrite_rules();
|
||||
|
||||
// What's new redirect
|
||||
wp_safe_redirect( admin_url( 'index.php?page=wc-about&wc-installed=true' ) );
|
||||
exit;
|
||||
|
@ -274,9 +271,6 @@ function woocommerce_admin_init() {
|
|||
delete_option( '_wc_needs_update' );
|
||||
delete_transient( '_wc_activation_redirect' );
|
||||
|
||||
// Flush rules after install
|
||||
flush_rewrite_rules();
|
||||
|
||||
// What's new redirect
|
||||
wp_safe_redirect( admin_url( 'index.php?page=wc-about&wc-updated=true' ) );
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue