Jetpack: Terms-of-service: Remove connection dependency

Created on 25 Aug 2020  路  3Comments  路  Source: Automattic/jetpack

This issue aims to coordinate our efforts to remove the connection dependency from the terms-of-service package in order to resolve the circular dependency issues that where introduced by the connection, tracking and terms-of-service packages:
The connection package requires the tracking package.
The tracking package requires the terms-of-service package.
The terms-of-service package requires the connection package.

What needs to be done

Jetpack DNA Primary Issue [Package] Terms of Service [Type] Bug

All 3 comments

I noticed another use of Terms_Of_Service::has_agreed() in Jetpack_Tracks_Client::record_event(), and I鈥檝e added it to the list.

What do you think of just deleting Jetpack::jetpack_tos_agreed? It's been deprecated since 7.9, and it's not used in Jetpack. I also searched WP Directory and didn't find any uses there.

Thanks @kbrown9 ! As for the Jetpack_Tracks_Client::record_event - I haven't been able to find an instance where this method is used directly, but instead it's used from the Jetpack_Tracks_Event class, which in turn is used from the new Automattic\Jetpack\Tracking class, and the execution only happens there after the check that's fixed by #16979 .
I'm going to add a note about this in the class documentation, so that the class is not ever used directly.

Was this page helpful?
0 / 5 - 0 ratings