Skip to content

Instantly share code, notes, and snippets.

@themeblvd
Created May 11, 2017 17:39
Show Gist options
  • Save themeblvd/3087e994d060ad77d3be291ab5f22903 to your computer and use it in GitHub Desktop.
Save themeblvd/3087e994d060ad77d3be291ab5f22903 to your computer and use it in GitHub Desktop.
<?php
/**
* Up sell product display. Override Woo's woocommerce_upsell_display().
*
* @since 2.5.0
*/
public function up_sell() {
$args = apply_filters('themeblvd_woocommerce_up_sell_args', array(
'posts_per_page' => '-1',
'orderby' => apply_filters('woocommerce_upsells_orderby', 'rand'), // woo default filter, let's keep it for compat
'order' => 'desc',
'columns' => $this->loop_columns()
));
woocommerce_upsell_display(
$args['posts_per_page'],
$args['columns'],
$args['orderby'],
$args['order']
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment