Automattic\WooCommerce\Internal\Admin\Settings
SettingsUIRequestContext::log_resolution_failure
Log a Settings UI resolution failure for developers.
Method of the class: SettingsUIRequestContext{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = SettingsUIRequestContext::log_resolution_failure( $subject, $page_id, $section, $e, $caller ): void;
- $subject(string) (required)
- What failed to resolve, e.g.
'Settings UI schema'. - $page_id(string) (required)
- Settings page id.
- $section(string) (required)
- Section id. Empty string means the default section.
- $e(Throwable) (required)
- The resolution failure.
- $caller(string) (required)
- Calling method, for exception tracking.
SettingsUIRequestContext::log_resolution_failure() SettingsUIRequestContext::log resolution failure code WC 11.1.2
private static function log_resolution_failure( string $subject, string $page_id, string $section, \Throwable $e, string $caller ): void {
wc_get_logger()->debug(
sprintf(
'%1$s could not be resolved for page "%2$s" section "%3$s": %4$s: %5$s',
$subject,
$page_id,
self::get_section_key( $section ),
get_class( $e ),
$e->getMessage()
),
array( 'source' => 'settings-ui' )
);
if ( $e instanceof \Exception ) {
wc_caught_exception( $e, $caller );
}
}