# merchant/2.3.2/admin/classes/admin-options/fields/select/class-merchant-field-select.php

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

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

```php
<?php
/**
 * Merchant Field: Select
 *
 * @package Merchant
 * @since   2.2.5
 */

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

/**
 * Merchant_Field_Select
 *
 * @since 2.2.5
 */
class Merchant_Field_Select extends Merchant_Abstract_Field {

	/**
	 * Render the select field.
	 *
	 * @since 2.2.5
	 * @return void
	 */
	public function render() {
		$this->get_template_part();
	}

	/**
	 * Sanitize the select field value.
	 *
	 * @since 2.2.5
	 *
	 * @param mixed $value The raw submitted value.
	 *
	 * @return string
	 */
	protected function sanitize_value( $value ) {
		$options = isset( $this->field['options'] ) ? $this->field['options'] : array();

		return ( in_array( $value, array_map( 'strval', array_keys( $options ) ), true ) ) ? sanitize_key( $value ) : '';
	}
}

```
