exists() ) { return; } $related = $product->get_related( 5 ); if ( sizeof( $related ) == 0 ) return; $args = apply_filters( 'woocommerce_related_products_args', array( 'post_type' => 'product', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => 5, 'orderby' => $orderby, 'post__in' => $related, 'post__not_in' => array( $product->id ) ) ); $products = new WP_Query( $args ); $woocommerce_loop['columns'] = $columns; global $beau_option; if ($beau_option['style-shop-details']) { $options = $beau_option['style-shop-details']; }else{ $options = "shop-style-1"; } if ( $products->have_posts() ) : ?>