Don't count twice Closes #2384.
This commit is contained in:
parent
aa5db92a88
commit
f70162177a
|
@ -368,7 +368,7 @@ function woocommerce_sales_overview() {
|
|||
<div class="postbox">
|
||||
<h3><span><?php _e( 'Total sales', 'woocommerce' ); ?></span></h3>
|
||||
<div class="inside">
|
||||
<p class="stat"><?php if ($total_sales>0) echo woocommerce_price($total_sales); else _e( 'n/a', 'woocommerce' ); ?></p>
|
||||
<p class="stat"><?php if ( $total_sales > 0 ) echo woocommerce_price($total_sales); else _e( 'n/a', 'woocommerce' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="postbox">
|
||||
|
@ -2579,7 +2579,8 @@ function woocommerce_category_sales() {
|
|||
$total = 0;
|
||||
}
|
||||
|
||||
$month_totals[ $count ] += $total;
|
||||
if ( sizeof( array_intersect( $include_categories, get_ancestors( $category->term_id, 'product_cat' ) ) ) == 0 )
|
||||
$month_totals[ $count ] += $total;
|
||||
|
||||
$category_sales_html .= '<td>' . woocommerce_price( $total ) . '</td>';
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class WC_Product_Cat_Dropdown_Walker extends Walker {
|
|||
*/
|
||||
function start_el(&$output, $cat, $depth, $args) {
|
||||
|
||||
if ( $args['hierarchical'] )
|
||||
if ( ! empty( $args['hierarchical'] ) )
|
||||
$pad = str_repeat(' ', $depth * 3);
|
||||
else
|
||||
$pad = '';
|
||||
|
|
Loading…
Reference in New Issue