WooCommerce Code Reference

CheckboxList

CheckboxList class. This is a component for reuse with interactivity API.

Table of Contents

render()  : string|false
Render the checkbox list.

Methods

render()

Render the checkbox list.

public static render(mixed $props) : string|false
Parameters
$props : mixed

The properties to render the dropdown with. items: array of objects with label and value properties. - id: string of the id to use for the checkbox (optional). - checked: boolean to indicate if the checkbox is checked. - label: string of the label to display (plaintext or HTML). - aria_label: string of the aria label to use for the checkbox. (optional, plaintext only). - value: string of the value to use. on_change: string of the action to perform when the dropdown changes.

Return values
string|false