# merchant/2.3.2/admin/classes/admin-options/fields/checkbox-multiple/template.php

Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together &amp; More for WooCommerce – Merchant, version 2.3.2. 34 lines.

- Page: https://pluginprobe.com/plugins/merchant/2.3.2/code/admin/classes/admin-options/fields/checkbox-multiple/template.php
- Raw: https://pluginprobe.com/plugins/merchant/2.3.2/raw/admin/classes/admin-options/fields/checkbox-multiple/template.php
- Modified: 2026-09-17T17:48:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/merchant/2.3.2/code/admin/classes/admin-options/fields/checkbox-multiple/template.php#L10-L20`.

```php
<?php
/**
 * Template: Checkbox Multiple field.
 *
 * @var array<string, mixed>  $settings  Field configuration.
 * @var mixed  $value     Current saved value.
 * @var string $module_id Module ID.
 *
 * @package Merchant
 * @since   2.2.5
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! empty( $settings['options'] ) ) :
	// Both sides as strings: an option list can be keyed by integers while a
	// saved value is always a list of strings.
	$saved = array_map( 'strval', (array) $value );

	foreach ( $settings['options'] as $key => $option ) : ?>
		<label>
			<input
				type="checkbox" name="merchant[<?php echo esc_attr( $settings['id'] ); ?>][]"
				value="<?php echo esc_attr( $key ); ?>"
				<?php checked( in_array( (string) $key, $saved, true ), true ); ?>
			/>
			<span><?php echo esc_html( $option ); ?></span>
		</label>
	<?php
	endforeach;
endif;

```
