-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
What problem would the enhancement address for VIP?
Every time stats_get_csv() is called, it stores the data in the option stats_cache, which is where it can be polluted, as Jetpack relies on this value: https://github.com/Automattic/jetpack/blob/29b6f22dd57d0a5e8967fef73279dfdc575b820d/modules/stats.php#L1490.
Describe the solution you'd like
This function should not be relied on and a custom solution (e.g. stats endpoint) should be used instead.
What code should be reported as a violation?
$popular = stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] );
What code should not be reported as a violation?
$popular = custom_stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] );
Reactions are currently unavailable