Quantcast
Channel: WordPress.org Forums » [Autoptimize] Support
Viewing all articles
Browse latest Browse all 14096

survivehive on "[Plugin: Autoptimize] 500 error in WooCommerce Pages, when crawled by GoogleBot"

$
0
0

This worked perfectly. Googlebot was able to fetch and render those pages.

It is missing an open bracket after the if statement. Corrected code below in case anybody else ever runs into the issue.

Thank you Frank for your persistence!

add_filter('autoptimize_js_do_minify','survivehive_ao_js_minify',10,1);
function survivehive_ao_js_minify() {
	if (strpos($_SERVER['HTTP_USER_AGENT'],"Googlebot")!==false) {
		return false;
	} else {
		return true;
	}
}

Viewing all articles
Browse latest Browse all 14096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>