This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function will not ignore the Advance Booking Period settings on Backend. | |
*/ | |
function bkap_advance_booking_period_callback( $abp ) { | |
return is_admin() ? 0 : $abp; | |
} | |
add_filter( 'bkap_advance_booking_period', 'bkap_advance_booking_period_callback', 10, 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function consider the booking price as 0 for the particular product. | |
*/ | |
function bkap_modify_booking_price_to_zero( $time_slot_price, $product_id, $variation_id, $product_type ) { | |
$products_to_consider_price_as_zero = array( '18290', '1234' ); | |
if ( in_array( $product_id, $products_to_consider_price_as_zero ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'bkap_booking', // Replace with your actual custom post type | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
'key' => '_bkap_product_id', | |
'value' => '123', | |
'compare' => '=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add booking fee to price on product page. | |
* | |
* @param string $total_price Booking Price. | |
*/ | |
function bkap_additional_booking_price( $total_price ) { | |
// Here you can add additional condition according to business requirements. | |
// This will add 15 to booking price for all the bookable product on the store. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Tyche Softwares: addon they gave me July 2022 to add an email column to the View Bookings page */ | |
/* Adding Column on View Bookings */ | |
function bkap_view_booking_columns( $columns ) { | |
$additional_columns = array( 'bkap_customer_email' => __( 'Email Address', 'woocommerce-booking' ) ); | |
// Adding column after Booked by hence 5. | |
$columns = array_slice( $columns, 0, 5, true ) + $additional_columns + array_slice( $columns, 5, count( $columns ) - 5, true ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Adding Column on View Bookings */ | |
function bkap_view_booking_columns( $columns ) { | |
$additional_columns = array( 'bkap_invoice' => __( 'Invoice', 'woocommerce-booking' ), 'bkap_delivery' => __( 'Delivery', 'woocommerce-booking' ), 'bkap_customer_address' => __( 'Customer Address', 'woocommerce-booking' ) ); | |
// Adding column after Booked by hence 5. | |
$columns = array_slice( $columns, 0, 5, true ) + $additional_columns + array_slice( $columns, 5, count( $columns ) - 5, true ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dequeue_jquery_scripts() { | |
wp_dequeue_script( 'jquery' ); | |
wp_dequeue_script( 'jquery-ui' ); | |
wp_dequeue_script( 'jquery-ui-datepicker' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'dequeue_jquery_scripts', 100 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'bkap_final_price_json_data', 'custom_changes', 10, 3 ); | |
function custom_changes( $wp_send_json, $product_id, $price ) { | |
$wp_send_json['bkap_price'] = $wp_send_json['bkap_price'] . ' ' . __( '20% off for selected period', 'woocommerce-booking' ); | |
return $wp_send_json; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Adding the custom infromation in the cart item */ | |
function add_custom_info_to_cart_item( $cart_item_meta, $product_id ) { | |
$cart_item_meta['custom_information'] = 'This is my <strong>custom</strong> information.<br> Please contact support for more information'; | |
return $cart_item_meta; | |
} | |
add_filter( 'woocommerce_add_cart_item_data', 'add_custom_info_to_cart_item', 25, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Zoom OAuth Demo | |
* Plugin URI: http://www.tychesoftwares.com/ | |
* Description: This plugin is for showing the demo for Zoom Connection via OAuth. | |
* Version: 1.0 | |
* Author: Tyche Softwares | |
* Author URI: http://www.tychesoftwares.com/ | |
* Text Domain: zoom-oauth-remo | |
* Domain Path: /i18n/languages/ |
NewerOlder