Manage the Offers linked to the booking engine by promo code

 Methods

Disables the feature

disable() 
Static

Enables the feature

enable(string $connect_name) 
Static

Parameters

$connect_name

string

the default connect name for these offers

Retrieves the book now onclick attribute

get_booknow(object $post, \number $format) : string
Static

Parameters

$post

object

the offer custom post

$format

\number

the format

Returns

stringthe onclick attribute

Retrieves the offer details

get_offer_details(object $post) : array
Static

Format: array ( 'cname' => 'ITAOSHTLExpress', 'lg' => '', 'codeprice' => 'PROMO-Terme-e-gastronomia', 'firstroom' => 'Double-Superior', 'codetrack' => '', 'firstdate' => '', )

Parameters

$post

object

the post object

Returns

arraya list of details

Retrieves the price_content div

get_offer_price() : string
Static

Returns

string

Prints the metabox for the offer details

metabox_html(object $post) 
Static

Parameters

$post

object

the current post

Register the custom post type

register_custom_post() 
Static

Registers the needed custom taxonomy

register_custom_taxonomy() 
Static

Registers the needed metaboxes

register_metaboxes() 
Static

Saves the metabox data while saving the offer

save_metabox_data($post_id) 
Static

Parameters

$post_id

Returns the list of allowed offers details

offer_details_list() : array
Static

Returns

array

 Properties

 

$connect_name : string
 

$enabled : bool

 Constants

 

Stores the custom post name

CUSTOM_POST_NAME : string
 

Stores the custom taxonomy name

CUSTOM_TAX_NAME : string
 

Use to retrieve the book now button compatibile with fblib.js

FORMAT_FBLIB : int
 

Use to retrieve the book now button compatible with Fblib

FORMAT_OOFBLIB : int
 

Stores the meta key name where store the offers details

META_KEY_NAME : string