WordPress Website & Mainland China

You have probably been told, that your website can’t be accessed in China and therefore those 1+ billion internet users are out of reach. This is wrong.

What the Western media often calls the Great Chinese Firewall is usually not actively targeting Western shops or website. So if you know what you are doing, your website should load in Mainland China.

You can think of the Great Chinese Firewall as a set of rules similar to what you have to obey when travelling to another country.

You might, for example, be allowed to bring fresh fruits when travelling from France to Germany. You won’t be allowed to do that when travelling to Australia.

In a similar way, Mainland China is allowing data packages from certain domains and servers, and blocks packages from others.

What you have to do with your website is to make sure everything is loaded from your server directly, not via Google, Facebook, WordPress.com or GStatic (and some more).

This, in combination with a generally well performing website, and you’re ready to tackle the Mainland market.

Below you can read about some of the things you can do to optimize your website. For more information, a website audit or direct help, please get in touch with me.

How to test your website

If you are not in Mainland China using the infrastructure there (not a foreign SIM card), then it’s hard to test your website’s speed.

Fortunately, there are websites that help with that. They aren’t always 100% accurate, but can be used as a good indicator.

The one I personally like best is WebPageTest.

Here’s how to use it to test your site in Mainland China:

Testing your website in Mainland China

First go to WebPageTest.

China Website Speed Test

Put in your URL and click on “Advanced Configuration”.

China Website Speed Test

For “Test Location” pick either Shanghai, Beijing or Ningxia. Then click on “Start Test”.

Wait for the result

Waiting to get a result might take some time. You might have to queue, and even when your test starts, be prepared to wait another 10 minutes to see a result.

Your screen will look something like this for some time:

China Website Speed Test

Results

After some time, you’ll see results. They will look something like this:

China Website Speed Test Result

Interpreting those results is the secret sauce. If your loading times are between 5-15 seconds, you should be fine.

What you want to look out for are very long lines, indicating that certain files get loaded very slowly.

Limitations

This tool has its limitations in that it not always accurately mirrors the real world when it comes to e.g. Google Fonts or Gstatic files. They usually seem to load reasonably fast here, which they aren’t always in the real world.

However, it’s a great tool to get a rough handle on how your website is performing in Mainland China.

Payment Methods in Mainland China

If you want to target Mainland Chinese customers, credit card payments aren’t the best way to get paid as credit cards aren’t necessarily super common among your target audience.

There are, however, 3 payment methods that should work for almost any Chinese internet user:

Alipay

Most payments in Mainland China are done via phone nowadays. Alipay was the leader in this area and together with WeChap Pay is still the most popular way to pay for literally anything.

WeChat Pay

WeChat Pay was Tencent’s answer to Alibaba’s AliPay. In what was probably one of the most genious marketing campaigns, Tencent used red envelopes during Chinese New Year to make almost everyone in China use WeChat Pay.

Today, Alipay and WeChat Pay are used everywhere, hard to say which one is more popular.

UnionPay

This is probably closest to what you’re used to from credit card payments and could be somewhat compared to a debit card.

UnionPay is used widely in Mainland China and

How to use Alipay, WeChat Pay and UnionPay with WooCommerce

This has become a lot easier over the last years and some providers like Stripe provide this service out of the box, you “only” have to apply and Stripe has to accept.

Other than that, there are country specific providers that help with those payments.

It’s very hard to give general advice on this without causing confusion or mislead people – this should probably be done on a case to case basis.

Feel free to reach out if you have any questions in that regard.

Login for Mainland China

Optimizing member areas for Mainland China is actually fairly straightforward. There are really only two things to ensure:

  • Don’t use reCaptcha
  • Make sure you don’t only rely on 3rd party logins like Google or Facebook (one click login or register) as they might not work in Mainland China

So if you have a normal login and register area with email confirmation users in Mainland China should have no problem signing up and logging into your website.

Facebook Pixel in China

Facebook like many other Western social media platforms in banned in China. As a result, files from Facebook servers can’t be loaded in Mainland China.

The advice for Facebook Pixel is therefore very simple. If possible, don’t use it.

If you have to use it, ideally load it at the very end of the website (in the footer area). This way, the content of the website gets loaded and shown first, then, at the end, Facebook Pixel gets loaded.

This might still make the website load slowly in Mainland China, but the main content of the site should become visible within a reasonable time.

