llms_rest_validate_products( int|int[] $products, boolean $allow_empty = false )
Validate submitted array of integers is an array of real courses/memberships id, or empty.
Parameters Parameters
- $products
-
(int|int[]) (Required) Array of courses/memberships id.
- $allow_empty
-
(boolean) (Optional) Whether or not allowing empty lists.
Default value: false
Return Return
(boolean)
Source Source
File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php
function llms_rest_validate_products( $products, $allow_empty = false ) { return llms_rest_validate_post_types( $products, array( 'course', 'llms_membership' ), $allow_empty ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Introduced. |