Skip to content

Commit 155e77b

Browse files
committed
added screenshot + sanitized query
1 parent 3281a53 commit 155e77b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== WooCommerce Filter Orders by Coupon ===
22
Contributors: skyverge, beka.rice
33
Tags: woocommerce, orders, filter orders, coupons
4-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@skyverge.com&item_name=Donation+for+WooCommerce+Extra+Product+Sorting
4+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@skyverge.com&item_name=Donation+for+WooCommerce+Filter+Orders
55
Requires at least: 3.8
66
Tested up to: 4.1
77
Requires WooCommerce at least: 2.2

screenshots/screenshot-1.png

42.3 KB
Loading

woocommerce-filter-orders-by-coupon.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
* Version: 1.0.0
99
* Text Domain: wc-filter-orders
1010
*
11-
* Copyright: (c) 2012-2015 SkyVerge, Inc. (info@skyverge.com)
11+
* Copyright: (c) 2015-2015 SkyVerge, Inc. (info@skyverge.com)
1212
*
1313
* License: GNU General Public License v3.0
1414
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
1515
*
1616
* @package WC-Filter-Orders
1717
* @author SkyVerge
1818
* @category Admin
19-
* @copyright Copyright (c) 2012-2015, SkyVerge, Inc.
19+
* @copyright Copyright (c) 2015-2015, SkyVerge, Inc.
2020
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
2121
*
2222
*/
@@ -156,7 +156,7 @@ public function add_filterable_where( $where ) {
156156
if ( ! empty( $_GET['_coupons_used'] ) ) {
157157

158158
// Main WHERE query part
159-
$where .= $wpdb->prepare( " AND woi.order_item_type='coupon' AND woi.order_item_name='%s'", $_GET['_coupons_used'] );
159+
$where .= $wpdb->prepare( " AND woi.order_item_type='coupon' AND woi.order_item_name='%s'", wc_clean( $_GET['_coupons_used'] ) );
160160
}
161161

162162
return $where;

0 commit comments

Comments
 (0)