Merge remote-tracking branch 'origin/master'

This commit is contained in:
Mike Jolley 2015-12-14 12:48:26 +00:00
commit 3e2df95968
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ class WC_Admin_Menus {
unset( $submenu['woocommerce'][0] );
// Add count if user has access
if ( current_user_can( 'manage_woocommerce' ) && ( $order_count = wc_processing_order_count() ) ) {
if ( apply_filters( 'woocommerce_include_processing_order_count_in_menu', true ) && current_user_can( 'manage_woocommerce' ) && ( $order_count = wc_processing_order_count() ) ) {
foreach ( $submenu['woocommerce'] as $key => $menu_item ) {
if ( 0 === strpos( $menu_item[0], _x( 'Orders', 'Admin menu name', 'woocommerce' ) ) ) {
$submenu['woocommerce'][ $key ][0] .= ' <span class="awaiting-mod update-plugins count-' . $order_count . '"><span class="processing-count">' . number_format_i18n( $order_count ) . '</span></span>';

View File

@ -869,7 +869,7 @@ class WC_Query {
WHERE post_type IN ( 'product', 'product_variation' )
AND post_status = 'publish'
AND pm1.meta_key IN ('" . implode( "','", array_map( 'esc_sql', apply_filters( 'woocommerce_price_filter_meta_keys', array( '_price' ) ) ) ) . "')
AND pm1.meta_value BETWEEN %d AND %d
AND pm1.meta_value BETWEEN %f AND %f
AND pm2.meta_key = '_tax_class'
AND pm2.meta_value = %s
", $min_class, $max_class, sanitize_title( $tax_class ) ), OBJECT_K ), $min_class, $max_class );