# merchant/2.2.7/inc/classes/class-merchant-option.php

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

- Page: https://pluginprobe.com/plugins/merchant/2.2.7/code/inc/classes/class-merchant-option.php
- Raw: https://pluginprobe.com/plugins/merchant/2.2.7/raw/inc/classes/class-merchant-option.php
- Modified: 2026-05-21T18:12:40+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.2.7/code/inc/classes/class-merchant-option.php#L10-L20`.

```php
<?php
/**
 * Merchant_Option Class.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! class_exists( 'Merchant_Option' ) ) {

	class Merchant_Option {

		/**
		 * Option name
		 */
		public static $option = 'merchant';

		/**
		 * The single class instance.
		 */
		private static $instance = null;

		/**
		 * Instance.
		 */
		public static function instance() {
			if ( is_null( self::$instance ) ) {
				self::$instance = new self();
			}
			return self::$instance;
		}

		/**
		 * Constructor.
		 */
		public function __construct() {}

		/**
		 * Get option.
		 */
		public static function get( $module, $setting, $default_val = null ) {

			$options = get_option( 'merchant', array() );

			$value = $default_val;

			if ( isset( $options[ $module ] ) && isset( $options[ $module ][ $setting ] ) ) {
				$value = $options[ $module ][ $setting ];
			}

			return $value;
		}
	}

}

```
