Use this action hook found in buddypress/bp-xprofile/classes/class-bp-xprofile-profiledata.php
do_action_ref_array( 'xprofile_data_after_save', array( $this ) );
You'll need to use the actual field_id
for your xprofile description. This example assumes it is 25
. You can get the field_id
by going to wp-admin > Users > Profile Fields
and clicking 'Edit' on that field. The field_id
will appear in the browser url.
function echoashu_save_description( $arr ) {
if ( $arr->field_id == 25 ) {
update_user_meta( $arr->user_id, 'description', $arr->value );
}
add_action( 'xprofile_data_after_save', 'echoashu_save_description' );