includes/class-wc-shortcodes.php 1 location
|
@@ 394-406 (lines=13) @@
|
| 391 |
|
|
| 392 |
|
$products = new WP_Query( apply_filters( 'woocommerce_shortcode_products_query', $args, $atts ) ); |
| 393 |
|
|
| 394 |
|
if ( $products->have_posts() ) : ?> |
| 395 |
|
|
| 396 |
|
<?php woocommerce_product_loop_start(); ?> |
| 397 |
|
|
| 398 |
|
<?php while ( $products->have_posts() ) : $products->the_post(); ?> |
| 399 |
|
|
| 400 |
|
<?php wc_get_template_part( 'content', 'product' ); ?> |
| 401 |
|
|
| 402 |
|
<?php endwhile; // end of the loop. ?> |
| 403 |
|
|
| 404 |
|
<?php woocommerce_product_loop_end(); ?> |
| 405 |
|
|
| 406 |
|
<?php endif; |
| 407 |
|
|
| 408 |
|
wp_reset_postdata(); |
| 409 |
|
|
templates/single-product/related.php 1 location
|
@@ 47-65 (lines=19) @@
|
| 44 |
|
$woocommerce_loop['name'] = 'related'; |
| 45 |
|
$woocommerce_loop['columns'] = apply_filters( 'woocommerce_related_products_columns', $columns ); |
| 46 |
|
|
| 47 |
|
if ( $products->have_posts() ) : ?> |
| 48 |
|
|
| 49 |
|
<div class="related products"> |
| 50 |
|
|
| 51 |
|
<h2><?php _e( 'Related Products', 'woocommerce' ); ?></h2> |
| 52 |
|
|
| 53 |
|
<?php woocommerce_product_loop_start(); ?> |
| 54 |
|
|
| 55 |
|
<?php while ( $products->have_posts() ) : $products->the_post(); ?> |
| 56 |
|
|
| 57 |
|
<?php wc_get_template_part( 'content', 'product' ); ?> |
| 58 |
|
|
| 59 |
|
<?php endwhile; // end of the loop. ?> |
| 60 |
|
|
| 61 |
|
<?php woocommerce_product_loop_end(); ?> |
| 62 |
|
|
| 63 |
|
</div> |
| 64 |
|
|
| 65 |
|
<?php endif; |
| 66 |
|
|
| 67 |
|
wp_reset_postdata(); |
| 68 |
|
|
templates/cart/cross-sells.php 1 location
|
@@ 43-61 (lines=19) @@
|
| 40 |
|
$woocommerce_loop['name'] = 'cross-sells'; |
| 41 |
|
$woocommerce_loop['columns'] = apply_filters( 'woocommerce_cross_sells_columns', $columns ); |
| 42 |
|
|
| 43 |
|
if ( $products->have_posts() ) : ?> |
| 44 |
|
|
| 45 |
|
<div class="cross-sells"> |
| 46 |
|
|
| 47 |
|
<h2><?php _e( 'You may be interested in…', 'woocommerce' ) ?></h2> |
| 48 |
|
|
| 49 |
|
<?php woocommerce_product_loop_start(); ?> |
| 50 |
|
|
| 51 |
|
<?php while ( $products->have_posts() ) : $products->the_post(); ?> |
| 52 |
|
|
| 53 |
|
<?php wc_get_template_part( 'content', 'product' ); ?> |
| 54 |
|
|
| 55 |
|
<?php endwhile; // end of the loop. ?> |
| 56 |
|
|
| 57 |
|
<?php woocommerce_product_loop_end(); ?> |
| 58 |
|
|
| 59 |
|
</div> |
| 60 |
|
|
| 61 |
|
<?php endif; |
| 62 |
|
|
| 63 |
|
wp_reset_query(); |
| 64 |
|
|
templates/single-product/up-sells.php 1 location
|
@@ 44-62 (lines=19) @@
|
| 41 |
|
$woocommerce_loop['name'] = 'up-sells'; |
| 42 |
|
$woocommerce_loop['columns'] = apply_filters( 'woocommerce_up_sells_columns', $columns ); |
| 43 |
|
|
| 44 |
|
if ( $products->have_posts() ) : ?> |
| 45 |
|
|
| 46 |
|
<div class="up-sells upsells products"> |
| 47 |
|
|
| 48 |
|
<h2><?php _e( 'You may also like…', 'woocommerce' ) ?></h2> |
| 49 |
|
|
| 50 |
|
<?php woocommerce_product_loop_start(); ?> |
| 51 |
|
|
| 52 |
|
<?php while ( $products->have_posts() ) : $products->the_post(); ?> |
| 53 |
|
|
| 54 |
|
<?php wc_get_template_part( 'content', 'product' ); ?> |
| 55 |
|
|
| 56 |
|
<?php endwhile; // end of the loop. ?> |
| 57 |
|
|
| 58 |
|
<?php woocommerce_product_loop_end(); ?> |
| 59 |
|
|
| 60 |
|
</div> |
| 61 |
|
|
| 62 |
|
<?php endif; |
| 63 |
|
|
| 64 |
|
wp_reset_postdata(); |
| 65 |
|
|