diff --git a/admin/woocommerce-admin-init.php b/admin/woocommerce-admin-init.php index c773295c736..16dfccdbc4e 100644 --- a/admin/woocommerce-admin-init.php +++ b/admin/woocommerce-admin-init.php @@ -63,9 +63,6 @@ function woocommerce_admin_installed_notice() { init_taxonomy(); + + // Add default taxonomies woocommerce_default_taxonomies(); // Install folder for uploading files and prevent hotlinking @@ -45,9 +50,6 @@ function do_install_woocommerce() { // Update version update_option( "woocommerce_db_version", $woocommerce->version ); - - // Flush rewrites - flush_rewrite_rules( false ); } /** @@ -286,27 +288,6 @@ function woocommerce_tables_install() { */ function woocommerce_default_taxonomies() { - if (!post_type_exists('product')) : - register_post_type('product', - array( - 'public' => true, - 'show_ui' => true, - 'capability_type' => 'post', - 'publicly_queryable' => true, - 'exclude_from_search' => false, - 'hierarchical' => true, - 'query_var' => true, - 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments' ), - 'show_in_nav_menus' => false, - ) - ); - endif; - - if (!taxonomy_exists('product_type')) : - register_taxonomy( 'product_type', array('post', 'product')); - register_taxonomy( 'shop_order_status', array('post', 'product')); - endif; - $product_types = array( 'simple', 'grouped', diff --git a/admin/woocommerce-admin-settings.php b/admin/woocommerce-admin-settings.php index 7763b8c5f18..47938f34f17 100644 --- a/admin/woocommerce-admin-settings.php +++ b/admin/woocommerce-admin-settings.php @@ -1033,6 +1033,8 @@ function woocommerce_settings() { wp_redirect( add_query_arg( 'subtab', esc_attr(str_replace('#', '', $_POST['subtab'])), add_query_arg( 'saved', 'true', admin_url( 'admin.php?page=woocommerce&tab=' . $current_tab ) )) ); + exit; + } // Settings saved message diff --git a/readme.txt b/readme.txt index 92e70172c67..feb64efdc2e 100644 --- a/readme.txt +++ b/readme.txt @@ -90,6 +90,8 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo * Fix for reducing/increasing stock notifications * Don't reset shipping method on cart during every update * Method availability (country) for local pickup/delivery +* Fixed permalinks in shortcodes +* Install process tweaks (for flushing post type rules) = 1.4.3 - 16/02/2012 = * Fix for variation shipping class detection diff --git a/woocommerce.php b/woocommerce.php index 75f43b3cfae..d4f96c5744b 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -257,6 +257,7 @@ class Woocommerce { **/ function install() { register_activation_hook( __FILE__, 'activate_woocommerce' ); + register_activation_hook( __FILE__, 'flush_rewrite_rules' ); if ( get_option('woocommerce_db_version') != $this->version ) : add_action('init', 'install_woocommerce', 0); endif; } @@ -441,6 +442,8 @@ class Woocommerce { **/ function init_taxonomy() { + if (post_type_exists('product')) return; + /** * Slugs **/