| @@ -44,8 +44,9 @@ | ||
| 44 | 44 | public function __construct() { |
| 45 | 45 | |
| 46 | 46 | parent::__construct(); |
| 47 | 47 | |
| 48 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only check on which editor screen is loading; nothing is written. | |
| 48 | 49 | if (!empty($_REQUEST['action']) && 'elementor' === $_REQUEST['action'] && is_admin()) { |
| 49 | 50 | add_action('init', [$this, 'register_wc_hooks'], 5); |
| 50 | 51 | } |
| 51 | 52 | |
| @@ -82,9 +83,10 @@ | ||
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | |
| 85 | 86 | public function ultimate_store_kit_wc_product_quick_view_content() { |
| 86 | - $product_id = isset($_POST['product_id']) ? sanitize_text_field($_POST['product_id']) : ''; | |
| 87 | + // 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. | |
| 88 | + $product_id = isset($_POST['product_id']) ? absint(wp_unslash($_POST['product_id'])) : 0; | |
| 87 | 89 | ultimate_store_kit_wc_product_quick_view_content($product_id); |
| 88 | 90 | } |
| 89 | 91 | |
| 90 | 92 | public function ultimate_store_kit_quick_view_product_images() { |