Last active
September 25, 2017 09:53
-
-
Save gabrielmerovingi/960b5662d61c077375b9746e170f9185 to your computer and use it in GitHub Desktop.
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
/** | |
* Disable Total Balance Updates | |
* @version 1.0 | |
*/ | |
function mycred_pro_disable_total_balanace_update( $value = NULL, $object_id, $meta_key, $meta_value, $prev_value ) { | |
if ( $meta_key == 'mycred_default_total' ) | |
return true; | |
return $value; | |
} | |
add_filter( 'update_user_metadata', 'mycred_pro_disable_total_balanace_update', 1, 5 ); | |
add_filter( 'delete_user_metadata', 'mycred_pro_disable_total_balanace_update', 1, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment