.gitkeep
4 years ago
block-helpers.php
1 year ago
block-style-helpers.php
7 months ago
collection-helpers.php
1 month ago
cookie-helpers.php
1 year ago
kses-helpers.php
5 months ago
product-helpers.php
4 months ago
product-review-helpers.php
5 months ago
route-helper.php
2 years ago
state-helpers.php
2 years ago
template-helpers.php
5 months ago
product-review-helpers.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | use SureCart\Models\Blocks\ProductReviewListBlock; |
| 4 | |
| 5 | if ( ! function_exists( 'sc_product_review_list_query' ) ) { |
| 6 | /** |
| 7 | * Get the product review list query. |
| 8 | * |
| 9 | * @param \WP_Block $block The block. |
| 10 | * @param string $product_id The product ID. |
| 11 | * |
| 12 | * @return \WP_Query |
| 13 | */ |
| 14 | function sc_product_review_list_query( $block, $product_id ) { |
| 15 | // we are handling regular product list queries here. |
| 16 | $controller = new ProductReviewListBlock( $block, $product_id ); |
| 17 | return $controller->query(); |
| 18 | } |
| 19 | } |
| 20 |