| @@ -43,8 +43,9 @@ | ||
| 43 | 43 | public function __construct() { |
| 44 | 44 | |
| 45 | 45 | parent::__construct(); |
| 46 | 46 | |
| 47 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only check on which editor screen is loading; nothing is written. | |
| 47 | 48 | if (!empty($_REQUEST['action']) && 'elementor' === $_REQUEST['action'] && is_admin()) { |
| 48 | 49 | add_action('init', [$this, 'register_wc_hooks'], 5); |
| 49 | 50 | } |
| 50 | 51 | |
| @@ -65,9 +66,10 @@ | ||
| 65 | 66 | } |
| 66 | 67 | |
| 67 | 68 | public function ultimate_store_kit_wc_product_quick_view_content() { |
| 68 | 69 | |
| 69 | - $product_id = isset($_POST['product_id']) ? sanitize_text_field($_POST['product_id']) : ''; | |
| 70 | + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only public endpoint; ultimate_store_kit_wc_product_quick_view_content() rejects any product the visitor could not already view. | |
| 71 | + $product_id = isset($_POST['product_id']) ? absint(wp_unslash($_POST['product_id'])) : 0; | |
| 70 | 72 | |
| 71 | 73 | ultimate_store_kit_wc_product_quick_view_content($product_id); |
| 72 | 74 | } |
| 73 | 75 | |