Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Domains: Domain upsell email appears to ignore mapped .blog subdomain #55846

Open jordesign opened 3 years ago

jordesign commented 3 years ago

Steps to Reproduce

  1. start a new site with a personal plan or higher
  2. map/connect a .blog subdomain (wakeupwith.mixtape.blog)
  3. wait for the marketing emails

What I expected to happen

wakeupwith.mixtape.blog is technically a custom domain - so we should not receive reminders/emails about adding a custom domain to replace the wpcom address.

What actually happened

at about the 2 week mark - this email was received:

You see, your site address (we call it a “domain name”) is the first thing visitors notice about your brand. And right now, your website address is wakeupwith559785545.wordpress.com. That’s perfectly fine if you’re building this site for fun.But if you’re building something more than a hobby site, I encourage you to claim a site address that doesn’t include “.wordpress.com”. Here are a few options we would suggest for your site:

wakeupwith559785545.com
wakeupwith559785545.blog
wakeupwith559785545.org
Screen Shot 2021-08-31 at 8 28 48 am

We've run into similar problems with this subdomain as it seems the system thinks the domain is one of our free .blog subdomains instead of a custom one.

In either case - with a custom domain set as primary - the user shouldn't be receiving an email referencing wakeupwith559785545.wordpress.com.

Context

User testing

Operating System

macOS

OS Version

No response

Browser

Chrome/Chromium

Browser Version(s)

No response

Is this specific to applied theme? If so, what is the theme name?

No

Simple/Atomic

No response

Console and/or error logs

No response

Number of Users Impacted

Some users (<50%)

Available Workarounds

No response

Reproducibility

No response

Other information

No response

Robertght commented 3 years ago

@sixhours Is this something that would suit your pod's work? :)

sixhours commented 3 years ago

Hmm, I think this falls under Marketing's purview. /cc @Automattic/martech

mreishus commented 2 years ago

It looks like the code in class-claim-your-free-domain-repository.php is already attempting to bypass sites that have domains ending in .blog (unsuccessfully). The issue is related to: wpcom_get_blog_url( get_blog_details( $blog_id ) ) for this site is returning the wakeupwith559785545.wordpress.com domain, even though that's not the site's primary domain. Going back a level, even the get_blog_details( $blog_id ) is returning this as the domain and siteurl keys of the WP_Site object.

I currently do not know enough about those functions to determine if the functions are not acting as expected in this case, or if they are acting as expected, but the .blog checking code incorrectly assumed how they would behave.

(It looks like another contributing factor is that the domain was purchased using free credits, but not by using the free domain credit. If the free domain credit was used, then the failing .blog check would not come into play, as the user would not be entered into consideration for this email (it starts out with a list of users who have not used their free domain credit, then tries to filter out .blog urls from there). The .blog check not working properly is still an issue, but it might be limited in scope to those who have free credits available to purchase domains, like A8Cs.)