Quote from Frst on December 15, 2020, 18:51
Open the WooCommerce file found at . . .
includes/class-wc-query.php
=========
CHANGE FROM :
}
$args['join'] = $this->append_product_sorting_table_join( $args['join'] );
$args['where'] .= $wpdb->prepare(
' AND wc_product_meta_lookup.min_price >= %f AND wc_product_meta_lookup.max_price <= %f ',
$current_min_price,
$current_max_price
);
return $args;
}
/**
* Handle numeric price sorting.
CHANGE TO :
}
$args['join'] = $this->append_product_sorting_table_join( $args['join'] );
$args['where'] .= $wpdb->prepare(
' AND ( wc_product_meta_lookup.min_price >= %f AND wc_product_meta_lookup.max_price <= %f )
OR ( wc_product_meta_lookup.max_price <> wc_product_meta_lookup.min_price
AND NOT ( wc_product_meta_lookup.max_price < %f OR wc_product_meta_lookup.min_price > %f ) ) ',
$current_min_price, $current_max_price, $current_min_price, $current_max_price
);
return $args;
}
/**
* Handle numeric price sorting.
=========
IMPORTANT:
The only issue with this modification is that it MIGHT get overwritten when you update the WooCommerce plugin .
So if there is a way to implement this into a future release of WOOF, please let us know .
Look forward to your reply.
..
Open the WooCommerce file found at . . .
includes/class-wc-query.php
=========
CHANGE FROM :
}
$args['join'] = $this->append_product_sorting_table_join( $args['join'] );
$args['where'] .= $wpdb->prepare(
' AND wc_product_meta_lookup.min_price >= %f AND wc_product_meta_lookup.max_price <= %f ',
$current_min_price,
$current_max_price
);
return $args;
}
/**
* Handle numeric price sorting.
CHANGE TO :
}
$args['join'] = $this->append_product_sorting_table_join( $args['join'] );
$args['where'] .= $wpdb->prepare(
' AND ( wc_product_meta_lookup.min_price >= %f AND wc_product_meta_lookup.max_price <= %f )
OR ( wc_product_meta_lookup.max_price <> wc_product_meta_lookup.min_price
AND NOT ( wc_product_meta_lookup.max_price < %f OR wc_product_meta_lookup.min_price > %f ) ) ',
$current_min_price, $current_max_price, $current_min_price, $current_max_price
);
return $args;
}
/**
* Handle numeric price sorting.
=========
IMPORTANT:
The only issue with this modification is that it MIGHT get overwritten when you update the WooCommerce plugin .
So if there is a way to implement this into a future release of WOOF, please let us know .
Look forward to your reply.
..