Forked from ideadude/my_pmpro_report_login_wp_visits_only_for_users.php
Created
July 26, 2024 08:59
-
-
Save JarrydLong/c20f77a4d41237fab49c8b96b9197b7e to your computer and use it in GitHub Desktop.
Change PMPro to only track visits for logged in users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change PMPro to not track visits at all | |
* Add this code into a custom plugin or code snippet. | |
*/ | |
function my_pmpro_report_login_wp_visits_only_for_users() { | |
remove_action( 'wp', 'pmpro_report_login_wp_visits' ); | |
} | |
add_action( 'init', 'my_pmpro_report_login_wp_visits_only_for_users' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment