Skip to main content
Added a missing } and replaced $arr for $obj, to avoid an array confusion ;-)
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

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_idby 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$obj ) {
    
    if ( $arr$obj->field_id == 25 ) {
        update_user_meta( $arr$obj->user_id, 'description', $arr$obj->value );
    }
}
add_action( 'xprofile_data_after_save', 'echoashu_save_description' );

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_idby 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' );

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_idby 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( $obj ) {
    
    if ( $obj->field_id == 25 ) {
        update_user_meta( $obj->user_id, 'description', $obj->value );
    }
}
add_action( 'xprofile_data_after_save', 'echoashu_save_description' );
deleted 5 characters in body
Source Link
shanebp
  • 5.1k
  • 6
  • 27
  • 40

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_idby 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' );

arr->

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_idby 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' );

arr->

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_idby 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' );
Source Link
shanebp
  • 5.1k
  • 6
  • 27
  • 40

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_idby 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' );

arr->