Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • Docs Home

Packages

  • BKAP
    • Addons
    • Admin-Bookings
    • Attribute-Lockout
    • Block-Pricing
    • Booking-Box
    • Booking-Confirmation
    • Booking-Process
    • Cancel-Order
    • Cart
    • Checkout-Process
    • Core
    • Date-Time
    • Emails
    • Functions
    • Global-Function
    • Global-Settings
    • Google-Calendar-Sync
    • ICS
    • Import-Booking
    • Labels
    • License
    • Menus
    • Meta-Boxes
    • Reschedule
    • Resources
    • Search-Widget
    • Special-Price
    • Uninstall
    • Validation
    • Variation-Lockout
    • Vendors
      • Dokan
      • WC-Vendors
    • View-Bookings
  • None

Classes

  • BKAP_Booking

Class BKAP_Booking

Bookings and Appointment Plugin for WooCommerce

Class for booking posts, this handles all the data

Package: BKAP\Core
Category: Classes
Author: Tyche Softwares
Class: BKAP_Booking
Located at includes/class-bkap-booking.php

Methods summary

public
# __construct( int/array/obj $booking_data = false )

Constructor, possibly sets up with post or id belonging to existing booking or supplied with an array to construct a new booking

Constructor, possibly sets up with post or id belonging to existing booking or supplied with an array to construct a new booking

Parameters

$booking_data

Since

4.1.0
public boolean
# populate_data( integer $booking_id )

Populate the data with the id of the booking provided. Will query for the post belonging to this booking and store it

Populate the data with the id of the booking provided. Will query for the post belonging to this booking and store it

Parameters

$booking_id
  • Booking Post ID

Returns

boolean
True for success, else False

Since

4.1.0
public
# create( string $status = 'confirmed' )

Create new booking post for the order.

Create new booking post for the order.

Parameters

$status
Status for new booking post

Since

4.1.0
public Id
# get_id( )

Returns the id of this booking

Returns the id of this booking

Returns

Id
of the booking or false if booking is not populated

Since

4.1.0
public String
# get_status( Bool $raw = true )

Returns the status of this booking

Returns the status of this booking

Parameters

$raw
ask for pretty status name (if false)

Returns

String
of the booking status

Since

4.1.0
public boolean
# update_status( string $status )

Set the new status for this booking

Set the new status for this booking

Parameters

$status
  • New Status

Returns

boolean
  • True for success, else False

Since

4.1.0
public Order
# get_order( )

Returns the object of the order corresponding to this booking

Returns the object of the order corresponding to this booking

Returns

Order
object or false if booking is not populated

Since

4.1.0
public integer
# get_customer_id( )

Returns the Customer ID

Returns the Customer ID

Returns

integer
Customer ID

Since

4.1.0
public integer
# get_order_id( )

Returns the Order ID

Returns the Order ID

Returns

integer
Order ID

Since

4.1.0
public Product
# get_product_id( )

Returns the Product ID

Returns the Product ID

Returns

Product
ID

Since

4.1.0
public Product
# get_product( )

Returns the Product Object

Returns the Product Object

Returns

Product
Object

Since

4.1.0
public Order
# get_date_created( )

Returns the Order Date

Returns the Order Date

Returns

Order
Date

Since

4.1.0
public Customer
# get_customer( )

Returns the Customer Object

Returns the Customer Object

Returns

Customer
Object

Since

4.1.0
public Start
# get_start( )

Returns the Start Date

Returns the Start Date

Returns

Start
Date as YmdHis

Since

4.1.0
public End
# get_end( )

Returns the End Date

Returns the End Date

Returns

End
Date as YmdHis

Since

4.1.0
public Time
# get_time( )

Returns the Time Slot

Returns the Time Slot

Returns

Time
Slot

Since

4.1.0
public Date
# get_start_date( )

Returns the Start Date

Returns the Start Date

Returns

Date
in the format set in Booking->Settings->Date Format

Since

4.2.0
public Date
# get_end_date( )

Returns the End Date

Returns the End Date

Returns

Date
in the format set in Booking->Settings->Date Format

Since

4.2.0
public Start
# get_start_time( )

Returns Start Time

Returns Start Time

Returns

Start
Time as per format set in Booking->Settings->Time Format

Since

4.2.0
public Start
# get_end_time( )

Returns Start Time

Returns Start Time

Returns

Start
Time as per format set in Booking->Settings->Time Format

Since

4.2.0
public integer
# get_quantity( )

Returns the Booked Quantity

Returns the Booked Quantity

Returns

integer
$quantity

Since

4.2.0
public integer
# get_cost( )

Returns the Booked Cost

Returns the Booked Cost

Returns

integer
$cost

Since

4.2.0
public integer
# get_variation_id( )

Returns the Variation ID

Returns the Variation ID

Returns

integer
$variation_id

Since

4.4.0
public integer
# get_item_id( )

Returns the Item ID for the booked product

Returns the Item ID for the booked product

Returns

integer
$item_id

Since

4.4.0
public integer
# get_resource( )

Returns resource

Returns resource

Returns

integer
$resource_id - Resource used in the booking

Since

4.6.0
public string
# get_resource_title( )

Returns resource title

Returns resource title

Returns

string
$resource_title - Title of the resource being used in the booking.

Since

4.6.0

Properties summary

public $id

Public

int
#
public $booking_date

Public

string
#
public $start

Public

string
#
public $end

Public

string
#
public $all_day

Public

bool
#
public $modified_date

Public

string
#
public $post

Public

object
#
public $product_id

Public

int
#
public $product

Public

object
#
public $order_id

Public

int
#
public $order

Public

object
#
public $customer_id

Public

int
#
public $status

Public

string
#
public $gcal_event_uid

Public

string
#
public $custom_fields

Public

array - contains all post meta values for this booking
#
public $populated

Public

bool
#
API documentation generated by ApiGen