<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Plugin crashes in backend if WP default API prefix is renamed

[ad_1]

Replies: 1

Hi guys,

first and foremost: Thanks. for this amazing Plugin, I’m loving it!!!

But I think I’ve actually found a bug. I renamed my WP API prefix for security reasons. It’s done with the ‘rest_url_prefix’ filter.

add_filter( 'rest_url_prefix', function() {
	return 'customprefix';
});

I didn’t notice anything in the frontend but the lazy blocks backend breaks. I’ve got this JS error:

Failed to load resource: the server responded with a status of 404 (Not Found): https://mydomain.com/customprefix/wp/v2/lazyblocks/247?_locale=user

I think the API URL’s may be hardcoded in the plugin or something similar. Can you take a look at it?

Thanks in advance!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer