flag(); } if ( function_exists( 'edd_is_checkout' ) && edd_is_checkout() ) { $this->flag(); } $uri = isset( $_SERVER['REQUEST_URI'] ) && is_string( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; if ( strlen( $uri ) > 8192 ) { $this->flag(); return; } foreach ( array( '/cart', '/checkout', '/my-account', '/wp-login.php', '/login' ) as $p ) { if ( false !== stripos( $uri, $p ) ) { $this->flag(); break; } } } private function flag() { if ( ! defined( 'DONOTCACHEPAGE' ) ) { define( 'DONOTCACHEPAGE', true ); } } }