This commit is contained in:
Mike Jolley 2013-03-06 13:43:53 +00:00
parent 31bb8a8cdb
commit dbc6d47197
2 changed files with 4 additions and 6 deletions

View File

@ -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 );
?>

View File

@ -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;