Properly escape tax class filter in legacy v3 REST API /taxes endpoint

This commit is contained in:
Jorge A. Torres 2022-04-14 15:09:55 -03:00
parent fbd38e5a90
commit c1dcab5725
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ class WC_API_Taxes extends WC_API_Resource {
// Filter by tax class
if ( ! empty( $args['tax_rate_class'] ) ) {
$tax_rate_class = 'standard' !== $args['tax_rate_class'] ? sanitize_title( $args['tax_rate_class'] ) : '';
$tax_rate_class = esc_sql( 'standard' !== $args['tax_rate_class'] ? sanitize_title( $args['tax_rate_class'] ) : '' );
$query .= " AND tax_rate_class = '$tax_rate_class'";
}