Skip to content

Commit

Permalink
Merge pull request #1 from rpmoulton/patch-1
Browse files Browse the repository at this point in the history
Small update to woocommerce-display-order-count
  • Loading branch information
bekarice authored Sep 22, 2017
2 parents fd652ad + d8f1a17 commit 669652e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions woocommerce-display-order-count.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ function display_woocommerce_order_count( $atts, $content = null ) {

// if we didn't get a wc- prefix, add one
if ( 0 !== strpos( $status, 'wc-' ) ) {
$status = str_replace( $status, 'wc-' . $status, $status );
$status = 'wc-' . $status;
}

$total_orders = wp_count_posts( 'shop_order' )->$status;

$order_count += $total_orders;
$order_count += wp_count_posts( 'shop_order' )->$status;
}

ob_start();
Expand Down

0 comments on commit 669652e

Please sign in to comment.