Working with WooCommerce Bookings

    1. Translating a bookable product
    2. Synchronization between the bookings
    3. Emails are sent in the booked product language
    4. Translating WooCommerce Bookings endpoints

The compatibility with WooCommerce Bookings is provided by Polylang for WooCommerce. However, if you want to translate the bookings endpoints, you will have to use Polylang Pro too.

In the following documentation, we will mention the synchronization functionnality several times. As a reminder, “synchronization” means that a modification made to a product impacts all its translations. For example, if you change a bookable product value, such as a checkbox, a selected option, this change will be propagated to the product translations. This works the same way if you add or remove a range of rules in resources, availability, and cost settings.

1. Translating a bookable product

You will need to translate your bookable product in all languages. As a reminder, the products are directly translatable in the WooCommerce interface as shown here:

  • General tab

Polylang copies and synchronizes the booking duration, calendar display and confirmation preferences settings.

  • Translating and synchronizing resources

Usually, resources can be translated from their own interface by accessing Bookings > Resources. Note that when creating a new resource translation, all the contents of the existing resource will be copied into this new translation as shown below:

Once the resource translations are complete and when translating a bookable product into another language, Polylang will fill the resource field with the correct translation as below. This is what we call a smart copy. In the example below, it has pre-filled “My Resource – French” which is the translation of the resource “My Resource – English”.

The label is copied and you can modify it. It is not synchronized.

When you create a new bookable product translation, if the resource translation does not exist yet, it is automatically created, by duplicating the original resource..

Example of translated resource automatically created

Let’s say that I have a product available in English and French, the German translation has not been created yet. I decide to create another resource directly in the French product as below:

 

Now I decide to translate this product in German. The creation of this product in German will automatically generate a translation for this resource in German but also in English as shown here:

 

And the synchronization function will add this new translation to the English product as here:

If you decide to add, remove, or select another resource from one of your translated products, this change will impact all translations.

  • Availability and Cost tab

All data on these 2 tabs are copied and synchronized across the translations, even the custom availability range and the additional cost. As explained in the introduction of the documentation, if you modify a value, add or delete a range of rules, the same will apply to other translations.

  • Persons tab

Data such as minimum and maximum number of people, multiple costs per person, count persons as bookings and activation of person type are copied and synchronized. It’s the same for the base cost and the block cost. As for the resources label, the name and description of the person type are copied only. This allows you to have a different value on the booking form through your translations. If you add or remove a person type, this change will impact the translations.

2. Synchronization between the bookings

With Polylang for WooCommerce, when you book a translated product in one language, it also books this product in all other languages. So when you view a product or its translations, they all appear unavailable. It works the same way with partial bookings.

Let’s say that I have a bookable product available in English and French. This product has 10 places available. 4 places have already been booked in English. Although I try to book 10 more places, there are now only 6 bookable seats in English and French as indicated below:

3. Emails are sent in the booked product language

The language of the booking is expected to be the current language of the visitor when he booked the product. The bookings are assigned to this language as shown below, allowing emails sent to the customer to be in this language.

Like WooCommerce emails, the subject and heading of the WooCommerce Bookings emails are translatable in the Strings Translations table (Languages> Strings translations) under the ‘WooCommerce’ group as here:

If this is the first time you have used the Strings translations panel, we recommend that you read the relevant documentation before you start translating WooCommerce Bookings emails.

4. Translating WooCommerce Bookings endpoints

The translation of the endpoints are handled by Polylang Pro. Their translations is made in the Strings Translations option under the URL slug group as explained there.