Automattic\WooCommerce\Internal\Logging
RemoteLogger::is_remote_logging_allowed()
Determines if remote logging is allowed based on the following conditions:
- The feature flag for remote error logging is enabled.
- The user has opted into tracking/logging.
- The store is allowed to log based on the variant assignment percentage.
- The current WooCommerce version is the latest so we don't log errors that might have been fixed in a newer version.
Метод класса: RemoteLogger{}
Хуков нет.
Возвращает
true|false
.
Использование
$RemoteLogger = new RemoteLogger(); $RemoteLogger->is_remote_logging_allowed();
Код RemoteLogger::is_remote_logging_allowed() RemoteLogger::is remote logging allowed WC 9.3.3
public function is_remote_logging_allowed() { if ( ! FeaturesUtil::feature_is_enabled( 'remote_logging' ) ) { return false; } if ( ! \WC_Site_Tracking::is_tracking_enabled() ) { return false; } if ( ! $this->is_variant_assignment_allowed() ) { return false; } if ( ! $this->is_latest_woocommerce_version() ) { return false; } return true; }