Possible fix for #1882.

This commit is contained in:
Mike Jolley 2012-11-29 12:50:02 +00:00
parent 1edf98e95f
commit 37de4f62cb
1 changed files with 4 additions and 4 deletions

View File

@ -1879,6 +1879,10 @@ function woocommerce_date_format() {
function _woocommerce_term_recount( $terms, $taxonomy, $callback = true, $terms_are_term_taxonomy_ids = true ) {
global $wpdb;
// Standard callback
if ( $callback )
_update_post_term_count( $terms, $taxonomy );
// Stock query
if ( get_option( 'woocommerce_hide_out_of_stock_items' ) == 'yes' ) {
$stock_join = "LEFT JOIN {$wpdb->postmeta} AS meta_stock ON posts.ID = meta_stock.post_id";
@ -1988,10 +1992,6 @@ function _woocommerce_term_recount( $terms, $taxonomy, $callback = true, $terms_
}
}
// Standard callback
if ( $callback )
_update_post_term_count( $terms, $taxonomy );
}
/**