WC_Helper_Options::get( string $key, mixed $default = false )

Get an option by key


Description Description

See also See also


Top ↑

Parameters Parameters

$key

(Required) The key to fetch.

$default

(Optional) The default option to return if the key does not exist.

Default value: false


Top ↑

Return Return

(mixed) An option or the default.


Top ↑

Source Source

File: includes/admin/helper/class-wc-helper-options.php

	public static function get( $key, $default = false ) {
		$options = get_option( self::$option_name, array() );
		if ( array_key_exists( $key, $options ) ) {
			return $options[ $key ];
		}

		return $default;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.