diff --git a/src/Tracking.php b/src/Tracking.php index 7aa1476..98fc971 100644 --- a/src/Tracking.php +++ b/src/Tracking.php @@ -102,7 +102,16 @@ public function tracks_record_event( $user, $event_name, $properties = array(), } // Don't track users who have opted out or not agreed to our TOS, or are not running an active Jetpack. - if ( ! \Jetpack::jetpack_tos_agreed() ) { + if ( + /** + * Filter whether ToS were accepted on this site. + * + * @since 7.9.0 + * + * @param bool $tos_agreed Was ToS accepted for this site. Defaults to false. + */ + apply_filters( 'jetpack_tos_agreed', false ) + ) { return false; }