|
@@ 53-55 (lines=3) @@
|
| 50 |
|
* Add a default renderer for WooCommerce products within infinite scroll. |
| 51 |
|
*/ |
| 52 |
|
function jetpack_woocommerce_infinite_scroll_render() { |
| 53 |
|
if ( ! is_shop() && ! is_product_taxonomy() && ! is_product_category() && ! is_product_tag() ) { |
| 54 |
|
return; |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
woocommerce_product_loop_start(); |
| 58 |
|
|
|
@@ 74-76 (lines=3) @@
|
| 71 |
|
* @return void |
| 72 |
|
*/ |
| 73 |
|
function jetpack_woocommerce_infinite_scroll_settings( $settings ) { |
| 74 |
|
if ( ! is_shop() && ! is_product_taxonomy() && ! is_product_category() && ! is_product_tag() ) { |
| 75 |
|
return $settings; |
| 76 |
|
} |
| 77 |
|
$settings['posts_per_page'] = absint( apply_filters( 'loop_shop_per_page', wc_get_default_products_per_row() * wc_get_default_product_rows_per_page() ) ); |
| 78 |
|
return $settings; |
| 79 |
|
} |