Last active
September 2, 2018 13:39
-
-
Save actual-saurabh/a140a16bce43f6496bbda69ec0f6e69c to your computer and use it in GitHub Desktop.
Remove LifterLMS Mailchimp Consent Feature
This file contains 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
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'init', 'llms_mc_remove_consent' ); | |
function llms_mc_remove_consent(){ | |
// remove the following line if you want to keep the consent form on checkout | |
remove_action( 'llms_registration_privacy', 'llms_mc_consent_form_field' ); | |
// remove the following line if you want to keep the consent form on user's profile | |
remove_action( 'lifterlms_after_update_fields', 'llms_mc_dashboard_consent_form_field' ); | |
} |
As of version 3.x you should use this instead:
add_filter( 'llms_mc_enable_consent', '__return_false' );
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You forgot the hook priority, should be: