Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
Added hide_free schema parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
seb86 committed Dec 6, 2020
1 parent 78cdad4 commit fbbf66c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions includes/api/class-cocart-products-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,12 @@ public function get_collection_params() {
'sanitize_callback' => 'sanitize_text_field',
'validate_callback' => 'rest_validate_request_arg',
);
$params['hide_free'] = array(
'description' => __( 'Limit result set to hide free products.', 'cocart-products' ),
'type' => 'boolean',
'sanitize_callback' => 'wc_string_to_bool',
'validate_callback' => 'rest_validate_request_arg',
);
$params['featured'] = array(
'description' => __( 'Limit result set to featured products.', 'cocart-products' ),
'type' => 'boolean',
Expand Down

0 comments on commit fbbf66c

Please sign in to comment.