<?php
// Fix FacetWP query detection issues caused by an 'action' query var added by WP User Front End plugin in /wp-user-frontend/Lib/Gateway/Paypal.php
// Possibly will get fixed in future versions. Bug is in v.4.3.2
// Bug report: https://github.com/weDevsOfficial/wp-user-frontend/issues/1857
add_filter('query_vars', function ( $vars ) {
if ( function_exists( 'FWP' ) && FWP()->request && FWP()->request->is_refresh ) {
return array_diff( $vars, [ 'action' ] );
}
return $vars;
}, 999, 1);