@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | 'validate_callback' => 'rest_validate_request_arg', |
| 571 | 571 | ); |
| 572 | 572 | } |
| 573 | - $params['order'] = array( |
|
| 573 | + $params['order'] = array( |
|
| 574 | 574 | 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), |
| 575 | 575 | 'type' => 'string', |
| 576 | 576 | 'sanitize_callback' => 'sanitize_key', |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | ), |
| 582 | 582 | 'validate_callback' => 'rest_validate_request_arg', |
| 583 | 583 | ); |
| 584 | - $params['orderby'] = array( |
|
| 584 | + $params['orderby'] = array( |
|
| 585 | 585 | 'description' => __( 'Sort collection by resource attribute.', 'woocommerce' ), |
| 586 | 586 | 'type' => 'string', |
| 587 | 587 | 'sanitize_callback' => 'sanitize_key', |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | 'default' => null, |
| 618 | 618 | 'validate_callback' => 'rest_validate_request_arg', |
| 619 | 619 | ); |
| 620 | - $params['slug'] = array( |
|
| 620 | + $params['slug'] = array( |
|
| 621 | 621 | 'description' => __( 'Limit result set to resources with a specific slug.', 'woocommerce' ), |
| 622 | 622 | 'type' => 'string', |
| 623 | 623 | 'validate_callback' => 'rest_validate_request_arg', |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | $valid_vars = array_flip( $this->get_allowed_query_vars() ); |
| 588 | 588 | $query_args = array(); |
| 589 | 589 | foreach ( $valid_vars as $var => $index ) { |
| 590 | - if ( isset( $prepared_args[ $var ] ) ) { |
|
| 590 | + if ( isset( $prepared_args[$var] ) ) { |
|
| 591 | 591 | /** |
| 592 | 592 | * Filter the query_vars used in `get_items` for the constructed query. |
| 593 | 593 | * |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | * |
| 596 | 596 | * @param mixed $prepared_args[ $var ] The query_var value. |
| 597 | 597 | */ |
| 598 | - $query_args[ $var ] = apply_filters( "woocommerce_rest_query_var_{$var}", $prepared_args[ $var ] ); |
|
| 598 | + $query_args[$var] = apply_filters( "woocommerce_rest_query_var_{$var}", $prepared_args[$var] ); |
|
| 599 | 599 | } |
| 600 | 600 | } |
| 601 | 601 | |