Commit faeddde
feat: simplify API key flow — always read-only + redesigned post-connect card
- Drop the read/read_write permission picker. Hey Woo always provisions
a read-only key; merchants who later need broader scope edit it in
WooCommerce → Settings → Advanced → REST API (same credential, new
permissions, no re-download). Removes set_permissions / SCOPE_*
constants / handle_set_permissions and the matching UI + JS.
- Redesign the post-connection card: API KEY label with a status pill
(LIVE when MCP is on, OFF when off, palette borrowed from WC's
status-processing / status-cancelled pills), monospace key name,
three text-link actions (Permissions, Regenerate, Disconnect).
Permissions deep-links to the key's edit row via &edit-key=<id>.
- Drop the Step 1 header from the post-connection card; rename the
Plugins-screen action link from "Set up Claude" to "Setup".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9f0da3e commit faeddde
6 files changed
Lines changed: 180 additions & 488 deletions
File tree
- includes/setup
- assets
- views
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
| |||
208 | 200 | | |
209 | 201 | | |
210 | 202 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | 203 | | |
215 | 204 | | |
216 | 205 | | |
217 | 206 | | |
218 | 207 | | |
219 | 208 | | |
220 | 209 | | |
221 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
222 | 261 | | |
223 | | - | |
| 262 | + | |
| 263 | + | |
224 | 264 | | |
225 | 265 | | |
226 | 266 | | |
227 | 267 | | |
228 | 268 | | |
229 | | - | |
| 269 | + | |
| 270 | + | |
230 | 271 | | |
231 | 272 | | |
232 | 273 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
240 | 284 | | |
241 | 285 | | |
242 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 57 | | |
125 | 58 | | |
126 | 59 | | |
| |||
184 | 117 | | |
185 | 118 | | |
186 | 119 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 120 | | |
191 | 121 | | |
192 | 122 | | |
| |||
0 commit comments