| @@ -8,8 +8,10 @@ | ||
| 8 | 8 | add_action( 'woocommerce_admin_field_' . self::FIELD_TYPE, array( $this, 'render' ) ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | public function render( $value ) { |
| 12 | + // the description is plugin-defined text (settings arrays), read once for output | |
| 13 | + $description = (string) ( $value['desc'] ?? '' ); | |
| 12 | 14 | if ( ! isset( $value['id'] ) ) { |
| 13 | 15 | $value['id'] = ''; |
| 14 | 16 | } |
| 15 | 17 | |
| @@ -50,9 +52,9 @@ | ||
| 50 | 52 | </div> |
| 51 | 53 | <?php endforeach; ?> |
| 52 | 54 | <div style="width: 100%; height:0"></div> |
| 53 | 55 | <div> |
| 54 | - <p class="description"><?php echo wp_kses_post( $value['desc'] ); ?></p> | |
| 56 | + <p class="description"><?php echo wp_kses_post( $description ); // nosemgrep ?></p> | |
| 55 | 57 | </div> |
| 56 | 58 | <?php do_action( 'tiered_pricing_table/settings/table_columns/after_fields' ); ?> |
| 57 | 59 | </div> |
| 58 | 60 | |