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

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

- Page: https://pluginprobe.com/plugins/merchant/2.3.2/code/admin/classes/admin-options/fields/switcher/template.php
- Raw: https://pluginprobe.com/plugins/merchant/2.3.2/raw/admin/classes/admin-options/fields/switcher/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/switcher/template.php#L10-L20`.

```php
<?php
/**
 * Template: Switcher 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;
}
?>
<div class="merchant-toggle-switch">
	<input type="checkbox" id="<?php echo esc_attr( $settings['id'] ); ?>" name="merchant[<?php echo esc_attr( $settings['id'] ); ?>]" value="1" <?php checked( $value, 1, true ); ?>
		class="toggle-switch-checkbox"/>
	<label class="toggle-switch-label" for="<?php echo esc_attr( $settings['id'] ); ?>">
		<span class="toggle-switch-inner"></span>
		<span class="toggle-switch-switch"></span>
	</label>
	<?php if ( ! empty( $settings['label'] ) ) : ?>
		<span><?php echo esc_html( $settings['label'] ); ?></span>
	<?php endif; ?>
</div>

```
