Exclude an RUL pattern from Autoptimize
<?php
/**
* Exclude WooCommerce Point of Sale from Autoptimize
*/
add_filter( 'autoptimize_filter_noptimize', 'yanco_exclude_autoptimize', 10, 0);
function yanco_exclude_autoptimize() {
if ( strpos( $_SERVER['REQUEST_URI'], 'pattern-in-url' ) !== false ) {
return true;
} else {
return false;
}
}