Commit b3f07a3
authored
UR-4798 Fix - Fall back to basic profile fields for non-UR-form users (#1390)
* UR-4798 Fix - Fall back to basic profile fields for non-UR-form users
Non-UR-form users (wp-admin/WooCommerce created, ur_form_id unresolved) had no way to actually save Profile Details - user_registration_form_data() returned an empty profile so the save loop had nothing to write. Adds ur_get_non_urm_user_profile_fields() and uses it as a fallback in update_profile_details() so these users can save Username/First Name/Email/Last Name like any other account.
* UR-4798 Fix - Add pending-email notice to non-UR-form profile template
Adds the same pending-email-change notice + Cancel link that UR-form fields already get (functions-ur-template.php), so non-UR-form users see and can cancel a pending email change too - previously the notice only appeared via the AJAX success handler, never on a plain page load / non-ajax submit.
Placed the notice as the direct next sibling of the <input>, matching where the AJAX success handler looks (input.next('div.email-updated')) so an AJAX save correctly replaces a server-rendered notice instead of leaving a stale duplicate next to the fresh one.
Verified via Playwright end-to-end on a fresh non-UR-form test user: ajax save, non-ajax save, reload persistence, and Cancel link all behave correctly with no duplicate notices.1 parent 4d172ed commit b3f07a3
3 files changed
Lines changed: 84 additions & 1 deletion
File tree
- includes
- templates/myaccount
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11205 | 11205 | | |
11206 | 11206 | | |
11207 | 11207 | | |
| 11208 | + | |
| 11209 | + | |
| 11210 | + | |
| 11211 | + | |
| 11212 | + | |
| 11213 | + | |
| 11214 | + | |
| 11215 | + | |
| 11216 | + | |
| 11217 | + | |
| 11218 | + | |
| 11219 | + | |
| 11220 | + | |
| 11221 | + | |
| 11222 | + | |
| 11223 | + | |
| 11224 | + | |
| 11225 | + | |
| 11226 | + | |
| 11227 | + | |
| 11228 | + | |
| 11229 | + | |
| 11230 | + | |
| 11231 | + | |
| 11232 | + | |
| 11233 | + | |
| 11234 | + | |
| 11235 | + | |
| 11236 | + | |
| 11237 | + | |
| 11238 | + | |
| 11239 | + | |
| 11240 | + | |
| 11241 | + | |
| 11242 | + | |
| 11243 | + | |
| 11244 | + | |
| 11245 | + | |
| 11246 | + | |
| 11247 | + | |
| 11248 | + | |
| 11249 | + | |
| 11250 | + | |
| 11251 | + | |
| 11252 | + | |
11208 | 11253 | | |
11209 | 11254 | | |
11210 | 11255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
175 | 208 | | |
176 | 209 | | |
177 | 210 | | |
| |||
0 commit comments