Automattic\WooCommerce\Internal\Orders
OrderAttributionController::log()
Log a message as a debug log entry.
Метод класса: OrderAttributionController{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->log( $message, $method, $level );
- $message(строка) (обязательный)
- The message to log.
- $method(строка) (обязательный)
- The method that is logging the message.
- $level(строка)
- The log level.
По умолчанию: WC_Log_Levels::DEBUG
Код OrderAttributionController::log() OrderAttributionController::log WC 9.6.1
private function log( string $message, string $method, string $level = WC_Log_Levels::DEBUG ) { /** * Filter to enable debug mode. * * @since 8.5.0 * * @param string $enabled 'yes' to enable debug mode, 'no' to disable. */ if ( 'yes' !== apply_filters( 'wc_order_attribution_debug_mode_enabled', 'no' ) ) { return; } $this->logger->log( $level, sprintf( '%s %s', $method, $message ), array( 'source' => 'woocommerce-order-attribution' ) ); }