Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimcoleman/bcdf950d17475a62e146ce503852ab29 to your computer and use it in GitHub Desktop.
Save kimcoleman/bcdf950d17475a62e146ce503852ab29 to your computer and use it in GitHub Desktop.
<?php
/*
* Remove tags for previously held levels after all level changes are made.
* Note that this will make a call to the ConvertKit API for each tag to remove and can be a slow process.
* Requires ConvertKit Integation for Paid Memberships Pro.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
*
*/
function my_pmpro_convertkit_after_all_membership_level_changes_remove_tags( $remove_tags, $unsubscribe_tags ) {
$remove_tags = true;
return $remove_tags;
}
add_filter( 'pmpro_convertkit_after_all_membership_level_changes_remove_tags', 'my_pmpro_convertkit_after_all_membership_level_changes_remove_tags', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment