WordPress action hook
trp_save_editor_translations_regular_strings
Fired by 3 WordPress plugins, running on 401K+ sites between them.
How to use trp_save_editor_translations_regular_strings
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'trp_save_editor_translations_regular_strings', function( $update_strings, $settings ) {
// Your code runs here.
}, 10, 2 );Argument names come from TranslatePress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
3 plugins that fire trp_save_editor_translations_regular_strings
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
TranslatePress400,000+ installs
do_action( 'trp_save_editor_translations_regular_strings', $update_strings, $this->settings )includes/class-editor-api-regular-strings.php:360 -
Subscriptions for WooCommerce Recurring Payments with Membership Content Restriction800+ installs
do_action( 'trp_save_editor_translations_regular_strings', [$language => $updates], $this->settings )src/Supports/TranslatePressDictionary.php:166 -
CloseHub Connector40+ installs
do_action( 'trp_save_editor_translations_regular_strings', [ $language => $update ], get_option( 'trp_settings', [] ) )includes/class-translatepress.php:527
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.