WooFunnels Documentation
Get unstuck with our helpful reference material

Setup Funnels with WPML

You can use WPML to create different pages of your sales funnel in different languages for your users. 

This way the user from different countries will only see their regional-translated pages.

In this document, you will learn how to create different language-translated pages with WPML using WooFunnels.

Step 1: Mark funnels as translatable

Go to WPML > Settings > Post Type Translations. Then, mark Funnels as translatable.

Mark funnels as translatable

Click on Save.

Step 2: Create funnels for each language

Create a separate funnel for each language. 

First, select the language you want. And then click on Add New to start creating your funnel.

Please note that the funnel will be created for that language that you selected here.

Create funnels for each language

To identify the language of the funnel, we recommend you add a funnel name with the language you’re creating like this:

language of the funnel

Step 3: Create the pages you want on your funnel

Add the respective pages (Checkout, Order Bumps, Upsells, etc.) for each language to your funnel.

If you’re new to WooFunnels Funnel Builder, we advise you to check out detailed instructions on how to create a sales funnel for your website.

Create the pages you want on your funnel

Step 4: Map the checkout page in each language through its Page ID

Now add the snippet to functions.php so that each checkout page with the corresponding language can be mapped.

To do this, go to Snippets on the WordPress menu. Then, click on Add New.

Add the base language checkout page ID and map them with other languages’ checkout page ID.

add the base language checkout page ID and map them with other languages’ checkout page ID

Here is the snippet code:

add_filter( 'wfacp_wpml_checkout_page_id', function ( $checkout_id ) {
   $checkout_id=WFACP_Common::get_checkout_page_id();
   $map_checkout = [
      '10679' => [ 'es' => 10698,'de' => 4703], // 10698 is global checkout (english) of base language and 10698 is Spanish (alternate langague) comma saperate can be added more 
      
   ]; // Change the country id's to small letters in case capital Case is not working for you. FOr eg: "it" for italy
   if ( class_exists( 'WPML_TM_Records' ) ) {
      if ( isset( $map_checkout[ $checkout_id ] ) && isset( $map_checkout[ $checkout_id ][ ICL_LANGUAGE_CODE ] ) ) {
         $checkout_id = $map_checkout[ $checkout_id ][ ICL_LANGUAGE_CODE ];
      }
   }
   return $checkout_id;
}, 10 );

Let's understand:

10679 is the checkout page ID of your base language; while 10698 is for Spanish (es).

Similarly, you can add more languages as per your requirement.

The code can be further modified with [ 'it' => 681 ,'de' => 682,'en' => 683,'nl' => 684], and so on.

You can find the Checkout page ID by opening the Checkout page from your funnel.

Checkout page ID

We have successfully mapped the different languages of our checkout pages in the snippet.

Now when a user opens the website from a region and adds the product to this checkout page, WooFunnels will load that corresponding Checkout page. 

In the case of English users, it will show the English checkout ID template. With Spanish, it will show the Spanish checkout ID template.

This is how you can create a funnel with different languages using WPML in WooFunnels.

Increase your sales, starting today.

Get WooFunnels Now
chevron-down