Get Started
FunnelKit 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 FunnelKit (formerly 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 Funnel to start creating your funnel.

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

Create funnels for each language

To identify the language of the funnel, we recommend you to add a funnel name with the language you’re creating.

For example, we have created two store checkouts for two different languages:

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 FunnelKit 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 ) {
   $map_checkout = [
      '10679' => [ 'it' => 24737,'pt' => 25282,'fr' => 25313], // 10679 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
	//echo ICL_LANGUAGE_CODE;  //to see current checkout page language please uncomment slashes from starting 'echo'
   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;
}, 20);

Let's understand:

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

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

The code can be further modified with [ 'it' => 24737,'pt' => 25282,'fr' => 25313], 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, FunnelKit 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 FunnelKit.