Actions

includes/admin/post-types/class-yith-wcbk-booking-create.php

Copied!
Copy

Action fired to check if order has booking and, if so, create the related bookings

Params
 int $order_id The order ID.

includes/admin/post-types/class-yith-wcbk-booking-metabox.php

Copied!
Copy

Hook to print the meta-box content

Params
 WP_Post $post The post.

Copied!
Copy

Hook to perform any action when processing booking meta

Params
 YITH_WCBK_Booking $booking The booking.

includes/admin/post-types/class-yith-wcbk-booking-post-type-admin.php

Copied!
Copy

Allows third-party plugin to handle custom actions before printing the booking details row

Params
 YITH_WCBK_Booking $the_booking The booking.
 int               $post_id     The booking ID.

Copied!
Copy

Hook to render custom columns in bookings' table

Params
 string            $column  The column.
 int               $post_id The post ID.
 YITH_WCBK_Booking $booking The booking.

includes/builders/gutenberg/render/class-yith-wcbk-bookable-product-form-block.php

Copied!
Copy

Hook to output the add-to-cart form for the bookable product


includes/builders/gutenberg/render/class-yith-wcbk-booking-form-block.php

Copied!
Copy

Hook to output the add-to-cart form for the bookable product


includes/class-yith-wcbk-ajax.php

Copied!
Copy

Hook to output the booking form

Params
 WC_Product_Booking $product The bookable product.
 array              $args    Arguments.

Copied!
Copy

Hook to handle a specific admin ajax request


Copied!
Copy

Hook to handle a specific frontend ajax request


includes/class-yith-wcbk-cache.php

Copied!
Copy

Hook fired when deleting cache data for a specific object type

Params
 int  $id       The ID of the object.
 int  $key_args The key arguments.
 bool $result   True if the deletion succeeded; false otherwise.

Copied!
Copy

Hook fired when deleting cache data for a specific object

Params
 string $object_type The object type.
 int    $id          The ID of the object.
 int    $key_args    The key arguments.
 bool   $result      True if the deletion succeeded; false otherwise.

includes/class-yith-wcbk-cart.php

Copied!
Copy

Hook to perform any action after add-to-cart validation

Params
 WC_Product_Booking $product           The bookable product.
 bool               $passed_validation True if passed validation; false otherwise.
 array              $booking_data      The booking data.
 array              $cart_item_data    The cart item data.

includes/class-yith-wcbk-frontend-action-handler.php

Copied!
Copy

Hook to perform any action after request confirmation action

Params
 bool               $success True if the booking was correctly created; false otherwise.
 YITH_WCBK_Booking  $booking The booking.
 WC_Product_Booking $product The bookable product.
 array              $props   The booking props.
 array              $args    The request arguments.

includes/class-yith-wcbk-install.php

Copied!
Copy

Action fired after updating the plugin


Copied!
Copy

Action fired after installing the plugin


includes/class-yith-wcbk-modules.php

Copied!
Copy

Hook fired when a specific module is activated


Copied!
Copy

Hook fired when a specific module is deactivated


includes/class-yith-wcbk-orders.php

Copied!
Copy

Hook to output the bookings' list table in My Account > Bookings

Params
 YITH_WCBK_Booking[] $bookings The bookings.

Copied!
Copy

Hook to perform any action when an order is created when creating a booking manually

Params
 YITH_WCBK_Booking $booking       The booking.
 WC_Order          $order         The order.
 int               $order_item_id The order item id.

includes/class-yith-wcbk-post-types.php

Copied!
Copy

Hook to perform any action after loading the post-type handlers


Copied!
Copy

Hook to perform any action when registering the plugin post-types


Copied!
Copy

Hook to perform any action after when processing meta of a specific post-type (in meta-boxes)

Params
 int     $post_id The post ID.
 WP_Post $post    The post.

includes/class-yith-wcbk-product-post-type-admin.php

Copied!
Copy

Hook to perform any action when processing the bookable product meta

Params
 WC_Product_Booking $product The bookable product.

includes/data-stores/class-yith-wcbk-booking-data-store.php

Copied!
Copy

Hook to perform any action when a booking is created

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action when a booking is created

Params
 int               $id      The booking ID.
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action when a booking is read

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action when a booking is updated

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action when a booking is updated

Params
 int               $id      The booking ID.
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action before deleting a booking

Params
 int               $id      The booking ID.
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action after deleting a booking

Params
 int $id The booking ID.

Copied!
Copy

Hook to perform any action when trashing a booking

Params
 int               $id      The booking ID.
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action when reading data for a booking

Params
 YITH_WCBK_Booking            $booking    The booking.
 YITH_WCBK_Booking_Data_Store $data_store The data store.

Copied!
Copy

Hook to perform any action to handle updated pros when saving a booking

Params
 YITH_WCBK_Booking $booking       The booking.
 array             $updated_props The updated props.

Copied!
Copy

Hook to perform any action when clearing caches for a booking object

Params
 YITH_WCBK_Booking            $booking    The booking.
 YITH_WCBK_Booking_Data_Store $data_store The data store.

includes/data-stores/class-yith-wcbk-global-availability-rule-data-store.php

Copied!
Copy

Hook to perform any action when a global availability rule is created

Params
 YITH_WCBK_Global_Availability_Rule $rule The rule.

Copied!
Copy

Hook to perform any action when a global availability rule is read

Params
 YITH_WCBK_Global_Availability_Rule $rule The rule.

Copied!
Copy

Hook to perform any action when a global availability rule is updated

Params
 YITH_WCBK_Global_Availability_Rule $rule The rule.

Copied!
Copy

Hook to perform any action before deleting a global availability rule

Params
 YITH_WCBK_Global_Availability_Rule $rule The rule.

Copied!
Copy

Hook to perform any action after deleting a global availability rule

Params
 int $id The rule ID.

includes/data-stores/class-yith-wcbk-global-price-rule-data-store.php

Copied!
Copy

Hook to perform any action when creating a global price rule

Params
 YITH_WCBK_Global_Price_Rule $rule The rule.

Copied!
Copy

Hook to perform any action when reading a global price rule

Params
 YITH_WCBK_Global_Price_Rule $rule The rule.

Copied!
Copy

Hook to perform any action when updating a global price rule

Params
 YITH_WCBK_Global_Price_Rule $rule The rule.

Copied!
Copy

Hook to perform any action before deleting a global price rule

Params
 YITH_WCBK_Global_Price_Rule $rule The rule.

Copied!
Copy

Hook to perform any action after deleting a global price rule

Params
 int $id The rule ID.

includes/data-stores/class-yith-wcbk-product-booking-data-store-cpt.php

Copied!
Copy

Hook to perform any action when reading data for a bookable product

Params
 WC_Product_Booking                       $product    The bookable product.
 YITH_WCBK_Product_Booking_Data_Store_CPT $data_store The data store.

Copied!
Copy

Hook to perform any action to handle updated pros when saving a bookable product

Params
 WC_Product_Booking $product       The bookable product.
 array              $updated_props The updated props.

Copied!
Copy

Hook to perform any action after synchronizing the bookable product price

Params
 WC_Product_Booking $product The bookable product.

includes/data/abstract-yith-wcbk-data.php

Copied!
Copy

Hook to perform any action before saving an object

Params
 YITH_WCBK_Data $this       The object.
 object         $data_store The data store.

Copied!
Copy

Hook to perform any action after saving an object

Params
 YITH_WCBK_Data $this       The object.
 object         $data_store The data store.

includes/data/class-wc-product-booking.php

Copied!
Copy

Hook to perform any action before checking the availability of a bookable product

Params
 array              $args    The arguments.
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Hook to perform any action before calculating the bookable product cost

Params
 int                $timestamp The timestamp for which the cost is calculated.
 string             $type      The type of the cost.
 WC_Product_Booking $product   The bookable product.

includes/data/class-yith-wcbk-booking.php

Copied!
Copy

Hook to perform any action on booking status transition

Params
 bool              $status_to The new status.
 int               $id        The booking ID.
 YITH_WCBK_Booking $booking   The booking.

Copied!
Copy

Hook to perform any action on booking status transition

Params
 int               $id      The booking ID.
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to perform any action on booking status transition

Params
 int               $id          The booking ID.
 string            $status_from The previous status.
 string            $status_to   The new status.
 YITH_WCBK_Booking $booking     The booking.

includes/emails/class-yith-wcbk-email.php

Copied!
Copy

Hook to perform any action before sending email

Params
 YITH_WCBK_Email $email             The email..
 bool            $is_customer_email True if is a mail for the customer.

Copied!
Copy

Hook to perform any action after sending email

Params
 YITH_WCBK_Email $email             The email..
 bool            $is_customer_email True if is a mail for the customer.

Copied!
Copy

