Invalidate caches or sync to external systems when a subscriber removes their avatar
AccountController::delete_avatar() fires benecaster_avatar_deleted( int $user_id, int $attachment_id ) after the user meta is cleared and the attachment is deleted. The action does NOT fire when the delete request is idempotent (subscriber had no avatar set). Pair with benecaster_avatar_uploaded for symmetric upload/remove handling.
Code
<?php
add_action( 'benecaster_avatar_deleted', function ( int $user_id, int $attachment_id ): void {
wp_cache_delete( 'avatar_url_' . $user_id, 'my-addon' );
my_crm_clear_profile_picture( $user_id );
}, 10, 2 );