WC_Settings_Page::get_settings()
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(); $WC_Settings_Page->get_settings();
Список изменений
Устарела с 5.4.0 | Use 'get_settings_for_section' (passing an empty string for default section) |
Код WC_Settings_Page::get_settings() WC Settings Page::get settings WC 9.5.1
public function get_settings() { $section_id = 0 === func_num_args() ? '' : func_get_arg( 0 ); return $this->get_settings_for_section( $section_id ); }