WC_Settings_Page::get_settings_ui_request_context
Settings UI request context, or null when the modern settings SDK is unavailable.
Method of the class: WC_Settings_Page{}
No Hooks.
Returns
SettingsUIRequestContext|null.
Usage
// protected - for code of main (parent) or child class $result = $this->get_settings_ui_request_context( $section );
- $section(string) (required)
- Section id.
WC_Settings_Page::get_settings_ui_request_context() WC Settings Page::get settings ui request context code WC 10.9.3
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;
}
}