How to quickly update an old search form to a new one in Travelpayouts plugin

If you have previously placed an old search form widget via shortcode using the Travelpayouts WordPress plugin and now want to quickly upgrade your search form to a new one, follow the instructions in this article.

Who can use this instruction: anyone who already has the old Aviasales or Hotellook search form installed via the Travelpayouts WordPress plugin.

To upgrade, you need to get the widget code for the new search form. You can do this in two ways: in your Travelpayouts personal account or directly inside the Travelpayouts WordPress plugin. Let’s take a look at how to do this in detail.

Updating using a code from your personal cabinet

  1. Login to your Travelpayouts account.
  2. Select the search form widget you need:

You can simply follow the link above or find the widget yourself in your Travelpayouts account. To do this, go to the Programs section, select the Aviasales or Hotellook program, and go to the Tools -> Widgets tab. In the list, find the Search form widget and click Set up.

  1. Copy the code of the widget.

  1. Open your WordPress admin dashboard and go to the Travelpayouts plugin section.
  2. In Search forms choose the record with the previously created old search form and click Edit.

  1. Paste the new search form code into the Generated Widget Code field and click Save.

  1. Done! All the old search forms hosted on your site will be updated to the new ones!

Updating via Travelpayouts WordPress plugin

  1. Go to your WordPress admin dashboard and under Pages, open the article editor or create a new one.
  2. Click on the Travelpayouts icon in the article editor menu.

Note: the icon is only available if you are using the classic block editor and the Gutenberg block editor.

  1. A block will appear in the body of the article. Click the Widgets button on it.

  1. Select the desired program (Aviasales or Hotellook) and then select the Aviasales or Hotellook   form widget (the one at the bottom of the page):

  1. Click Settings on the widget to customize the search form by specifying the desired parameters to display the results. For example, you can specify departure and arrival city, departure and arrival dates, and number of passengers.
  2. Click Embed widget:

  1. Copy the created code from the article editor view:

  1. Go to the Travelpayouts plugin section.
  2. In Search forms choose the record with the previously created old search form and click Edit.

  1. Paste the new search form code into the Generated Widget Code.
  2. Remove [tp_widget] at the beginning and end of the code and click Save.

  1. Done! All the old search forms on your site will be updated to the new ones!