mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
17 lines
600 B
Text
17 lines
600 B
Text
add_filter( 'pre_user_first_name', 'wc_sync_user_edit_profile_edit_billing_first_name' );
|
|
|
|
function wc_sync_user_edit_profile_edit_billing_first_name( $first_name ) {
|
|
if ( isset( $_POST['billing_first_name'] ) ) {
|
|
$first_name = $_POST['billing_first_name'];
|
|
}
|
|
return $first_name;
|
|
}
|
|
|
|
add_filter( 'pre_user_last_name', 'wc_sync_user_edit_profile_edit_billing_last_name' );
|
|
|
|
function wc_sync_user_edit_profile_edit_billing_last_name( $last_name ) {
|
|
if ( isset( $_POST['billing_last_name'] ) ) {
|
|
$last_name = $_POST['billing_last_name'];
|
|
}
|
|
return $last_name;
|
|
}
|