Change method name

This commit is contained in:
Boro Sitnikovski 2017-12-14 15:37:42 +01:00
parent e1b753122e
commit 080ece9588
4 changed files with 4 additions and 15 deletions

View File

@ -278,20 +278,9 @@ abstract class WC_Widget extends WP_Widget {
/**
* Get current page URL with various filtering props supported by WC.
*
* @param string $taxonomy Taxonomy.
* @return string
*/
protected function get_page_base_url( $taxonomy ) {
wc_deprecated_function( 'WC_Widget::get_page_base_url', '3.3.0', 'WC_Widget::get_page_url' );
return $this->get_page_url();
}
/**
* Get current page URL with various filtering props supported by WC.
*
* @return string
*/
protected function get_page_url() {
protected function get_current_page_url() {
if ( defined( 'SHOP_IS_ON_FRONT' ) ) {
$link = home_url();
} elseif ( is_shop() ) {

View File

@ -50,7 +50,7 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
$min_price = isset( $_GET['min_price'] ) ? wc_clean( $_GET['min_price'] ) : 0;
$max_price = isset( $_GET['max_price'] ) ? wc_clean( $_GET['max_price'] ) : 0;
$rating_filter = isset( $_GET['rating_filter'] ) ? array_filter( array_map( 'absint', explode( ',', $_GET['rating_filter'] ) ) ) : array();
$base_link = $this->get_page_url();
$base_link = $this->get_current_page_url();
if ( 0 < count( $_chosen_attributes ) || 0 < $min_price || 0 < $max_price || ! empty( $rating_filter ) ) {

View File

@ -424,7 +424,7 @@ class WC_Widget_Layered_Nav extends WC_Widget {
$current_filter[] = $term->slug;
}
$link = remove_query_arg( $filter_name, $this->get_page_url() );
$link = remove_query_arg( $filter_name, $this->get_current_page_url() );
// Add current filters to URL.
foreach ( $current_filter as $key => $value ) {

View File

@ -112,7 +112,7 @@ class WC_Widget_Rating_Filter extends WC_Widget {
continue;
}
$found = true;
$link = $this->get_page_url();
$link = $this->get_current_page_url();
if ( in_array( $rating, $rating_filter ) ) {
$link_ratings = implode( ',', array_diff( $rating_filter, array( $rating ) ) );