Automattic\WooCommerce\Internal\ProductAttributes

VisualAttributeTermAdmin::get_default_color_terms │ private static │ WC 1.0

Get the default color terms to create for a new wc-visual attribute.

Method of the class: VisualAttributeTermAdmin{}

No Hooks.

Returns

array<string, array{label: string, color: string}>.

Usage

$result = VisualAttributeTermAdmin::get_default_color_terms(): array;

VisualAttributeTermAdmin::get_default_color_terms() code WC 11.1.2

private static function get_default_color_terms(): array {
	return array(
		'black'  => array(
			'label' => __( 'Black', 'woocommerce' ),
			'color' => '#121212',
		),
		'white'  => array(
			'label' => __( 'White', 'woocommerce' ),
			'color' => '#FFFFFF',
		),
		'gray'   => array(
			'label' => __( 'Gray', 'woocommerce' ),
			'color' => '#6E6E6E',
		),
		'red'    => array(
			'label' => __( 'Red', 'woocommerce' ),
			'color' => '#D32F2F',
		),
		'blue'   => array(
			'label' => __( 'Blue', 'woocommerce' ),
			'color' => '#1976D2',
		),
		'green'  => array(
			'label' => __( 'Green', 'woocommerce' ),
			'color' => '#388E3C',
		),
		'yellow' => array(
			'label' => __( 'Yellow', 'woocommerce' ),
			'color' => '#FBE02D',
		),
		'pink'   => array(
			'label' => __( 'Pink', 'woocommerce' ),
			'color' => '#EC407A',
		),
		'brown'  => array(
			'label' => __( 'Brown', 'woocommerce' ),
			'color' => '#5D4037',
		),
	);
}