REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 2.13 KB
Close
/home/certprox/test.certproxywizard.com/wp-content/plugins/woocommerce/src/Internal/FraudProtection/FraudProtectionTracker.php
Text
Base64
<?php /** * FraudProtectionTracker class file. */ declare( strict_types=1 ); namespace Automattic\WooCommerce\Internal\FraudProtection; defined( 'ABSPATH' ) || exit; /** * Centralized fraud protection event tracker. * * This class provides a unified interface for tracking fraud protection events. * It logs events for the fraud protection service using already-collected data. * * @since 10.5.0 * @internal This class is part of the internal API and is subject to change without notice. */ class FraudProtectionTracker { /** * Track fraud protection event with already-collected data. * * This method accepts fully-collected event data (including session context) * and logs it for the fraud protection service. * * The method implements graceful degradation - any errors during tracking * will be logged but will not break the functionality. * * @param string $event_type Event type identifier (e.g., 'cart_item_added'). * @param array $collected_data Fully-collected event data including session context. * @return void */ public function track_event( string $event_type, array $collected_data ): void { try { // phpcs:ignore Generic.Commenting.Todo.TaskFound // TODO: Once EventTracker/API client is implemented (WOOSUBS-1249), call it here: // $event_tracker = wc_get_container()->get( EventTracker::class ); // $event_tracker->track( $event_type, $collected_data ); // // For now, log the event for debugging and verification. FraudProtectionController::log( 'info', sprintf( 'Fraud protection event tracked: %s | Session ID: %s', $event_type, $collected_data['session']['session_id'] ?? 'N/A' ), array( 'event_type' => $event_type, 'collected_data' => $collected_data, ) ); } catch ( \Exception $e ) { // Gracefully handle errors - fraud protection should never break functionality. FraudProtectionController::log( 'error', sprintf( 'Failed to track fraud protection event: %s | Error: %s', $event_type, $e->getMessage() ), array( 'event_type' => $event_type, 'exception' => $e, ) ); } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AdminSettingsHandler.php
4.62 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ApiClient.php
6.27 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlockedSessionNotice.php
4.33 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CartEventTracker.php
5.74 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CheckoutEventTracker.php
8.60 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DecisionHandler.php
4.81 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FraudProtectionController.php
4.63 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FraudProtectionDispatcher.php
4.51 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FraudProtectionTracker.php
2.13 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JetpackConnectionManager.php
2.87 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PaymentMethodEventTracker.php
3.24 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SessionClearanceManager.php
5.80 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SessionDataCollector.php
21.43 KB
lrw-r--r--
2026-03-02 23:35:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).