Calling admin_url( ‘admin-ajax.php’ ) results in a 404 error

A 404 error: «Failed to load resource: the server responded with a status of 404 (Not Found)» when calling admin_url( ‘admin-ajax.php’ ). The problem appears when you use the «A different domain per language» setting.   When you call admin_url( ‘admin-ajax.php’ ), you see something like this: http://secondary-language-domain.com/secondary-lang-code/wp-admin/admin-ajax.php instead of: http://secondary-language-domain.com/wp-admin/admin-ajax.php.   This results in a 404 error: «Failed … Читать далее Calling admin_url( ‘admin-ajax.php’ ) results in a 404 error