@@ 454-456 (lines=3) @@ | ||
451 | $old_sale_price = $product->get_sale_price(); |
|
452 | $data = wp_unslash( $_REQUEST ); // WPCS: input var ok, CSRF ok. |
|
453 | ||
454 | if ( ! empty( $_REQUEST['change_weight'] ) && isset( $_REQUEST['_weight'] ) ) { // WPCS: input var ok, sanitization ok. |
|
455 | $product->set_weight( wc_clean( wp_unslash( $_REQUEST['_weight'] ) ) ); // WPCS: input var ok, sanitization ok. |
|
456 | } |
|
457 | ||
458 | if ( ! empty( $_REQUEST['change_dimensions'] ) ) { // WPCS: input var ok, sanitization ok. |
|
459 | if ( isset( $_REQUEST['_length'] ) ) { // WPCS: input var ok, sanitization ok. |
@@ 1522-1524 (lines=3) @@ | ||
1519 | public static function json_search_products( $term = '', $include_variations = false ) { |
|
1520 | check_ajax_referer( 'search-products', 'security' ); |
|
1521 | ||
1522 | if ( empty( $term ) && isset( $_GET['term'] ) ) { |
|
1523 | $term = (string) wc_clean( wp_unslash( $_GET['term'] ) ); |
|
1524 | } |
|
1525 | ||
1526 | if ( empty( $term ) ) { |
|
1527 | wp_die(); |