Action fired to render the email booking details

Params
 YITH_WCBK_Booking $booking       The booking.
 false             $sent_to_admin Sent to admin flag.
 false             $plain_text    Plain text flag.
 WC_Email|null     $email         The Email.

Copied!
Copy

Action fired to render the email booking details

Params
 YITH_WCBK_Booking $booking       The booking.
 false             $sent_to_admin Sent to admin flag.
 false             $plain_text    Plain text flag.
 WC_Email|null     $email         The Email.

includes/functions.yith-wcbk-template.php

Copied!
Copy

Hook to output something at the start of the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output the booking form content and fields

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output the price in the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output the message in the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Hook to output something at the end of the booking form

Params
 WC_Product_Booking $product The bookable product.

includes/integrations/plugins/class-yith-wcbk-quick-view-integration.php

Copied!
Copy

Hook to output the add-to-cart form for the bookable product


init-global.php

Copied!
Copy

Action fired after the Booking plugin is loaded


Copied!
Copy

Action fired to initialize the Booking plugin


modules/costs/includes/functions.php

Copied!
Copy

Hook to perform any action before retrieving Extra Costs

Params
 array $args The arguments passed to the get_posts.

Copied!
Copy

Hook to perform any action after retrieving Extra Costs

Params
 array $args The arguments passed to the get_posts.

modules/google-calendar/includes/class-yith-wcbk-google-calendar-booking-data-extension.php

Copied!
Copy

Used to synchronize the Google Calendar event when the booking is updated

Params
 YITH_WCBK_Booking $booking The booking.

modules/google-calendar/includes/class-yith-wcbk-google-calendar-sync.php

Copied!
Copy

Used to synchronize the Google Calendar event

Params
 int $booking_id The booking ID.

Copied!
Copy

Used to synchronize the Google Calendar event

Params
 int $booking_id The booking ID.

modules/google-maps/includes/class-yith-wcbk-maps.php

Copied!
Copy

Hook to perform some action after successfully retrieving the location coordinates by the address

Params
 array  $location The location retrieved by Google Maps.
 string $address  The address.
 array  $data     Data provided by the request to the Google Geocode API.

modules/people/includes/class-yith-wcbk-person-type-helper.php

Copied!
Copy

Hook to perform any action before retrieving Person Types

Params
 array $args The arguments passed to the get_posts.

Copied!
Copy

Hook to perform any action after retrieving Person Types

Params
 array $args The arguments passed to the get_posts.

modules/people/views/product-tabs/people/people-type.php

Copied!
Copy

Hook to render something after the single person type options

Params
 array $args The person type settings.

modules/resources/includes/class-yith-wcbk-resource-data-store.php

Copied!
Copy

Hook to perform any action before deleting a Resource

Params
 int                $id       The resource ID.
 YITH_WCBK_Resource $resource The resource.

Copied!
Copy

Hook to perform any action after deleting a Resource

Params
 int $id The resource ID.

modules/search-forms/includes/class-yith-wcbk-search-form-data-store.php

Copied!
Copy

Hook to perform any action before deleting a Search Form

Params
 int                   $id          The resource ID.
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to perform any action after deleting a Search Form

Params
 int $id The resource ID.

modules/search-forms/includes/class-yith-wcbk-search-forms-ajax.php

Copied!
Copy

Hook to perform any action before setting the search product query (when searching bookable products though a Search Form)


Copied!
Copy

Hook to render something after the "no booking available" message (if no bookable products was found)


modules/search-forms/includes/functions.php

Copied!
Copy

Hook to perform any action before retrieving results when searching for bookable products

Params
 array $search_args The search arguments (used by the get_posts function).
 array $args        The function args.

Copied!
Copy

Hook to perform any action after retrieving results when searching for bookable products

Params
 array $search_args The search arguments (used by the get_posts function).
 array $args        The function args.

modules/search-forms/templates/booking-search-form.php

Copied!
Copy

Hook to render something before the Search Form

Params
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to render something before printing a field of the Search Form

Params
 string                $field_key   The field key.
 array                 $field_data  The field data..
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to render something when printing a field of the Search Form

Params
 string                $field_key   The field key.
 array                 $field_data  The field data..
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to render something after printing a field of the Search Form

Params
 string                $field_key   The field key.
 array                 $field_data  The field data..
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to render something after the fields rendered in the Search Form

Params
 YITH_WCBK_Search_Form $search_form The search form.

Copied!
Copy

