get_upsells(); if ( sizeof( $upsells ) === 0 ) { return; } $meta_query = WC()->query->get_meta_query(); $args = array( 'post_type' => 'product', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => 8, 'orderby' => $orderby, 'post__in' => $upsells, 'post__not_in' => array( $product->get_id() ), 'meta_query' => $meta_query ); if(!empty($ascend['wc_upsell_products_text'])) { $upsell_text = $ascend['wc_upsell_products_text']; } else { $upsell_text = __( 'You may also like', 'ascend'); } $products = new WP_Query( $args ); if ( $products->have_posts() ) : ?>