* Fix - ordering_args in product_category shortcode.

This commit is contained in:
Mike Jolley 2015-08-11 12:04:30 +01:00
parent 34aa0e9f9d
commit faa8ab02e0
2 changed files with 6 additions and 5 deletions

View File

@ -168,7 +168,10 @@ class WC_Shortcodes {
return '';
}
$query_args = array(
// Default ordering args
$ordering_args = WC()->query->get_catalog_ordering_args( $atts['orderby'], $atts['order'] );
$meta_query = WC()->query->get_meta_query();
$query_args = array(
'post_type' => 'product',
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
@ -190,10 +193,7 @@ class WC_Shortcodes {
$query_args['meta_key'] = $ordering_args['meta_key'];
}
// Default ordering args
$ordering_args = WC()->query->get_catalog_ordering_args( $atts['orderby'], $atts['order'] );
$meta_query = WC()->query->get_meta_query();
$return = self::product_loop( $query_args, $atts, 'product_cat' );
$return = self::product_loop( $query_args, $atts, 'product_cat' );
// Remove ordering query arguments
WC()->query->remove_ordering_args();

View File

@ -161,6 +161,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Fix - If all variations are out of stock, maintain pricing display.
* Fix - Prevent double add to cart due to ajax endpoints.
* Fix - ordering_args in product_category shortcode.
* Tweak - If no variation prices are found, show no price label rather than free.
* Tweak - Made tab panel selector more specific to avoid theme conflicts.
* Tweak - Made checkout make use of new ajax endpoints.