Hook to render something after the Search Form

Params
 YITH_WCBK_Search_Form $search_form The search form.

modules/search-forms/templates/results/results.php

Copied!
Copy

Hook to render something before the Search Form results


Copied!
Copy

Hook to render something after the Search Form results


modules/search-forms/templates/results/single.php

Copied!
Copy

Hook to render something before the Search Form result item

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render the item thumbnails in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render something before the item title in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render the item title in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render something after the item title in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render the item price in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render the item add-to-cart in the search form results

Params
 array $booking_data Booking data.

Copied!
Copy

Hook to render something after the Search Form result item

Params
 array $booking_data Booking data.

modules/services/includes/class-yith-wcbk-service-data-store.php

Copied!
Copy

Hook to perform any action before deleting a Service

Params
 int               $id      The service ID.
 YITH_WCBK_Service $service The service.

Copied!
Copy

Hook to perform any action after deleting a Service

Params
 int $id The service ID.

modules/services/includes/class-yith-wcbk-service-tax-admin.php

Copied!
Copy

Hook to allow setting props or perform any action when processing the service meta

Params
 YITH_WCBK_Service $service The service.

Copied!
Copy

Hook to perform any action after saving the Service fields

Params
 int $term_id      The Term ID.
     $service_data $service_data The service data.

modules/services/includes/data/class-yith-wcbk-service.php

Copied!
Copy

Hook to perform any action when a Service is loaded

Params
 YITH_WCBK_Service $this The service.

templates/booking/booking-details.php

Copied!
Copy

Hook to output something in the booking details template after the booking table

Params
 YITH_WCBK_Booking $booking The booking.

templates/booking/pdf/booking.php

Copied!
Copy

Hook to output something in the booking PDF template withing the tag


Copied!
Copy

Hook to output something in the booking PDF template in the header section

Params
 YITH_WCBK_Booking $booking  The booking.
 boolean           $is_admin True if this is a PDF for the admin, false otherwise.

Copied!
Copy

Hook to output something in the booking PDF template in the content section

Params
 YITH_WCBK_Booking $booking  The booking.
 boolean           $is_admin True if this is a PDF for the admin, false otherwise.

Copied!
Copy

Hook to output something in the booking PDF template in the footer section

Params
 YITH_WCBK_Booking $booking  The booking.
 boolean           $is_admin True if this is a PDF for the admin, false otherwise.

templates/emails/email-booking-details.php

Copied!
Copy

Hook to output something before the booking details table in emails

Params
 YITH_WCBK_Booking $booking       The booking.
 bool              $sent_to_admin True if the email is sent to admin, false otherwise.
 bool              $plain_text    True if the email type is text/plain.
 WC_Email          $email         The email object

Copied!
Copy

Hook to output something after the booking details table in emails

Params
 YITH_WCBK_Booking $booking       The booking.
 bool              $sent_to_admin True if the email is sent to admin, false otherwise.
 bool              $plain_text    True if the email type is text/plain.
 WC_Email          $email         The email object

templates/emails/plain/email-booking-details.php

Copied!
Copy

Hook to output something before the booking details table in emails

Params
 YITH_WCBK_Booking $booking       The booking.
 bool              $sent_to_admin True if the email is sent to admin, false otherwise.
 bool              $plain_text    True if the email type is text/plain.
 WC_Email          $email         The email object

Copied!
Copy

Hook to output something after the booking details table in emails

Params
 YITH_WCBK_Booking $booking       The booking.
 bool              $sent_to_admin True if the email is sent to admin, false otherwise.
 bool              $plain_text    True if the email type is text/plain.
 WC_Email          $email         The email object

templates/myaccount/bookings-table.php

Copied!
Copy

Hook to output something before the table in the bookings' list in My Account > Bookings

Params
 bool $has_bookings True if the current user has at least one booking.

Copied!
Copy

Hook to output something in a specific column in the bookings' list in My Account > Bookings

Params
 WC_Order          $the_order The order.
 YITH_WCBK_Booking $booking   The booking.

Copied!
Copy

Hook to output something in the "actions" column in the bookings' list in My Account > Bookings

Params
 YITH_WCBK_Booking $booking          The booking.
 bool              $show_view_action True to include the "view" action.

Copied!
Copy

Hook to output something before pagination in the bookings' list in My Account > Bookings


Copied!
Copy

Hook to output something after the table in the bookings' list in My Account > Bookings

Params
 bool $has_bookings True if the current user has at least one booking.

