Action
wpml_register_single_string
On this page
Registers a RestroPress setting string with WPML String Translation.
This is a WPML hook that RestroPress calls rather than defines. rpress_wpml_sync_settings_on_update() fires it when RestroPress settings are saved, for the email and checkout text settings, so the strings can be translated. The context is admin_texts_rpress_settings and names look like [rpress_settings]from_name or [rpress_settings][pending]subject.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$context | string | WPML string context, admin_texts_rpress_settings. |
$name | string | String name, for example [rpress_settings]from_name. |
$value | string | Current text of the setting. |
Example#
function my_log_registered_string( $context, $name, $value ) {
if ( 'admin_texts_rpress_settings' === $context ) {
error_log( 'RestroPress string registered: ' . $name );
}
}
add_action( 'wpml_register_single_string', 'my_log_registered_string', 10, 3 );
Notes#
Fired from two places with the same signature; the second one builds the name from the order status and field, for example [rpress_settings][pending]subject. The hook is owned by WPML.
Source#
Fired from:
includes/plugin-compatibility.php(line 727), inrpress_wpml_sync_settings_on_update()includes/plugin-compatibility.php(line 737), inrpress_wpml_sync_settings_on_update()
See also#
Was this page helpful?
