Merge pull request #29422 from Mauricio-Urrego/fix/issue-29421
Avoids redirect caused by some custom permalink structures.
This commit is contained in:
commit
72cc2c2a50
|
@ -252,7 +252,7 @@ class WC_Widget_Layered_Nav extends WC_Widget {
|
|||
if ( '' === get_option( 'permalink_structure' ) ) {
|
||||
$form_action = remove_query_arg( array( 'page', 'paged' ), add_query_arg( $wp->query_string, '', home_url( $wp->request ) ) );
|
||||
} else {
|
||||
$form_action = preg_replace( '%\/page/[0-9]+%', '', home_url( trailingslashit( $wp->request ) ) );
|
||||
$form_action = preg_replace( '%\/page/[0-9]+%', '', home_url( user_trailingslashit( $wp->request ) ) );
|
||||
}
|
||||
|
||||
echo '<form method="get" action="' . esc_url( $form_action ) . '" class="woocommerce-widget-layered-nav-dropdown">';
|
||||
|
|
Loading…
Reference in New Issue