File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * This file is copied as amu -plugin into new WP installs to reroute normal
3+ * This file is copied as a mu -plugin into new WP installs to reroute normal
44 * mails into log entries.
55 */
66
77/**
88 * Replace WP native pluggable wp_mail function for test purposes.
99 *
10- * @param string $to Email address.
10+ * @param string|string[] $to Array or comma-separated list of email addresses to send message.
11+ * @return bool Whether the email was sent successfully.
1112 *
1213 * @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- WP native function.
1314 */
1415function wp_mail ( $ to ) {
16+ if ( is_array ( $ to ) ) {
17+ $ to = join ( ', ' , $ to );
18+ }
19+
1520 // Log for testing purposes
1621 WP_CLI ::log ( "WP-CLI test suite: Sent email to {$ to }. " );
22+
23+ // Assume sending mail always succeeds.
24+ return true ;
1725}
1826// phpcs:enable
You can’t perform that action at this time.
0 commit comments