Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_action( 'nf_get_form_id', function( $form_id ) {
if( '12' == $form_id ) {
$recaptcha_lang = 'en';
Ninja_Forms()->update_setting( 'recaptcha_lang', $recaptcha_lang, true );
}
});
<?php
add_action( 'init', function() {
if( true ){ // Some condition to change the language.
$recaptcha_lang = 'en';
Ninja_Forms()->update_setting( 'recaptcha_lang', $recaptcha_lang, true );
}
});
<?php
/**
* Update the `recaptcha_lang` setting.
*
* @param string $setting_key
* @param string $new_value
* @param bool $defer_update True will update the value in memeory, but will not update the database.
*/
Ninja_Forms()->update_setting( 'recaptcha_lang', $recaptcha_lang, true );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.