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_cancel_order

Class bkap_cancel_order

Class for listing the bookings on respective pages

Package: BKAP\Cancel-Order
Author: Tyche Softwares
Located at cancel-order.php

Methods summary

public static WC_Order
# bkap_get_add_cancel_button( WC_Order $order, mixed $action )

This function will add cancel order button on the MY ACCOUNT page. For cancelling the order.

This function will add cancel order button on the MY ACCOUNT page. For cancelling the order.

Parameters

$order
Order Object
$action
Action performed

Returns

WC_Order
WooCommerce Order Object

Since

1.7.0

Hook

woocommerce_my_account_my_orders_actions
public static
# bkap_trash_order( string|integer $post_id )

This function frees up the booking dates and/or time for all the items in an order when the order is trashed without cancelling or refunding it.

This function frees up the booking dates and/or time for all the items in an order when the order is trashed without cancelling or refunding it.

Parameters

$post_id
Order ID whose booking needs to be trashed

Since

1.7.0

Hook

wp_trash_post
public static
# bkap_untrash_order( string|integer $post_id )

Untrash the order and restore the bookings

Untrash the order and restore the bookings

Parameters

$post_id
Order ID whose booking needs to be untrashed

Since

1.7.0

Hook

untrash_post
public static
# bkap_woocommerce_restore_bookings( string|integer $order_id, string $old_status, string $new_status )

Restore bookings once an Order is untrashed

Restore bookings once an Order is untrashed

Parameters

$order_id
Order ID
$old_status
Current Status active
$new_status
New Status to be changed

Since

1.7.0

Globals

mixed $wpdb global variable
WP_Post $post
public static array
# bkap_create_gcal_object( string|integer $order_id, array $item_details, WC_Order $order )

This function creates an event details array which contains all the details required to insert an event in Google Calendar

This function creates an event details array which contains all the details required to insert an event in Google Calendar

Parameters

$order_id
Order ID
$item_details
Order Item Details
$order
Order Object

Returns

array
$event_details Event Details for GCal mapping

Since

3.5.2
public static
# bkap_woocommerce_cancel_order( string|integer $order_id )

This function deletes booking for the products in order when the order is cancelled or refunded.

This function deletes booking for the products in order when the order is cancelled or refunded.

Parameters

$order_id
$order Order ID

Since

1.7.0

Globals

mixed $wpdb
WP_Post $post - Order

Hook

woocommerce_order_status_cancelled
woocommerce_order_status_refunded
woocommerce_order_status_failed
public static
# bkap_reallot_item( array $item_value, integer $booking_id, integer $order_id, integer $bkap_qty = null )

Re-allots the booking date and/or time for each item in the order

Re-allots the booking date and/or time for each item in the order

Parameters

$item_value
Order Item Values
$booking_id
Booking History Table ID
$order_id
Order ID
$bkap_qty
Quantity

Since

1.7.0

Globals

mixed $wpdb
WP_Post $post
public static
# reallot_global_timeslot( string $start_date, string $from_time, string $to_time, mixed $booking_settings, mixed $details, integer $qty )

Reallot the global timeslot when a booking is trashed

Reallot the global timeslot when a booking is trashed

Parameters

$start_date
Start Date
$from_time
From Time
$to_time
To Time
$booking_settings
Booking Settings
$details
Booking Details
$qty
Quantity

Since

2.3.5

Globals

mixed $wpdb
public static
# bkap_reallocate_booking_when_order_status_failed_to_processing( array $args = array() )

This will reallocate the bookings when order status changed from failed to processing,completed and on-hold.

This will reallocate the bookings when order status changed from failed to processing,completed and on-hold.

Parameters

$args
Contains Order Params.

Since

4.2.0

Globals

mixed $woocommerce

Hook

woocommerce_order_status_failed_to_processing
woocommerce_order_status_failed_to_completed
woocommerce_order_status_failed_to_on-hold
API documentation generated by ApiGen