Skip to content

A platform for community discussion. Free, open, simple.

DEV: add deprecation to addSaveableUserOptionField (#38638)

Isaac Janzena1070f299d18
diff --git a/frontend/discourse/app/lib/plugin-api.gjs b/frontend/discourse/app/lib/plugin-api.gjs
index 700330fcf81..fa0fc6a34f9 100644
--- a/frontend/discourse/app/lib/plugin-api.gjs
+++ b/frontend/discourse/app/lib/plugin-api.gjs
@@ -2190,6 +2190,14 @@ class _PluginApi {
* @deprecated Use `addSaveableUserOption` instead
*/
addSaveableUserOptionField(fieldName, options = {}) {
+ deprecated(
+ "`addSaveableUserOptionField` has been renamed to `addSaveableUserOption`",
+ {
+ id: "discourse.add-saveable-user-option-field",
+ since: "2026.3",
+ }
+ );
+
this.addSaveableUserOption(fieldName, options);
}