diff --git a/wp-graphql-send-mail.php b/wp-graphql-send-mail.php index f88ceed..af88fa7 100644 --- a/wp-graphql-send-mail.php +++ b/wp-graphql-send-mail.php @@ -78,7 +78,7 @@ function wpgraphql_send_mail_cc_render() { $options = get_option('wpgraphql_send_mail_settings'); ?> - + 'String', 'description' => __('Who to send the email to', 'wp-graphql-send-mail'), ], + 'cc' => [ + 'type' => 'String', + 'description' => __('Add carbon copy for secondary recipient.', 'wp-graphql-send-mail'), + ], 'from' => [ 'type' => 'String', 'description' => __('Who to send the email from', 'wp-graphql-send-mail'), @@ -179,6 +183,13 @@ function wpgraphql_send_mail_options_page() return isset($payload['to']) ? $payload['to'] : null; } ], + 'cc' => [ + 'type' => 'String', + 'description' => __('Add carbon copy for secondary recipient.', 'wp-graphql-send-mail'), + 'resolve' => function ($payload, $args, $context, $info) { + return isset($payload['cc']) ? $payload['cc'] : null; + } + ], 'replyTo' => [ 'type' => 'String', 'description' => __('reply To address used', 'wp-graphql-send-mail'),