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

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

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

```php
<?php
/**
 * Template: Hook Select 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;
}

$hook_name     = isset( $value['hook_name'] ) ? $value['hook_name'] : '';
$hook_priority = isset( $value['hook_priority'] ) ? $value['hook_priority'] : '';
?>
<div class="merchant-module-page-setting-field-hook_select-wrapper">
	<div class="merchant-module-page-setting-field-select">
		<select name="merchant[<?php echo esc_attr( $settings['id'] ); ?>][hook_name]">
			<?php if ( ! empty( $settings['options'] ) ) :
				foreach ( $settings['options'] as $key => $option ) : ?>
					<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $hook_name, $key, true ); ?>><?php echo esc_html( $option ); ?></option>
				<?php endforeach;
			endif; ?>
		</select>
	</div>
	<?php if ( isset( $settings['order'] ) && true === $settings['order'] ) : ?>
		<div class="merchant-module-page-setting-field-number">
			<input type="number" name="merchant[<?php
				echo esc_attr( $settings['id'] ); ?>][hook_priority]" value="<?php
				echo esc_attr( $hook_priority ); ?>"<?php
				echo isset( $settings['step'] ) ? ' step="' . esc_attr( $settings['step'] ) . '"' : '';
				echo isset( $settings['max'] ) ? ' max="' . esc_attr( $settings['max'] ) . '"' : '';
				echo isset( $settings['min'] ) ? ' min="' . esc_attr( $settings['min'] ) . '"' : ''; ?>/>
		</div>
	<?php endif; ?>
</div>
<?php

```
