File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,9 @@ public function create( $args, $assoc_args ) {
481481 * --<field>=<value>
482482 * : One or more fields to update. For accepted fields, see wp_update_user().
483483 *
484+ * [--skip-email]
485+ * : Don't send an email notification to the user.
486+ *
484487 * ## EXAMPLES
485488 *
486489 * # Update user
@@ -498,6 +501,11 @@ public function update( $args, $assoc_args ) {
498501 $ user_ids [] = $ user ->ID ;
499502 }
500503
504+ if ( isset ( $ assoc_args ['skip-email ' ] ) ) {
505+ add_filter ( 'send_email_change_email ' , '__return_false ' );
506+ add_filter ( 'send_password_change_email ' , '__return_false ' );
507+ }
508+
501509 $ assoc_args = wp_slash ( $ assoc_args );
502510 parent ::_update ( $ user_ids , $ assoc_args , 'wp_update_user ' );
503511 }
You can’t perform that action at this time.
0 commit comments