mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-22 19:13:44 +03:00
Email: Check first name exists before using.
The previous check worked when the field existed as an empty string, but threw a notice when it didn't exist.
This commit is contained in:
parent
4dc03ada83
commit
993bd53765
|
@ -215,7 +215,7 @@ function send_contributor_inactive_email( array $contributor ) : bool {
|
||||||
* Their first name is ideal, but their username is the best fallback because `nickname`, `display_name`,
|
* Their first name is ideal, but their username is the best fallback because `nickname`, `display_name`,
|
||||||
* etc are too formal.
|
* etc are too formal.
|
||||||
*/
|
*/
|
||||||
$name = $contributor['first_name'] ? $contributor['first_name'] : '@' . $contributor['user_nicename'];
|
$name = empty( $contributor['first_name'] ) ? '@' . $contributor['user_nicename'] : $contributor['first_name'];
|
||||||
$subject = 'Please update your Five for the Future pledge';
|
$subject = 'Please update your Five for the Future pledge';
|
||||||
|
|
||||||
$short_team_names = array_map( function( $team ) {
|
$short_team_names = array_map( function( $team ) {
|
||||||
|
|
Loading…
Reference in a new issue