| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | namespace SRFM\Inc\Single_Form_Settings; |
| 10 | 10 | |
| 11 | +use SRFM\Inc\Compatibility\Multilingual\String_Collector; | |
| 11 | 12 | use SRFM\Inc\Helper; |
| 12 | 13 | use SRFM\Inc\Traits\Get_Instance; |
| 13 | 14 | use WP_Error; |
| 14 | 15 | use WP_REST_Request; |
| @@ -171,8 +172,15 @@ | ||
| 171 | 172 | // Read back the persisted value so the client can re-baseline |
| 172 | 173 | // against whatever sanitize_callbacks returned. |
| 173 | 174 | $saved[ $meta_key ] = get_post_meta( $post_id, $meta_key, true ); |
| 174 | 175 | } |
| 176 | + | |
| 177 | + // The settings dialog persists meta via update_post_meta() without firing | |
| 178 | + // save_post, so String_Collector::on_form_save() never runs for these edits. | |
| 179 | + // Re-collect explicitly so confirmation / notification / restriction strings | |
| 180 | + // are (re-)registered with the active multilingual provider. collect() is | |
| 181 | + // provider-gated and idempotent, and a no-op when no provider is active. | |
| 182 | + String_Collector::get_instance()->collect( $post_id ); | |
| 175 | 183 | |
| 176 | 184 | return new WP_REST_Response( |
| 177 | 185 | [ |
| 178 | 186 | 'success' => true, |