English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Conversions  >  Load Supported Pages

apply_filters( 'vikappointments_load_supported_conversion_pages', array $pages )

Fires while fetching the pages that support the conversion codes.


Description

Loads a list of supported pages that can be used while creating/editing a conversion code.

The name of the page must be equals to the view name in the front-end. In example, the page displaying the list of employees is called "employeeslist".

By default the system supports the following pages:

  • confirmapp - the page used to fill the custom fields;
  • order - the landing page after a successful purchase.

Parameters

$pages

(array)  An array of pages. At the first execution of the filter, the return value might be null.


Example

/**
 * Loads a list of supported pages that can be used while creating/editing a conversion code.
 * The name of the page must be equals to the view name in the front-end. In example, the page
 *
 * @param  array  $pages  An array of supported pages.
 */
add_filter('vikappointments_load_supported_conversion_pages', function($pages)
{
    if (!is_array($pages))
    {
        $pages = array();
    }

    // add support for the employee details page
    $pages[] = 'employeesearch';
    // add support for the service details page
    $pages[] = 'servicesearch';

    return $pages;
});

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-10-04
Helpful?