public
|
|
public
|
#
bkap_confirmations_ajax( )
Ajax Calls for the Confirmation feature.
Ajax Calls for the Confirmation feature.
Since
2.5
Hook
admin_init
|
public
|
#
confirmation_checkbox( integer $product_id )
Add a Requires Confirmation checkbox in the Booking meta box
Add a Requires Confirmation checkbox in the Booking meta box
Parameters
Since
2.5
Hook
bkap_after_purchase_wo_date
|
public
array
|
#
save_product_settings( array $booking_settings, integer $product_id )
Save the Requires Confirmation setting in Booking meta box
Save the Requires Confirmation setting in Booking meta box
Parameters
- $booking_settings
- Booking Settings for the product
- $product_id
Returns
array $booking_settings - Updated settings
Since
2.5
Hook
bkap_save_product_settings
|
public
|
#
change_button_text( string $var )
Modify the Add to cart button text for products that require confirmations
Modify the Add to cart button text for products that require confirmations
Parameters
Since
2.5
Hook
woocommerce_product_single_add_to_cart_text
|
public
boolean
|
#
bkap_cart_requires_confirmation( boolean $needs_payment, WC()->cart $cart )
Return true if the cart contains a product that requires confirmation.
In this scenario no payment is taken at Checkout
Return true if the cart contains a product that requires confirmation.
In this scenario no payment is taken at Checkout
Parameters
Returns
boolean
Since
2.5
Hook
woocommerce_cart_needs_payment
|
public
array
|
#
bkap_remove_payment_methods( array $available_gateways )
Modify Payment Gateways
Remove the existing payment gateways and add the Bookign payment gateway
when the Cart contains a product that requires confirmation.
Parameters
- $available_gateways
- Array containing all the Payment Gateways
Returns
array $available_gateways - Array containing the Payment Gateways
Since
2.5
Hook
woocommerce_available_payment_gateways
|
public
boolean
|
#
bkap_prevent_cancel( boolean $return, WC_Order $order )
Prevent Order Cancellation
Prevent Order Cancellation
Prevent WooCommerce from cancelling an order if the order contains
an item that is awaiting booking confirmation once Hold Stock limit is reached.
Parameters
Returns
boolean $return
Since
2.5
Hook
woocommerce_cancel_unpaid_order
|
public
array
|
#
bkap_my_orders_actions( array $actions, WC_Order $order )
Hide the Pay button in My Accounts
Hide the Pay button in My Accounts
Hide the Pay button in My Accounts for orders that contain
an item that's still awaiting booking confirmation.
Parameters
- $actions
- List of Actions for an order on My Account page
- $order
Returns
array $actions - List of Actions for an order on My Account page
Since
2.5
|
public
|
#
bkap_link( WC_Product $_product, WC_Product_Item $item, integer $item_id )
Display View Booking Link
Display View Booking Link
Add the View Booking Link for a given item in
WooCommerce->orders Edit Orders
Parameters
Since
2.5
Hook
woocommerce_admin_order_item_values
|
public static
|
#
bkap_save_booking_status( integer $item_id, string $_status )
Update Item status
This function updates the item booking status.
It is called from the Edit Booking page Save button click
Parameters
Since
2.5
|
public
|
#
update_booking_tables( string $_status, integer $order_id, integer $item_id, WC_Product_Item $item_value, WC_Order $order )
Update the plugin tables and GCal for booking status
for each Item ID passed
Update the plugin tables and GCal for booking status
for each Item ID passed
Parameters
- $_status
- $order_id
- $item_id
- $item_value
- $item_value - Item Details
- $order
Since
3.5
|
public
string
|
#
bkap_validate_conflicting_products( array $POST, integer $product_id )
Validate bookable products
Validate bookable products
This function displays a notice and empties the cart if the cart contains
any products that conflict with the new product being added.
Parameters
Returns
string
Since
2.5
Hook
bkap_validate_cart_products
|
public
|
#
bkap_update_booking_status( integer $order_id )
Update Booking status to paid
Update Booking status to paid
Updates the Booking status to paid to ensure they do not remain
in the Unpaid section in Booking->View Bookings
Parameters
Since
2.5
Hook
woocommerce_order_status_processing
woocommerce_order_status_on-hold
woocommerce_order_status_completed
|
public
|
#
bkap_remove_cancelled_booking( integer $item_id )
Remove an item from the order if the booking is not approved/rejected/cancelled
by the admin
Remove an item from the order if the booking is not approved/rejected/cancelled
by the admin
Parameters
Since
2.5
|