get_upsells() ) { return; } 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' => '999', 'orderby' => '', 'post__in' => $upsells, 'post__not_in' => array( $product->get_id() ), 'meta_query' => $meta_query ); $products = new WP_Query( $args ); $type = flatsome_option('related_products'); if($type == 'grid') $type = 'row'; $repater['type'] = $type; $repater['columns'] = flatsome_option('related_products_pr_row'); $repater['slider_style'] = 'reveal'; $repater['row_spacing'] = 'small'; if ( $products->have_posts() ) : ?>