Skip to content

Remove old backward compatibility option for adding product field opt…#3173

Merged
Crabcyborg merged 1 commit into
masterfrom
remove_old_backward_compatibility_option_for_adding_product_field_options
Jun 24, 2026
Merged

Remove old backward compatibility option for adding product field opt…#3173
Crabcyborg merged 1 commit into
masterfrom
remove_old_backward_compatibility_option_for_adding_product_field_options

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

…ions

Summary by CodeRabbit

  • Bug Fixes
    • Improved how field values are cleaned before being shown in table views, helping prevent unsafe content from appearing.
    • Removed an outdated “add option” control from field settings, so option lists now display more consistently.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3269c48b-7177-41ec-b366-cf59a42e31f5

📥 Commits

Reviewing files that changed from the base of the PR and between b096bc4 and a309ae5.

📒 Files selected for processing (2)
  • classes/models/fields/FrmFieldType.php
  • classes/views/frm-fields/back-end/field-options.php
💤 Files with no reviewable changes (2)
  • classes/views/frm-fields/back-end/field-options.php
  • classes/models/fields/FrmFieldType.php

📝 Walkthrough

Walkthrough

Removes the deprecated protected get_add_option_string() method from FrmFieldType and adds a public filter_value_for_table_html() method that sanitizes values via wp_kses_post. Removes the legacy backwards-compatibility "add option" button block from the field-options template that targeted Pro-connected product fields.

Changes

Legacy Option Cleanup and Sanitization Helper

Layer / File(s) Summary
Remove deprecated method, legacy template block, and add sanitization helper
classes/models/fields/FrmFieldType.php, classes/views/frm-fields/back-end/field-options.php
Drops the deprecated get_add_option_string() method, adds public filter_value_for_table_html() returning wp_kses_post($value), and removes the conditional legacy "add option" UI container for Pro-connected product fields from the field-options template.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A deprecated method hops away,
The legacy button has had its day.
🐇 wp_kses_post now guards the door,
Clean code blooms from the forest floor.
Less is more, the rabbit says — hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: removing an old backward-compatibility product option UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove_old_backward_compatibility_option_for_adding_product_field_options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Crabcyborg Crabcyborg merged commit 0e2acfd into master Jun 24, 2026
43 of 46 checks passed
@Crabcyborg Crabcyborg deleted the remove_old_backward_compatibility_option_for_adding_product_field_options branch June 24, 2026 17:07
@deepsource-io

deepsource-io Bot commented Jun 24, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in b096bc4...a309ae5 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jun 24, 2026 5:04p.m. Review ↗
JavaScript Jun 24, 2026 5:04p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant