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


(int|int[]) (Required) Array of courses/memberships id.


(boolean) (Optional) Whether or not allowing empty lists.

Default value: false

Top ↑

Return Return


Top ↑

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 );

Top ↑

Changelog Changelog

Version Description
1.0.0-beta.18 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.