acf-image-aspect-ratio-crop icon indicating copy to clipboard operation
acf-image-aspect-ratio-crop copied to clipboard

Plugin doesn't honour WP_SITEURL

Open klaus-aunds opened this issue 2 years ago • 2 comments

My WP_SITEURL is set to a different value than WP_HOME. The plugin uses the WP_HOME value for the REST API, which fails because the WP backend is located at WP_SITEURL.

A workaround for this issue is to enable the REST API compatibility mode, but it'd be great to get it working properly.

https://developer.wordpress.org/reference/functions/home_url/ https://developer.wordpress.org/reference/functions/site_url/

Thanks a ton for the great plugin. If I can be of any help please let me know.

klaus-aunds avatar Sep 07 '22 12:09 klaus-aunds

Can you give your WP_SITEURL and WP_HOME values? You can replace the domain with example.org if you don’t want to share it.

The plugin uses standard get_rest_url function to fetch the REST API URL. It should be possible to change this using rest_url filter.

joppuyo avatar Sep 07 '22 12:09 joppuyo

An example in my case would be

example.org -> WP_HOME backend.example.org -> WP_SITEURL

klaus-aunds avatar Sep 07 '22 12:09 klaus-aunds