Improving Website Speed

Apart from not loading things like reCaptcha, Google Fonts or avatars from Google or WordPress.com servers, the actual speed of the website is another important factor that will determine the success of your website in Mainland China.

This article discusses point by point what you might want to do to improve your website’s loading speed. This should get you 80% there. To get to 100%, you’ll most likely have to talk to a developer like me to customize your setup for your specific needs.

Google Page Speed

The easiest way to get started to see what can be improved on your website is to go to Google’s Page Speed tool.

Put in your website, ideally not just the homepage but also try with articles, your about page and even your privacy policy page.

This will then tell you, what the biggest problems on your website are and you can use it as a benchmark to check whether or not the measures below help speeding up your site.

Why check the privacy policy? That’s mainly because that page usually has no images or media in general on it. Therefore, it’s a great way to see how quick the theme itself is.

Once you know what’s wrong, here’s what you can do about it:

Caching

To get good loading speeds, your server response time is critical. That should be 1-2 seconds max.

To achieve that, you should use a caching plugin. I personally like to go with the paid plugin WP Rocket.

Depending on your hosting provider, they might already have some sort of caching built in or suggest using other caching plugins.

Any of the more popular ones are fine, as long as you use one.

CSS and Javascript files

Google will most likely complain that some CSS or Javascript is loaded that’s either not needed or that’s not optimized.

Your caching plugin should have settings to improve that situation. Play around with that and see how far you can improve your website without breaking design or functionality.

Minimizing is definitely something you should do and that should work regardless.

You can try to merge files together (done automatically by most caching plugins) or get rid of unused CSS (also done by some).

This should speed up the loading time particularly in Mainland China, every file less is saved time.

Serve images in next-gen formats

Images should be loaded as AVIF or WEBP. Those two formats are optimized images with smaller size but same or similar quality when compared to the original JPG or PNG images.

I usually use the Imagify plugin to create those versions of any uploaded image + enforce the usage of those images.

There also other plugins like Shortpixel or even CDNs which do that for you. Just make sure it’s done.

Lazy loading images

Another thing your caching plugin should allow you to do is lazy load images.

This means that images are only loaded when they become visible on the screen.

If you, for example, have an image that is not visible when the website is first loaded, the image won’t be loaded until the user scrolls down.

This makes the initial loading of the website a lot quicker.

The server

Make sure you use a WordPress specialized hostling provider. I personally use Kinsta, but there are plenty out ther that work.

Just don’t use a shared hosting provider, those servers are slow and not super secure.

What else?

There’s more that can be done, but the above should get you 80% there. If you need more help, get in touch with me or contact a developer specializing in technical SEO or website performance.

Social Media & Sharing in Mainland China

This article describes how to implement social media sharing without loading files and scripts from those social media companies that will slow your website down when loaded from within Mainland China.

If you are interested in Chinese social media itself, you can go to the linked article and find more information there.

How to do sharing right

There are two ways you can implement sharing of articles to social media:

  • Solution number 1 is to embed code from the various social media platforms that then gets executed on your website and e.g. shows the number of likes or shares for that post. Don’t use this.
  • The right way to do it is to use links that contain the post URL in the parameters.

Why not embed any code?

Very simple. Facebook, Youtube, Twitter, etc. are all banned in Mainland China. If you embed code from their platforms on your website, files get loaded from their server when your website is loaded.

This makes the website super slow to load in Mainland China.

Furthermore, the code you execute slows the website down period, so even users outside of Mainland China will profit from you switching over to links.

Here are some examples what links could look like:

Facebook:

https://www.facebook.com/sharer/sharer.php?u=URL

Twitter:

https://twitter.com/intent/tweet?source=webclient&text=URL

LinkedIn:

https://www.linkedin.com/shareArticle?mini=true&url=URL

Always make sure to replace URL with the URL of the article you want to share on social media.

Can I use a plugin?

That depends. If the plugin is doing things as described above, it’s fine. If not, then not.

You could try to look for a GDPR compliant sharing plugin, that would be most likely to not load any code from 3rd party sites.

DNS in China

There is one problem in Mainland China that I haven’t found a solution to so far, and that is DNS.

If your customers or visitors in China can’t even start to load your website, it’s either blocked or the domain can’t be resolved to the IP address of the server to start loading content.

To further complicate things, this isn’t either working or not, it might be working for certain areas of China and not for others.

3 major ISPs

The reason for this is the rather complicated setup of telecom providers within Mainland China which even Alibaba seems to fight from time to time.

The three major internet service providers China Telecom, China Unicom and China mobile each have their own system of resolving domains to IP addresses – and they don’t work together much.

On top of that, each area in Mainland China has its own branches of those 3 major ISPs, which again, don’t work together very well with other branches of the same company.

You can see how this whole thing can lead to having your website work perfectly fine in one area of China or with a certain ISP while not working in other areas or with other ISPs.

What to do

The big question – that I don’t have a great answer to unfortunately.

The “easiest” way would be to get an ICP license and use a nameserver in Mainland China. However, as discussed above, even that wouldn’t guarantee things working flawlessly.

If your website loads nowhere in Mainland China, try switching servers, this might then not be a DNS issue but rather a blocking issue.

If you are a bigger company, you might want to get in touch with Alibaba Cloud for services like their DNS Cache Refresh. I have never tried that, but especially if you have recently switched servers, this might be worth a try.

On top of that, hosting a nameserver in Hong Kong on AliCloud might also be worth a try.

All in all, however, it’s a game of trial and error where you should consult with an expert in that field. As a web developer I unfortunately only know the basics about DNS.

Chinese Domains

One of the first questions that always comes up is: Do I nead a Chinese domain to be able to rank and be used within Mainland China?

The short answer to this is no. In fact, many Chinese companies themselves work with a .com domain and don’t use a .cn domain.

Given that you most likely don’t have a ICP license, you probably won’t be able to get your hands on a .cn domain anyway, so feel free to ignore them.

Scams

If you are like me, you will most likely receive emails from people or companies in China claiming that company xxx is about to register your domain yyy.cn (yyy being your company name).

I personally always ignored them. If you want to play things safe, maybe talk to a legal expert and potentiall look into trademarks in Mianland China.

I just mention that to prepare you that this will happen and it happens to many people. How you deal with that will depend on your particular situation, company size, etc.

Best CDN for Mainland China

Similar to servers for Mainland China, this article assumes that you won’t be able to get an ICP license. If you can, then please get in touch with developers who can help you in Mainland China directly.

Savest solution

The savest and in most cases best solution is to not have a CDN. This goes contrary to what most developers will tell you, but for Mainland China, it is the easiest way to make everything work.

The main reason is, that your server has 1 IP address, if that one works in Mainland China, everything will load.

CDNs have varying IP addresses and load from different locations and servers, which introduces a lot of variables and uncertainty.

So if you want to play it safe, go with no CDN.

What about Cloudflare?

If you have to pick a CDN, Cloudflare or Alibaba Cloud might be the best ways to go. Both have extensive connections to Mainland China and it’s therefore least likely you’ll get into trouble (though not completely impossible).

When you do your research around China and hosting, you’ll most likely come across Cloudflare Enterprise with their China CDN. This is a great solution if you are a multi-national company with a location in Mainland China (and a ICP license). For SMEs, this is probably not the way to go.

Alibaba is a nice way to go if you target mainly Southeast Asia. You could host your website in Hong Kong and use their CDN. You won’t be able to use the Mainland China nodes of the CDN, but the ones in Hong Kong, Taiwan, Japan, etc. should all work well.

Worst CDNs for Mainland China

The by far worst CDN is the one provided by WordPress.com and the Jetpack – if you use that, you can be sure the website won’t work in Mainland China.

From experience, AWS works sometimes, sometimes not. Google Cloud in general works surpisingly well, even though it’s from Google.

However, as mentioned in the beginning, if you can, avoid CDNs altogether.

Best server for websites targeting Mainland China

If you want your website to load fast, server location is important, but only to a certain extent.

Let’s see what choices you have from best to worst:

Server within Mainland China

For a website targeting Mainland China, this is, of course, the ideal scenario. However, you will have to get an ICP license, which is difficult – if you’re not a decently sized company with a subsidiary in Mainland China, virtually impossible.

As a result, I don’t go into that in any more detail – if you want to take this route, look for specialists in this field, I’m not one of them.

Server close to Mainland China

Hong Kong

I personally prefer Hong Kong for this – for WordPress I usually go with Kinsta (shamelessly using my affiliat link). It comes in combination with Cloudflare and works well here (I live in Hong Kong).

If you want to go as Chinese as possible without using an ICP license, Alibaba Cloud in Hong Kong might be what you’re looking for. It’s very similar to AWS, Google Cloud or Microsoft Azure, just a Chinese version.

Hong Kong has a great internet connection to the Mainland and as a result, particularly Guangdong and other Southern provinces have pretty good loading speeds for websites in Hong Kong (as long as no blocked files are loaded of course).

Japan

Japan works surprisingly well, particluarly around Beijing and other Northern parts of China. If you have the choice, Japan would be my second choice behind Hong Kong.

Taiwan

Given its geographic proximity to the Mainland, Taiwan also works very well, but the server infrastructure might not be as developed as e.g. Japan.

US West Coast

Given the infrastructure of cables connecting the US and Asia, the US West Coast is the best solution if you want to cover America, Asia and the rest of the world.

Depending on where you are in Mainland China, the US West Coast might even beat out Asian countries like Singapore when it comes to latency and loading speed.

Other Asian neighbours and countries nearby

Singapore has by far the best server infrastructure in Asia (outside of Mainland China).

What is interesting is that the connection between the Singapore area and China is a very loose one and loading speeds are, as a result, not as good as one would assume.

India is another superpower with good IT infrastructure and – very important – the providers we are used to in the West like AWS, DigitalOcean, Google Cloud, etc.

However, India and China’s relationship has its ups and downs, so I wouldn’t bet on placing my website there if India isn’t a major target market as well.

Other neighbouring countries do slowly catch up with their own data centres, but it will take some time until they become relevant enough to beat out the locations mentioned above.

Europe, Africa, America, etc.

Having said all the above, if Mainland China isn’t your number 1 target market, you can most likely leave your website where it is currently hosted if the below worst cases aren’t true and your website itself is optimized for Mainland China.

Worst servers

Regardless of location, you should avoid the following at all cost:

  • WordPress.com – more about that in this article
  • Shared hosting – it is simply too slow in most cases, go for WordPress specialized hosting instead

How to handle Google Maps

Google Maps are blocked in China, so if you embed a map on your website, the website won’t load or will only load very slowly.

There two fairly straigh forward solutions:

The first solution is to make a screenshot of your current map and link it to Google Maps. This might look something like this:

Google Maps in China

Based on Google’s guidelines, this solution would be a bit of a grey zone, so if in doubt, consult your lawyer. Google explicitly allows links to Google Maps from text or buttons, a screenshot of the map might fall under fair use or not – hard to say.

If you want to play it save, get a custom map image done on Fiverr or by your designer and link that to Google Maps, might add some flair to the website as well.

Use Bing or Baidu

Another alternative would be to use Bing Maps or Baidu Maps.

Bing, like most Microsoft products, works perfectly fine in Mainland China. Problem is, that Bing Maps sometimes isn’t 100% accurate, but depending on your use case, it might be good enough.

If your website is targeted at Mainland China, Baidu might be the best solution to go with. If you do also have an audience outside of China, then Bing would be the way to go.

How to handle Youtube

Youtube is blocked in China, so if you embed a Youtube video on your website, the website won’t load or will only load very slowly.

There are three solutions to that, an 2 easy ones and a more difficult one:

The first easy solution is to add an image to your website and link it to the video on Youtube. This might look like this:

YouTube in China

For this, I simply took a screenshot of the embedded video, added the image instead of the video and linked it to Youtube.

Given that this is using Youtube’s logo and other icons, you might run into legal issues. The save version of the above would be to take your video thumbnail and create a similar looking image yourself and use that with a link to Youtube.

This way your visitors outside of China will be able to watch the video while in Mainland China, people can load the website with decent speed and will know to ignore the video.

Load the video from the server

This is also fairly easy to do, you simply upload the video to the media section on your WordPress backend and then add the video to your article.

Having said that, videos on your server come with higher bandwidth use and might, as a result, lead to higher costs.

Furthermore, make sure to not make the video auto-play or auto-load, otherwise, you’ll run into loading speed issues again in China.

Embed video based on country or language

This is the more tricky solution. The idea would be to check whether or not a visitor is coming from China based on the browser language or the IP address and then decide whether to show the Youtube video or not.

This sounds like the best solution, but will make your website quite a bit slower:

  • For one, you would have to run additional database queries (in the IP case) and that will, depending on server speed and visitor numbers affect the server performance
  • Far worse than that, however, is that caching will become a lot harder – in many cases impossible. And without caching, WordPress websites often end up being very, very slow.

Conclusion

If possible, go with solution 1 where you add the thumbnail or a screenshot of the embedded video and link it to Youtube.

It’s a bit unusual to see that, but might even be easier to use for people on mobile phones outside of Mainland China.

ICP License

ICP stands for Internet Content Provider and an ICP license is a number every website hosted or run from within Mainland China needs to have in order to be allowed to operate.

This license is not needed if your server is outside of Mainland China (e.g. US, Hong Kong, Japan, etc.). If done right, users in Mainland China should still be able to access your website, but loading speeds might be a bit reduced.

Should you get an ICP?

If you don’t have a physical presence in Mainland China, the answer in most cases is no. Your company needs to have a subsidiary in Mainland China to be able to apply for an ICP license, without that it won’t work.

Why get an ICP?

An ICP license allows you to run a website from within Mainland China. Whenever you want to use a server, CDN or nameserver that is run from within Mainland China, you’ll have to have your own ICP number (one per domain/website), otherwise the hosting provider has to take the website down.

Having a server in Mainland China will result in considerably quicker loading times for customers accessing from China. However, with the right setup, websites from outside the Mainland can also load with decent speed.

What to do then?

If you can’t get an ICP license, follow the best practice I describe in this article. If you need help with optimizing your website for Mainland China, get in touch.

China does not like WordPress.com

WordPress was founded by Matt Mullenweg as an open source project. This version of WordPress can be found on WordPress.org.

He then founded Automattic, a for-profit company running WordPress.com and other free, freemium and paid services.

In short – China, for whatever reason, does not like them.

There are 3 services in particular that you should avoid and move away from if you want your website to load quickly in Mainland China:

WordPress.com

If your website is running on WordPress.com, consider moving to an independent server provider. I personally like and use Kinsta (affiliate link), but you’re free to move to any server as long as it’s not WordPress.com

Jetpack

I’m not a big fan of Jetpack as it is, but if you want to break into the Chinese market, you have to stop using this plugin.

If you are using the CDN, images and other files served through the CDN won’t load in Mainland China.

Even if you are just using the statistics or the backup, the plugin will still insert and load files from servers China blocks.

As a result, unfortunately, the plugin has to go.

How to replace it:

  • For backup and security, try Blogvault
  • For statistics, any third-party tool will work, even Google Analytics (ironically). If you want to have analytics on your website directly, Independent Analytics is a great way to get that done.
  • For the CDN, it’s best to first not use a CDN at all, have all files be loaded from your server directly. Once that works, you can add any CDN other than Jetpack

Removing Jetpack should be a big step towards a quicker website in Mainland China.

Gravatar

Gravatar is a service to provide avatar pictures for yourself and your users. You probably know it from the grey pictures appearing next to comments.

Again, those are loaded from WordPress.com servers which China doesn’t like.

To get rid of this is fairly easy. Simply go to Settings / Discussion, scroll to the very bottom and where it says Avatar Display make sure the checkbox Show Avatars is not ticked.

That should do the trick.

What about WooCommerce, Akismet, etc.?

The other plugins Automattic has that are commonly used are mostly fine as they usually load files from your server or only work in the background – so no need to remove those.

Google reCaptcha in China

Google reCaptcha is used to avoid spam and make sure, the user submitting a form, logging into an account or making a purchase is a real user, not a bot.

The problem with this: reCaptcha doesn’t work well in China.

As a result, whatever part of your website you want to secure with reCaptcha, Chinese internet users won’t be able to use that part.

Here’s how to deal with this:

Removing reCaptcha

This in itself, unfortunately, isn’t as straight forward as deactivating reCaptcha in your plugins. Some plugins still load the reCaptcha file from the Google or GStatic server, slowing the website down similar to how Google Fonts are.

Having said that, making sure all settings are set correctly to not use reCaptcha is still the first step.

The next steps are as follows:

  • Go into your HTML code and check whether reCaptcha is still loaded from an external domain
  • If it is, try to find out what plugin it is loaded by and make sure the settings are configured to not load reCaptcha
  • Should the file still be loaded, dequeue the file manually

What to use instead

You can use alternatives to reCaptcha like hCaptcha.

Using WordPress security tools or firewalls is another way to make sure bots aren’t destroying your website. I personally like Blogvault for that.

