WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin

Loader::add_settings() public WC 1.0

Add WC Admin specific settings

{} Это метод класса: Loader{}

Хуков нет.

Возвращает

Массив.

Использование

$result = Loader::add_settings( $settings );
$settings(массив) (обязательный)
Array of settings in wc admin group.

Код Loader::add_settings() WC 4.7.1

<?php
public static function add_settings( $settings ) {
	$unregistered_statuses = self::get_unregistered_order_statuses();
	$registered_statuses   = self::get_order_statuses( wc_get_order_statuses() );
	$all_statuses          = array_merge( $unregistered_statuses, $registered_statuses );

	$settings[] = array(
		'id'          => 'woocommerce_excluded_report_order_statuses',
		'option_key'  => 'woocommerce_excluded_report_order_statuses',
		'label'       => __( 'Excluded report order statuses', 'woocommerce' ),
		'description' => __( 'Statuses that should not be included when calculating report totals.', 'woocommerce' ),
		'default'     => array( 'pending', 'cancelled', 'failed' ),
		'type'        => 'multiselect',
		'options'     => $all_statuses,
	);
	$settings[] = array(
		'id'          => 'woocommerce_actionable_order_statuses',
		'option_key'  => 'woocommerce_actionable_order_statuses',
		'label'       => __( 'Actionable order statuses', 'woocommerce' ),
		'description' => __( 'Statuses that require extra action on behalf of the store admin.', 'woocommerce' ),
		'default'     => array( 'processing', 'on-hold' ),
		'type'        => 'multiselect',
		'options'     => $all_statuses,
	);
	$settings[] = array(
		'id'          => 'woocommerce_default_date_range',
		'option_key'  => 'woocommerce_default_date_range',
		'label'       => __( 'Default Date Range', 'woocommerce' ),
		'description' => __( 'Default Date Range', 'woocommerce' ),
		'default'     => 'period=month&compare=previous_year',
		'type'        => 'text',
	);
	return $settings;
}