Merge pull request #7933 from woothemes/price-filter-widget-pagination

Ensure $wp->request has a trailing slash to avoid pagination issues.
This commit is contained in:
Mike Jolley 2015-04-13 09:38:18 +01:00
commit 259b8b3be7
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class WC_Widget_Price_Filter 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( $wp->request ) );
$form_action = preg_replace( '%\/page/[0-9]+%', '', home_url( trailingslashit( $wp->request ) ) );
}
echo '<form method="get" action="' . esc_url( $form_action ) . '">