Multilangual product enquiry form WooCommerce

Hi everyone. On the website I am making, I would like to place a contact form for each product. I use Fluent Forms and Code Snippets plugins for this. The form works in such a way that it opens when the button is pressed, but only if the text of the button is the same as in the code (you can see it in the code screenshot from Code Snippets). For this reason, when I translate the page to another language using the TranslatePress plugin, the form does not expand because the button text is different (because it has been translated). Can it be resolved somehow? Maybe something like adding two conditions to the button name in the code?



// Adds a enquiry form on your Woocommerce Single product page

add_action( ‘woocommerce_single_product_summary’, ‘enquiry_form’, 30 );
function enquiry_form() {
echo ‘<button type=”submit” id=”trigger_cf” class=”button alt”>SEND US YOUR ENQUIRY</button>’;
echo ‘<div id=”product_inq” style=”display:none”>’;
echo do_shortcode(‘[fluentform id=”3″]’);
echo ‘</div>’;

add_action( ‘woocommerce_single_product_summary’, ‘enquiry_form_1’, 40);
function enquiry_form_1() {
<script type=”text/javascript”>
jQuery(‘#trigger_cf’).on(‘click’, function(){
if ( jQuery(this).text() == ‘SEND US YOUR ENQUIRY’ ) {
} else {
jQuery(“#trigger_cf”).html(‘SEND US YOUR ENQUIRY’);


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer