WC_Settings_Page::log_settings_ui_fallbackprivateWC 10.9.0

Log a developer-facing notice when settings UI rendering falls back to the legacy renderer.

Method of the class: WC_Settings_Page{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->log_settings_ui_fallback( $settings_ui_page, $section_id, $reason ): void;
$settings_ui_page(SettingsUIPageInterface) (required)
Settings UI page adapter.
$section_id(string) (required)
Section id.
$reason(string) (required)
Fallback reason.

Changelog

Since 10.9.0 Introduced.

WC_Settings_Page::log_settings_ui_fallback() code WC 10.9.3

private function log_settings_ui_fallback( SettingsUIPageInterface $settings_ui_page, string $section_id, string $reason ): void {
	wc_doing_it_wrong(
		'WC_Settings_Page::output',
		sprintf(
			/* translators: 1: settings page id, 2: settings section id, 3: fallback reason. */
			__( 'Settings UI rendering for page "%1$s" section "%2$s" fell back to the legacy settings renderer. Reason: %3$s', 'woocommerce' ),
			$settings_ui_page->get_page_id(),
			'' === $section_id ? 'default' : $section_id,
			$reason
		),
		'10.9.0'
	);
}