@@ -125,13 +125,13 @@ function notification_list( $args, $assoc_args ) {
125125 * [<name>]
126126 * : The name of the notification.
127127 *
128- * < --to=<to>->
128+ * [ --to=<to>]
129129 * : The to field. Default: {admin_email}
130130 *
131- * < --subject=<subject>>
131+ * [ --subject=<subject>]
132132 * : The subject field. Default: New submission from {form_title}
133133 *
134- * < --message=<message>>
134+ * [ --message=<message>]
135135 * : The message body. Default: {all_fields}
136136 *
137137 * [--to-type=<to-type>]
@@ -151,7 +151,7 @@ function notification_list( $args, $assoc_args ) {
151151 * wp gf form notification create 1 "My Notification"
152152 * wp gf form notification create 1 "My Notification" --to="[email protected] " 153153 *
154- * @synopsis [<title >] [<description >] [--form- json=<form -json>] [--porcelain]
154+ * @synopsis <form-id> [<name >] [--to=<to >] [--subject=<subject>] [--message=<message>] [--to-type=<to-type>] [--event=<event>] [--notification- json=<notification -json>] [--porcelain]
155155 */
156156 function create ( $ args , $ assoc_args ) {
157157
@@ -172,7 +172,7 @@ function create( $args, $assoc_args ) {
172172 $ notification = json_decode ( $ notification_json , ARRAY_A );
173173 // Check if the name had been set and override the JSON setting
174174 if ( isset ( $ args [1 ] ) ) {
175- $ notification ['name ' ] = $ args [0 ];
175+ $ notification ['name ' ] = $ args [1 ];
176176 }
177177
178178 if ( ! isset ( $ notification ['id ' ] ) || ( isset ( $ notification ['id ' ] ) && isset ( $ notifications [ $ notification ['id ' ] ] ) ) ) {
0 commit comments