Properly escape tax class filter in legacy v3 REST API /taxes endpoint
This commit is contained in:
parent
fbd38e5a90
commit
c1dcab5725
|
@ -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'";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue