filters for cross-sell display

This commit is contained in:
James Koster 2013-04-08 11:46:11 +01:00
parent fa91ef80d4
commit b5959a5d20
2 changed files with 4 additions and 3 deletions

View File

@ -193,6 +193,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - created an icon font for the star ratings to improve consistency
* Tweak - woocommerce_show_page_title filter
* Tweak - wrapper / css tweaks for TwentyThirteen compatibility
* Tweak - Added filters for controlling cross-sell display
* Localisation - NZ States
= 2.0.5 - 26/03/2013 =

View File

@ -22,7 +22,7 @@ $meta_query[] = $woocommerce->query->stock_status_meta_query();
$args = array(
'post_type' => 'product',
'ignore_sticky_posts' => 1,
'posts_per_page' => 2,
'posts_per_page' => apply_filters( 'woocommerce_cross_sells_total', 2 ),
'no_found_rows' => 1,
'orderby' => 'rand',
'post__in' => $crosssells,
@ -31,7 +31,7 @@ $args = array(
$products = new WP_Query( $args );
$woocommerce_loop['columns'] = 2;
$woocommerce_loop['columns'] = apply_filters( 'woocommerce_cross_sells_columns', 2 );
if ( $products->have_posts() ) : ?>
@ -53,4 +53,4 @@ if ( $products->have_posts() ) : ?>
<?php endif;
wp_reset_query();
wp_reset_query();