woocommerce_remote_logging_is_third_party_error │ хук-фильтр │ WC 9.2.0

Filter to allow other plugins to overwrite the result of the third-party error check for remote logging.

Runs for fatal-errors entries from the shutdown handler and, since 11.3.0, for caught store-api errors. Both provide error.type, error.file and error.line; caught errors use the PHP error type they would produce if uncaught. Both also carry a backtrace list of #N file(line): call strings; fatal-errors entries carry true instead when PHP supplied no stack trace.

Использование

add_filter( 'woocommerce_remote_logging_is_third_party_error', 'wp_kama_woocommerce_remote_logging_is_third_party_error_filter', 10, 3 );

/**
 * Function for `woocommerce_remote_logging_is_third_party_error` filter-hook.
 * 
 * @param bool   $is_third_party_error The result of the third-party error check.
 * @param string $message              The error message.
 * @param array  $context              The error context, including `source`.
 *
 * @return bool
 */
function wp_kama_woocommerce_remote_logging_is_third_party_error_filter( $is_third_party_error, $message, $context ){
	// filter...
	return $is_third_party_error;
}
$is_third_party_error(true|false)
The result of the third-party error check.
$message(строка)
The error message.
$context(массив)
The error context, including source.

Список изменений

С версии 9.2.0 Введена.

Где вызывается хук

RemoteLogger::is_third_party_error()
woocommerce_remote_logging_is_third_party_error
woocommerce/src/Internal/Logging/RemoteLogger.php 378
return apply_filters( 'woocommerce_remote_logging_is_third_party_error', true, $message, $context );

Где используется хук в WooCommerce

Использование не найдено.