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_Product_Resource
  • Class_Bkap_Product_Resource

Class Class_Bkap_Product_Resource

Class_Bkap_Product_Resource class.

Package: BKAP\Resources
Author: Tyche Softwares
Since: 4.6.0
Class: Class_Bkap_Product_Resource
Located at includes/class-bkap-product-resource.php

Methods summary

public
# __construct( integer $product_id = 0 )

Constructor. Reference to the Resource.

Constructor. Reference to the Resource.

Parameters

$product_id
Product ID.

Since

4.6.0
public string
# woocommerce_product_add_to_cart_url_callback( string $link, Object $product )

This function is to change the href link of Add to cart button on Shop page

This function is to change the href link of Add to cart button on Shop page

Parameters

$link
  • DATA in $_POST
$product
  • WP Post Product

Returns

string
$link - href attribute value

Since

4.8.0

Hook

woocommerce_product_add_to_cart_url
public string
# woocommerce_loop_add_to_cart_link_callback( string $link, Object $product, $args )

This function is to change the href link of Add to cart button on Shop page

This function is to change the href link of Add to cart button on Shop page

Parameters

$link
  • DATA in $_POST
$product
$this_p - WP Post Product
$args

Returns

string
$link - href attribute value

Since

4.8.0

Hook

woocommerce_product_add_to_cart_url
public static array
# bkap_resource_add_to_cart_validation_callback( array $post_data, integer $post_id, array $booking_settings, string $quantity_check_pass, array $resource_validation_result )

This function is to validate the availability of resource on add to cart button action

This function is to validate the availability of resource on add to cart button action

Parameters

$post_data
  • DATA in $_POST
$post_id
  • Product ID
$booking_settings
  • Booking Settings
$quantity_check_pass
  • Valid values: yes, no
$resource_validation_result

Returns

array
$resource_validation_result - Validation results

Since

4.7.0

Hook

bkap_resource_add_to_cart_validation
public static
# bkap_resource_css_file( )

This function is to dequeue CSS of WooCommerce Bookings to overcome conflict Later this will be removed with appropriate solution

This function is to dequeue CSS of WooCommerce Bookings to overcome conflict Later this will be removed with appropriate solution

Since

4.6.0

Hook

admin_enqueue_scripts
public static array
# bkap_locked_dates_for_dateandtime_callback( integer $resource_id, integer $product_id, array $booking_settings, array $resource_lockout_data )

This function is used to alter the lockout date for date and time product

This function is used to alter the lockout date for date and time product

Parameters

$resource_id
  • Resource ID
$product_id
  • Product ID
$booking_settings
  • Booking Settings
$resource_lockout_data
  • Lockout Data

Returns

array
$resource_lockout_data - Blocked Dates for the resource

Since

4.6.0

Hook

bkap_locked_dates_for_dateandtime
public static array
# print_hidden_resource_data( array $additional_data, array $booking_settings, integer $product_id )

This function is used to add availability and quantity data in the additional data array being passed in the localized script. resource field.

This function is used to add availability and quantity data in the additional data array being passed in the localized script. resource field.

Parameters

$additional_data
  • Additional Data
$booking_settings
  • Booking Settings
$product_id
  • Product ID

Returns

array
$additional_data - Updated Additional Data

Since

4.6.0

Hook

bkap_add_additional_data
public static
# bkap_add_additional_resource_data( $additional_data, $booking_settings, $product_id )

This function is used to add availability and quantity data in the additional data array being passed in the localized script. resource field.

This function is used to add availability and quantity data in the additional data array being passed in the localized script. resource field.

Parameters

$additional_data
Additional Data
$booking_settings
Booking Settings
$product_id
Product ID

Since

4.6.0
public static
# bkap_front_end_resource_field( integer $product_id )

This function is used to create resource field. in the Booking form.

This function is used to create resource field. in the Booking form.

Parameters

$product_id
Product ID

Since

4.6.0

Hook

bkap_before_booking_form
public static
# bkap_get_extra_options( )

This function is used to create resource field.

This function is used to create resource field.

Since

4.6.0
public static
# bkap_add_resource_section_callback( integer $product_id )

This function is used to add resource option on Booking meta box header in Add/Edit Product page.

This function is used to add resource option on Booking meta box header in Add/Edit Product page.

Parameters

$product_id
Product ID

Since

4.6.0
public static array
# save_product_settings( array $booking_settings, integer $product_id )

This function is used to save the resources for added for the product.

This function is used to save the resources for added for the product.

Parameters

$booking_settings
  • Booking Setting Array
$product_id
  • Product ID

Returns

array
$booking_settings - Booking Settings

Since

4.6.0
public
# bkap_load_resource_ajax_admin( )

Ajax loads

Ajax loads

Since

4.6.0

Hook

admin_init
public static
# bkap_delete_resource( )

Deleting the resource

Deleting the resource

Since

4.6.0
public static
# bkap_add_resource( )

Save the resource

Save the resource

Since

4.6.0
public static
# bkap_resource_tab( integer $product_id )

Adds the resources tab in Add/Edit Product page

Adds the resources tab in Add/Edit Product page

Parameters

$product_id
  • Product ID

Since

4.6.0

Hook

bkap_add_tabs
public static
# bkap_resource_settings( integer $product_id )

Loads the content in the Resources tab in Add/Edit product page.

Loads the content in the Resources tab in Add/Edit product page.

Parameters

$product_id
  • Product ID

Since

4.6.0

Hook

bkap_after_listing_enabled
public static array
# bkap_get_resource_ids( )

Get ids of bkap_resource post.

Get ids of bkap_resource post.

Returns

array

Since

4.6.0
public static array
# bkap_get_all_resources( )

Get all resource posts.

Get all resource posts.

Returns

array

Since

4.6.0
public static array
# bkap_get_product_resources( integer $product_id )

Get resources added for product.

Get resources added for product.

Parameters

$product_id
  • Product ID

Returns

array

Since

4.6.0
public static array
# bkap_get_resource_costs( integer $product_id )

Get resources costs for product.

Get resources costs for product.

Parameters

$product_id
  • Product ID

Returns

array

Since

4.6.0
public static string
# bkap_get_resource_label( integer $product_id )

Get resource lable.

Get resource lable.

Parameters

$product_id
  • Product ID

Returns

string

Since

4.6.0
public static string
# bkap_product_resource_selection( integer $product_id )

Get selected type of resource.

Get selected type of resource.

Parameters

$product_id
  • Product ID

Returns

string

Since

4.6.0
public static string
# bkap_resource( integer $product_id )

Get resource option.

Get resource option.

Parameters

$product_id
  • Product ID

Returns

string

Since

4.6.0
public static boolean
# bkap_resource_status( integer $product_id )

Get status of resource whether the product has resource enable and any resources are added to it or not.

Get status of resource whether the product has resource enable and any resources are added to it or not.

Parameters

$product_id
  • Product ID

Returns

boolean
true if resource is enabled and have atleast one resource else false

Since

4.8.0
API documentation generated by ApiGen