| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | public static function getAllItemIdsFromMeta($wpdb, $orderId) |
| 8 | 8 | { |
| 9 | 9 | $metaKeyPattern = '_sync_basalam_item_id_%'; |
| 10 | 10 | |
| 11 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Direct lookup on WooCommerce orders-meta table; no object cache for this query. | |
| 11 | 12 | $results = $wpdb->get_results( |
| 12 | 13 | $wpdb->prepare( |
| 13 | 14 | "SELECT meta_value FROM {$wpdb->prefix}wc_orders_meta |
| 14 | 15 | WHERE order_id = %d AND meta_key LIKE %s", |
| @@ -30,8 +31,9 @@ | ||
| 30 | 31 | public static function getInvoiceId($wpdb, $orderId) |
| 31 | 32 | { |
| 32 | 33 | $tableName = $wpdb->prefix . 'sync_basalam_payments'; |
| 33 | 34 | |
| 35 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Custom plugin table; identifier from $wpdb->prefix, not user input. | |
| 34 | 36 | $orderData = $wpdb->get_row( |
| 35 | 37 | $wpdb->prepare( |
| 36 | 38 | "SELECT invoice_id FROM {$tableName} WHERE order_id = %d LIMIT 1", |
| 37 | 39 | $orderId |