Flush on upgrade
This commit is contained in:
parent
89153d2920
commit
995421b34f
|
@ -122,6 +122,10 @@ class WC_Welcome_Page {
|
|||
private function intro() {
|
||||
global $woocommerce;
|
||||
|
||||
// Flush rules after update
|
||||
if ( ! empty( $_GET['wc-updated'] ) )
|
||||
flush_rewrite_rules( false );
|
||||
|
||||
// Drop minor version if 0
|
||||
$major_version = strstr( $woocommerce->version, '0.0' ) ? substr( $woocommerce->version, 0, 3 ) : $woocommerce->version;
|
||||
?>
|
||||
|
|
|
@ -284,9 +284,6 @@ function woocommerce_admin_init() {
|
|||
delete_option( '_wc_install_pages' );
|
||||
delete_option( '_wc_needs_update' );
|
||||
|
||||
// Flush rules after update
|
||||
flush_rewrite_rules( false );
|
||||
|
||||
// What's new redirect
|
||||
wp_safe_redirect( admin_url( 'index.php?page=wc-about&wc-updated=true' ) );
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue