If you are using WPML plugin with two or more different domains for the same WooCommerce store, you might see a message like this one:
"It looks like this site has moved or is a duplicate site. Customer Reviews for WooCommerce has disabled sending automatic review reminder emails on this site to prevent duplicate reminders from a staging or test environment."
The plugin also disables sending of automatic review invitations after showing this message.
This happens because the plugin has a function to detect staging sites and disable automatic review invitations when a staging site is detected. WPML setup with different domains linked to the same shop looks exactly like production and staging sites, so the plugin disables automatic review invitations. Detection of staging sites is necessary to prevent sending several invitations for the same order from the production and staging sites.
The solution to this problem is to follow the recommendations provided by WPML support on their forum. The recommendation was originally provided for a different plugin that also has a function to detect staging sites. So, the steps for our plugin should be as follows:
- Define the site URL only for the default domain of your website in wp-config.php in this way (https://codex.wordpress.org/Editing_wp-config.php#WP_SITEURL):
define( 'WP_SITEURL', 'https://example.com' );
Check the ivole_siteurl key in the wp_options table and make sure it is the same as the original site URL including trailing slashes if any exist. The URL will hold a placeholder like _[ivole_siteurl]_. For example, http://localhos_[ivole_siteurl]_t. Leave it as it is because our plugin removes the placeholder later.
Clear all the caches and transients.