• Gavin Anderegg

    (@gavinanderegg)


    Hi!

    I recently helped to integrate your plugin on a multilingual site. While doing so I encountered a bug that I needed to work around, and I wanted to mention it here.

    In the salesforce_form_shortcode() function (in /salesforce.php file starting on line 843), there’s the following line (857):

    $options = get_option("salesforce2");

    This grabs the option values from the database, which makes sense. The problem is, this overrides the values from the salesforce_default_settings() function (line 41), including the gettext-ified error messages. Because of this, only the single-language error messages from the DB ever get used.

    I was able to work around this by re-pasting the gettext lines after line 857 in /salesforce.php. This was a quick fix, but I’m hoping you can come up with better solution in a future version? Perhaps allowing the error strings defined in the admin to be blank and, if so, grabbing the error messages (stored in a different array) instead.

    Thanks!

    https://www.ads-software.com/plugins/salesforce-wordpress-to-lead/

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Ciske

    (@nickciske)

    Good to know. I’m refactoring the plugin for v3. Will see if I can accommodate this in that process.

Viewing 1 replies (of 1 total)
  • The topic ‘Multilingual bug report’ is closed to new replies.