Rynald0s
(@rynald0s)
Automattic Happiness Engineer
Hi, @spyniel!
You can use the following code to make that a non-required field:
add_filter( 'woocommerce_save_account_details_required_fields' ,
'smtl_edit_account_remove_required_names' );
function smtl_edit_account_remove_required_names( $fields ) {
unset($fields['account_last_name']);
return $fields;
}
This code won’t, however, remove the asterisk. For that you’ll need to use CSS.
Cheers!
Hi @spyniel
I just wanted to follow-up with you on this thread; hope you were able to achieve what you wanted by making the last_name class not required.
I’m marking this thread as Resolved as we have not heard back from you in a while. If the problem persists though, feel free to reopen this, we would be happy to look into this for you.
All the best!