diff --git a/admin/admin-install.php b/admin/admin-install.php index dab85f59bdd..e141ad348e0 100644 --- a/admin/admin-install.php +++ b/admin/admin-install.php @@ -61,10 +61,11 @@ function install_woocommerce() { */ add_action('admin_init', 'install_woocommerce_redirect'); function install_woocommerce_redirect() { - global $pagenow; + global $pagenow, $woocommerce; if ( is_admin() && isset( $_GET['activate'] ) && ($_GET['activate'] == true) && $pagenow == 'plugins.php' && get_option( "woocommerce_installed" ) == 1 ) : + $woocommerce->clear_product_transients(); update_option( "woocommerce_installed", 0 ); flush_rewrite_rules( false ); wp_redirect(admin_url('admin.php?page=woocommerce&installed=true')); diff --git a/classes/product.class.php b/classes/product.class.php index 0fc4c9c1759..c8d1ad66502 100644 --- a/classes/product.class.php +++ b/classes/product.class.php @@ -161,7 +161,7 @@ class woocommerce_product { if ( false === ( $this->children = get_transient( $transient_name ) ) ) : - $this->children = get_posts( 'post_parent='.$this->id.'&post_type='.$child_post_type.'&orderby=menu_order&order=ASC&fields=ids&post_status=any' ); + $this->children = get_posts( 'post_parent='.$this->id.'&post_type='.$child_post_type.'&orderby=menu_order&order=ASC&fields=ids&post_status=any&numberposts=-1' ); set_transient( $transient_name, $this->children ); diff --git a/classes/woocommerce.class.php b/classes/woocommerce.class.php index cc0583440dd..1606be2f7e4 100644 --- a/classes/woocommerce.class.php +++ b/classes/woocommerce.class.php @@ -340,6 +340,9 @@ class woocommerce { $post_id = (int) $post_id; delete_transient('woocommerce_product_total_stock_'.$post_id); delete_transient('woocommerce_product_children_ids_'.$post_id); + else : + $wpdb->query("DELETE FROM `$wpdb->options` WHERE `option_name` LIKE ('_transient_woocommerce_product_children_ids_%')"); + $wpdb->query("DELETE FROM `$wpdb->options` WHERE `option_name` LIKE ('_transient_woocommerce_product_total_stock_%')"); endif; } diff --git a/readme.txt b/readme.txt index e7424d78a65..6e0c5db7547 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,8 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo * Fix for sale price logic * Related products array_diff fix * Fixed Produkt-Kategorie in formal german translation +* Variations limit fix +* Transients cleared on install = 1.2.2 - 17/11/2011 = * Minor fixes and optimisations