WC_Settings_Page::get_settings()publicWC 1.0

Устарела с версии 5.4.0. Больше не поддерживается и может быть удалена. Используйте get_settings_for_section' (passing an empty string for default section).

Get settings array for the default section.

External settings classes (registered via woocommerce_get_settings_pages might have redefined this method as "get_settings($section_id='')", thus we need to use this method internally instead of 'get_settings_for_section' to register settings and render settings pages.

But we can't just redefine the method as "get_settings($section_id='')" here, since this will break on PHP 8 if any external setting class have it as get_settings().

Thus we leave the method signature as is and use 'func_get_arg' to get the setting id if it's supplied, and we use this method internally; but it's deprecated and should otherwise never be used.

Метод класса: WC_Settings_Page{}

Хуков нет.


Массив. Settings array, each item being an associative array representing a setting.


$WC_Settings_Page = new WC_Settings_Page();

Список изменений

Устарела с 5.4.0 Use 'get_settings_for_section' (passing an empty string for default section)

Код WC_Settings_Page::get_settings() WC 8.7.0

public function get_settings() {
	$section_id = 0 === func_num_args() ? '' : func_get_arg( 0 );
	return $this->get_settings_for_section( $section_id );