| @@ -273,9 +273,9 @@ | ||
| 273 | 273 | |
| 274 | 274 | $current_user = WPSC_Current_User::$current_user; |
| 275 | 275 | |
| 276 | 276 | if ( check_ajax_referer( 'wpsc_tc_get_operators', '_ajax_nonce', false ) != 1 ) { |
| 277 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 277 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | $slug = isset( $_POST['slug'] ) ? sanitize_text_field( wp_unslash( $_POST['slug'] ) ) : ''; |
| 281 | 281 | if ( ! $slug || ! array_key_exists( $slug, self::$conditions ) ) { |
| @@ -282,9 +282,9 @@ | ||
| 282 | 282 | wp_send_json_error( __( 'Bad request!', 'supportcandy' ), 400 ); |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | if ( ! in_array( $current_user->level, self::$conditions[ $slug ]['levels'] ) ) { |
| 286 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 286 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | if ( self::$conditions[ $slug ]['type'] == 'cf' ) { |
| 290 | 290 | |
| @@ -348,9 +348,9 @@ | ||
| 348 | 348 | |
| 349 | 349 | $current_user = WPSC_Current_User::$current_user; |
| 350 | 350 | |
| 351 | 351 | if ( check_ajax_referer( 'wpsc_tc_get_operand', '_ajax_nonce', false ) != 1 ) { |
| 352 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 352 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | $slug = isset( $_POST['slug'] ) ? sanitize_text_field( wp_unslash( $_POST['slug'] ) ) : ''; |
| 356 | 356 | if ( ! $slug || ! array_key_exists( $slug, self::$conditions ) ) { |
| @@ -357,9 +357,9 @@ | ||
| 357 | 357 | wp_send_json_error( __( 'Bad request!', 'supportcandy' ), 400 ); |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | if ( ! in_array( $current_user->level, self::$conditions[ $slug ]['levels'] ) ) { |
| 361 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 361 | + wp_send_json_error( 'Unauthorized request!', 401 ); | |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | $operator = isset( $_POST['operator'] ) ? sanitize_text_field( wp_unslash( $_POST['operator'] ) ) : ''; |
| 365 | 365 | if ( ! $operator ) { |