Hi @rickyfant and thanks for reporting the trouble.
My inclination is for you to change the API key in the plugin to the sub-account value. You can get this using the credentials of the sub-account. See it here https://ui.benchmarkemail.com/Integrate#API
I suppose this depends on your configuration with the localized website and whether you have access to a separate plugin settings page for the localized website versus the main website. It’s been a while since I’ve used WP Multisite Networks if that’s how you’re doing it. Let me know and I’ll check further.
Thanks for your help Sean. I’m actually using a single instance of WP in multi-language mode. I’ve had your same idea, but wasn’t able to find a way to set a dedicated Benchmark API for each language (definitely I guess I don’t have enough technical skill to do that).
Just to avoid wasting your time (unless you’re curious to solve it) I’ve adopted a workaround that works pretty well: instead of using Benchmark’s reference short codes to recall the forms, I’ve copied the forms’ full HTML code in the places (page, widget) where they should appear. Less clean but fully functional.
That’s good you have a workaround for now. Yes, using Benchmark’s JavaScript code from each form will present it correctly. However, it’s less desirable to have to do it more manually.
I’m curious if this is WPML powered? If so, I’m sure they offer some PHP filters that we could support. We could write a custom function you insert into the child theme or Code Snippets plugin that uses the selected language to swap API keys. Let me know which ML plugin you’re using and I’ll have a look at that.
Yes, WPML Multilingual CMS 4.4.3 is installed.
From what I’ve researched, the following code should tell WPML to translate the Benchmark Email Lite plugin settings. You will run the “connect” per language selection.
Docs: https://wpml.org/wpml-hook/wpml_multilingual_options/
Code Snippet:
add_action( 'init', function() {
do_action( 'wpml_multilingual_options', 'wpbme_temp_token' );
do_action( 'wpml_multilingual_options', 'wpbme_temp_token_ttl' );
do_action( 'wpml_multilingual_options', 'wpbme_key' );
do_action( 'wpml_multilingual_options', 'wpbme_ap_token' );
} );
Code Snippets can be managed with the free Code Snippets plugin or via your child theme code editor on functions.php
.
Do you have a staging site that you can test this on? If not, I’m probably due to renew my GPLVault subscription from which I can download WPML and test this out.
Thanks so much. It’s getting a little too technical for my limited skills. I’ll pass this info on to my tech colleagues.