Your cart is empty!
Load Supported Types
apply_filters( 'vikappointments_load_supported_conversion_types', array $types )
Fires while fetching the e-commerce types that support the conversion codes.
Description
Loads a list of supported types that can be used while creating/editing a conversion code.
The name of the type must be equals to the database table name. In example, the table holding the orders of the packages is called package_order
. The selected table must own the following columns for a correct tracking:
Column | Type | Description |
id |
int(10) | The record primary key. |
conversion |
varchar(64) | Holds the conversion cookie signature. |
By default the system supports the following types:
- reservation - the appointments e-commerce.
Parameters
- $types
-
(array) An array of types. At the first execution of the filter, the return value might be null.
Example
/**
* Loads a list of supported types that can be used while creating/editing a conversion code.
* The name of the type must be equals to the database table name. In example, the table holding
* the orders of the packages is called "package_order".
*
* @param array $types An array of supported types.
*/
add_filter('vikappointments_load_supported_conversion_types', function($types)
{
if (!is_array($types))
{
$types = array();
}
// add support for the packages e-commerce
$types[] = 'package_order';
// IMPORTANT: do not forget to alter the database table, which must specify the conversion column
return $types;
});
Changelog
Version | Description |
---|---|
1.2 | Introduced. |
Last Update: 2021-10-04
Helpful?