templates/myaccount/bookings.php

Copied!
Copy

Hook to output something before the bookings' list in My Account > Bookings

Params
 bool $has_bookings True if the current user has at least one booking.

Copied!
Copy

Hook to output the bookings' list table in My Account > Bookings

Params
 YITH_WCBK_Booking[] $bookings The bookings.

Copied!
Copy

Hook to output something before the pagination in the bookings' list in My Account > Bookings


Copied!
Copy

Hook to output something after the bookings' list in My Account > Bookings

Params
 bool $has_bookings True if the current user has at least one booking.

templates/myaccount/view-booking.php

Copied!
Copy

Allows to render some content or fire some action in My Account > Bookings > View booking page

Params
 int $booking_id The booking ID.

templates/shortcodes/booking-form.php

Copied!
Copy

Used to output title, rating and price before the booking add-to-cart form in the booking form shortcode


Copied!
Copy

Hook to output the add-to-cart form for the bookable product


Copied!
Copy

Used to output meta and sharing sections after the booking add-to-cart form in the booking form shortcode


templates/single-product/add-to-cart/booking-form/dates.php

Copied!
Copy

Hook to output the booking form date fields

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Hook to output the booking form duration field

Params
 WC_Product_Booking $product The bookable product.

templates/single-product/add-to-cart/booking-form/dates/duration.php

Copied!
Copy

Hook to output something after the "duration" label in the booking form

Params
 int    $duration        The duration.
 string $duration_unit   The duration unit.
 int    $duration_number The duration number.
 string $duration_label  The duration label.

templates/single-product/add-to-cart/booking-form/widget-booking-form.php

Copied!
Copy

Used to output price and rating before the booking add-to-cart form in the widget


Copied!
Copy

Hook to output something before the booking add-to-cart form in the widget


Copied!
Copy

Hook to output the add-to-cart form for the bookable product


Copied!
Copy

Hook to output something after the booking add-to-cart form in the widget


templates/single-product/add-to-cart/booking.php

Copied!
Copy

Hook to output something before the booking form


Copied!
Copy

Hook to output something at the start of the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output meta in the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output the booking form content and fields

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Used to output the message in the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Hook to output something at the end of the booking form

Params
 WC_Product_Booking $product The bookable product.

Copied!
Copy

Hook to output something before the add-to-cart button in the booking form


Copied!
Copy

Hook to output something after the add-to-cart button in the booking form


views/calendar/html-booking-calendar-action-bar.php

Copied!
Copy

Allows to render some content in the booking calendar action bar after the product search field


views/calendar/html-booking-calendar-single-booking-data.php

Copied!
Copy

Hook to output something before single booking data shown in the admin calendar

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to output something before single booking data in the table shown in the admin calendar

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to output something after single booking data in the table shown in the admin calendar

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to output something after single booking data shown in the admin calendar

Params
 YITH_WCBK_Booking $booking The booking.

views/create-booking.php

Copied!
Copy

Allows to render some content in the booking creation template before the default options


Copied!
Copy

Allows to render some content in the booking creation template after the default options


views/metaboxes/html-booking-meta-actions.php

Copied!
Copy

Hook to output something at the end of the "Actions" meta-box in booking details (admin side)

Params
 YITH_WCBK_Booking $booking The booking.

views/metaboxes/html-booking-meta-data.php

Copied!
Copy

Hook to output something in the booking data meta-box after the first column

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to output something in the booking data meta-box after the second column

Params
 YITH_WCBK_Booking $booking The booking.

Copied!
Copy

Hook to output something in the booking data meta-box after the third column

Params
 YITH_WCBK_Booking $booking The booking.

views/product-tabs/html-costs-tab.php

Copied!
Copy

Hook to output something in the "costs" tab of the bookable product edit page after standard prices

Params
 WC_Product_Booking|false $booking_product The bookable product.

views/product-tabs/html-settings-tab.php

Copied!
Copy

Hook to output something at the end of the "settings" tab in the bookable product edit page

Params
 WC_Product_Booking|false $booking_product The bookable product.

views/product-tabs/utility/html-availability-rule.php

Copied!
Copy

Hook to output something in the "availability" tab in the bookable product edit page after the availability rule options

Params
 string                      $_field_name       The field name.
 string                      $_field_id_prefix  The field ID prefix.
 string                      $index             The index of the rule.
 YITH_WCBK_Availability_Rule $availability_rule The availability rule.