Submit
Path:
~
/
home
/
getwphos
/
www
/
almajd14
/
wp-content
/
plugins
/
woocommerce
/
src
/
Admin
/
RemoteSpecs
/
RuleProcessors
/
File Content:
EvaluationLogger.php
<?php namespace Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors; /** * Class EvaluationLogger * * @package Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors */ class EvaluationLogger { /** * Slug of the spec. * * @var string */ private $slug; /** * Results of rules in the given spec. * * @var array */ private $results = array(); /** * Logger class to use. * * @var \WC_Logger_Interface|null */ private $logger; /** * Logger source. * * @var string Logger source. */ private $source = ''; /** * EvaluationLogger constructor. * * @param string $slug Slug/ID of a spec that is being evaluated. * @param string|null $source Logger source. * @param \WC_Logger_Interface|null $logger Logger class to use. Default to using the WC logger. */ public function __construct( $slug, $source = null, ?\WC_Logger_Interface $logger = null ) { $this->slug = $slug; if ( null === $logger ) { $logger = wc_get_logger(); } if ( $source ) { $this->source = $source; } $this->logger = $logger; } /** * Add evaluation result of a rule. * * @param string $rule_type Name of the rule being tested. * @param boolean $result Result of a given rule. */ public function add_result( $rule_type, $result ) { $this->results[] = array( 'rule' => $rule_type, 'result' => $result ? 'passed' : 'failed', ); } /** * Log the results. */ public function log() { $should_log = defined( 'WC_ADMIN_DEBUG_RULE_EVALUATOR' ) && true === constant( 'WC_ADMIN_DEBUG_RULE_EVALUATOR' ); /** * Filter to determine if the rule evaluator should log the results. * * @since 9.2.0 * * @param bool $should_log Whether the rule evaluator should log the results. */ if ( ! apply_filters( 'woocommerce_admin_remote_specs_evaluator_should_log', $should_log ) ) { return; } foreach ( $this->results as $result ) { $this->logger->debug( "[{$this->slug}] {$result['rule']}: {$result['result']}", array( 'source' => $this->source ) ); } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
Transformers
---
0755
BaseLocationCountryRuleProcessor.php
2029 bytes
0644
BaseLocationStateRuleProcessor.php
1261 bytes
0644
ComparisonOperation.php
2460 bytes
0644
ContextPluginsRuleProcessor.php
1870 bytes
0644
EvaluateAndGetStatus.php
1892 bytes
0644
EvaluateOverrides.php
2421 bytes
0644
EvaluationLogger.php
2100 bytes
0644
FailRuleProcessor.php
691 bytes
0644
GetRuleProcessor.php
2093 bytes
0644
GetRuleProcessorForContext.php
1073 bytes
0644
IsEcommerceRuleProcessor.php
1139 bytes
0644
IsWooExpressRuleProcessor.php
1920 bytes
0644
NotRuleProcessor.php
1344 bytes
0644
NoteStatusRuleProcessor.php
1324 bytes
0644
OnboardingProfileRuleProcessor.php
1447 bytes
0644
OptionRuleProcessor.php
3198 bytes
0644
OrRuleProcessor.php
1514 bytes
0644
OrderCountRuleProcessor.php
1342 bytes
0644
OrdersProvider.php
705 bytes
0644
PassRuleProcessor.php
777 bytes
0644
PluginVersionRuleProcessor.php
2227 bytes
0644
PluginsActivatedRuleProcessor.php
1875 bytes
0644
ProductCountRuleProcessor.php
1668 bytes
0644
PublishAfterTimeRuleProcessor.php
1502 bytes
0644
PublishBeforeTimeRuleProcessor.php
1508 bytes
0644
RuleEvaluator.php
2505 bytes
0644
RuleProcessorInterface.php
659 bytes
0644
StoredStateRuleProcessor.php
1256 bytes
0644
StoredStateSetupForProducts.php
3692 bytes
0644
TotalPaymentsVolumeProcessor.php
2536 bytes
0644
WCAdminActiveForProvider.php
505 bytes
0644
WCAdminActiveForRuleProcessor.php
2026 bytes
0644
WooCommerceAdminUpdatedRuleProcessor.php
974 bytes
0644
N4ST4R_ID | Naxtarrr