| @@ -129,8 +129,12 @@ | ||
| 129 | 129 | if ( is_admin() && ! wp_doing_ajax() ) { |
| 130 | 130 | return; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | + if ( ! class_exists( 'Operators' ) ) { | |
| 134 | + require_once __DIR__ . '/operators.php'; | |
| 135 | + } | |
| 136 | + | |
| 133 | 137 | $condition = self::$conditions[ $condition_name ]; |
| 134 | 138 | $operator = Operators::$operators[ $operator_name ]; |
| 135 | 139 | $extracted_value = $condition->get_value(); |
| 136 | 140 | |
| @@ -156,9 +160,9 @@ | ||
| 156 | 160 | */ |
| 157 | 161 | public function get_options() { |
| 158 | 162 | check_ajax_referer( 'sellkit', 'nonce' ); |
| 159 | 163 | |
| 160 | - $condition = filter_input( INPUT_GET, 'condition', FILTER_SANITIZE_STRING ); | |
| 164 | + $condition = sellkit_htmlspecialchars( INPUT_GET, 'condition' ); | |
| 161 | 165 | |
| 162 | 166 | if ( empty( $condition ) ) { |
| 163 | 167 | wp_send_json_error( __( 'Please send a condition name', 'sellkit' ) ); |
| 164 | 168 | } |