WC_Settings_Page::get_settings_ui_request_context
Settings UI request context, or null when the modern settings SDK is unavailable.
Метод класса: WC_Settings_Page{}
Хуков нет.
Возвращает
SettingsUIRequestContext|null.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_settings_ui_request_context( $section );
- $section(строка) (обязательный)
- Section id.
Код WC_Settings_Page::get_settings_ui_request_context() WC Settings Page::get settings ui request context WC 11.3.0
protected function get_settings_ui_request_context( $section ) {
try {
if ( ! class_exists( SettingsUIRequestContext::class ) ) {
return null;
}
return SettingsUIRequestContext::for_settings_page( $this, $section );
} catch ( \Throwable $e ) {
return null;
}
}