In general, however, try to avoid things like Captchas as much as possible, you might solve one problem but create others which you might not realize.

How to load Google Fonts and GStatic files from your server

To make sure your website is loading with decent speed in Mainland China, you want to load all (or almost all) files directly from your server.

When you add Google Fonts to your site, they usually either get loaded from a Google server or via GStatic, both of which don’t work well in China, at least not reliably. They might load fast one day, but on others, they might load very slowly – we’re talking about 40-60 seconds.

So what you need to do is first load the fonts and files onto your server to then have users load it from there.

Sounds complicated, but there are plugins to help. There are two main ways to do this:

  • If you are using a caching plugin, it might already have that functionality included. Look through the settings and if you find a setting that says something like “Load Google Fonts from server” then tick that and you should be fine
  • If you don’t have that option, I would suggest to use the OMGF plugin

Setting up the plugin

Here are the steps to get the plugin installed and set up (before you install the plugin, make sure you have a backup of your website in case something goes wrong):

  • Go to Plugins and then click on Add New Plugin
  • Search for OMGF
  • Click on Install Now and once done on Activate
  • Go to Settings and click on Optimize Google Fonts
  • Next look for Cache Status and click on the Start Optimization link.
  • You should then see a list of Google Fonts that got loaded onto your server

That should be all you have to do to get this problem solved.

If things are not working

If the above 2 methods don’t work, you’ll have to do things manually.

You can dequeue fonts, CSS and Javascript files and then add them manually again by uploading them to the server and enqueuing them via plugin or child theme.

You’ll probably need some help from a developer for that though.

How to remove CSS and JS scripts

Unfortunately, sometimes plugins load Javascript and CSS files that are never used. For Mainland China, the most problematic ones are usually old Google reCaptcha Javascript files that get loaded from Google servers and therefore either slow the website down a lot or make it impossible to load the website at all.

If the file is simply not used, then you can simply go ahead and dequeue (remove) it using the code below.

In case it is used but loaded from a server that’s blocked in Mainland China, then make sure you dequeue the original link and manually add it either via custom theme or plugin.

Note that in this case, updates to the the original file won’t be automatically made on the file you load from your server, therefore, this might cause problems when updating the plugin that is using that file.

So here’s how to block the file from being loaded.

Dequeue CSS file

function dequeue_plugin_style_script(){
	wp_dequeue_style( 'Style-Name' );
}
add_action( 'wp_enqueue_scripts', 'dequeue_plugin_style_script', 999 );

Dequeue Javscript file

function dequeue_plugin_style_script(){
	wp_dequeue_script( 'Script-Name-JS' );
}
add_action( 'wp_enqueue_scripts', 'dequeue_plugin_style_script', 999 );

This should do the trick.

WooCommerce payment gateway problem with Chinese characters

A client of mine approached me regarding a problem with Authorize.net. Payments where the address contained Chinese characters failed.

The idea was to replace the address with a “-” on checkout if it contains Chinese characters, then process the payment and replace the “-” with the Chinese characters again after payment was finished.

The solution looked as follows:

Chinese character detection + replacement

Using the woocommerce_before_checkout_process action, a function is called where billing company, address1, address2 and city are scanned for Chinese characters. This is done as follows:

preg_match( '/[\x{4e00}-\x{9fa5}]/u', $str )

If true, the value is set to “-” in $_POST while the old values are added to the session.

Furthermore, if the shipping address was the same as the billing address, the shipping address got set using the original billing address.

This will allow the payment to be processed.

Emails

Something I didn’t think about immediately were the emails that get sent out. The solution there was to use the woocommerce_mail_content filter.

If the session indicates that the billing address was changed, the email will only show the shipping address (which is the original address containing Chinese characters).

That fixed this problem.

Fixing the mess

Unfortunately, replacing values with “-” will also cause quite a mess in WooCommerce. As a result, if values got added to the session.

If things were replaced with “-“, they have to be reset to the original values for:

  • The billing address in the newly created order
  • The billing address stored for the given user

This function was called by 3 actions:

  • woocommerce_payment_complete
  • woocommerce_order_status_failed
  • woocommerce_order_status_on-hold

Everything was tested on a test server using manual payments first before uploading it to the live server.

After some iterations, the code worked as discussed and the client could start accept payments with addresses containing Chinese characters.