| @@ -36,8 +36,9 @@ | ||
| 36 | 36 | public function __construct() { |
| 37 | 37 | |
| 38 | 38 | parent::__construct(); |
| 39 | 39 | |
| 40 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only check on which editor screen is loading; nothing is written. | |
| 40 | 41 | if (!empty($_REQUEST['action']) && 'elementor' === $_REQUEST['action'] && is_admin()) { |
| 41 | 42 | add_action('init', [$this, 'register_wc_hooks'], 5); |
| 42 | 43 | } |
| 43 | 44 | |
| @@ -57,9 +58,10 @@ | ||
| 57 | 58 | add_action('ultimate_store_kit_quick_product_table_view_product_images', [$this, 'ultimate_store_kit_quick_view_product_images']); |
| 58 | 59 | } |
| 59 | 60 | |
| 60 | 61 | public function ultimate_store_kit_wc_product_quick_view_content() { |
| 61 | - $product_id = isset($_POST['product_id']) ? sanitize_text_field($_POST['product_id']) : ''; | |
| 62 | + // 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. | |
| 63 | + $product_id = isset($_POST['product_id']) ? absint(wp_unslash($_POST['product_id'])) : 0; | |
| 62 | 64 | ultimate_store_kit_wc_product_quick_view_content($product_id); |
| 63 | 65 | } |
| 64 | 66 | |
| 65 | 67 | public function ultimate_store_kit_quick_view_product_images() { |