Skip to content

Commit

Permalink
Update: raplace hardcode pagination & sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
osmansufy authored Jan 1, 2025
1 parent b5dd089 commit 9413ddf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/REST/ProductControllerV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ public function get_product_filter_by_data() {
protected function prepare_objects_query( $request ) {
$args = parent::prepare_objects_query( $request );

$args = array_merge(
$args = array_merge(

Check warning on line 234 in includes/REST/ProductControllerV2.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Found precision alignment of 1 spaces.

Check failure on line 234 in includes/REST/ProductControllerV2.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening statement of multi-line function call not indented correctly; expected 8 spaces but found 9
$args,

Check failure on line 235 in includes/REST/ProductControllerV2.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Multi-line function call not indented correctly; expected 13 spaces but found 12
array(

Check failure on line 236 in includes/REST/ProductControllerV2.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Multi-line function call not indented correctly; expected 13 spaces but found 12
'posts_per_page' => 10,
'paged' => 1,
'posts_per_page' => isset( $request['per_page'] ) ? $request['per_page'] : 10,
'paged' => isset( $request['page'] ) ? $request['page'] : 1,
'author' => dokan_get_current_user_id(),
'orderby' => 'post_date',
'orderby' => isset( $request['orderby'] ) ? $request['orderby'] : 'date',
'post_type' => 'product',
'date_query' => [],
'tax_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query
Expand Down

0 comments on commit 9413ddf

Please sign in to comment.