public function verify_sending_domain($args, $args_assoc) { // Get the site domain and get rid of www. $domain = strtolower(parse_url(site_url(), PHP_URL_HOST)); if ('www.' === substr($domain, 0, 4)) { $domain = substr($domain, 4); } if ($args_assoc['domain']) { $domain = $args_assoc['domain']; } $dns_records = $this->get_sending_domain_dns_records($domain); WP_CLI::line('Submitted for verification. Make sure you have the following DNS records added to the domain:'); \WP_CLI\Utils\format_items('table', $dns_records, array('Domain', 'Type', 'Value')); }