This file contains hidden or 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 bkap_appending_additional_information_to_price( $display_price, $data ) { | |
| if ( isset( $data['total_price_calculated'] ) ) { | |
| $label = __( 'Full Payment: ', 'woocommerce-booking' ); | |
| $full_price = $label . wc_price( $data['total_price_calculated'] ) . '</br>'; | |
| $display_price = $full_price . $display_price; | |
| } |
This file contains hidden or 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 | |
| // Enabling the required option for new product. | |
| function bkap_enable_option_for_new_product( $booking_checked, $duplicate_of, $booking_settings ) { | |
| if ( '' === $booking_settings ) { // enable booking option for new product. | |
| $booking_checked = 'checked'; | |
| } | |
| return $booking_checked; |
This file contains hidden or 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
| Array | |
| ( | |
| [headers] => Requests_Utility_CaseInsensitiveDictionary Object | |
| ( | |
| [data:protected] => Array | |
| ( | |
| [server] => nginx/1.4.6 (Ubuntu) | |
| [date] => Fri, 02 Jul 2021 14:02:51 GMT | |
| [content-type] => text/html; charset=UTF-8 | |
| [vary] => Accept-Encoding |
This file contains hidden or 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 | |
| $consumer_key = 'ck_b6dab226d72e3b3da3462f9b51bc672b886f8f85'; | |
| $consumer_secret = 'cs_912b18aeedb2883a9c53f877a3c77fc7c0082fc4'; | |
| $url = rest_url( 'wp/v2/bkap-bookings/16180/' ); | |
| $url = add_query_arg( | |
| array( | |
| 'consumer_key' => $consumer_key, | |
| 'consumer_secret' => $consumer_secret | |
| ), |
This file contains hidden or 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
| function bkap_appending_additional_information_to_price( $display_price, $wp_send_json ) { | |
| $total = $wp_send_json['total_price_calculated']; | |
| $price = $wp_send_json['bkap_price_charged']; | |
| if ( $total != $price ) { | |
| $wc_price_args = bkap_common::get_currency_args(); | |
| $remaining = $total - $price; | |
| $total_label = get_option( 'bkap_total_amt_label', '' ); | |
| $total_display = $total_label . wc_price( $total, $wc_price_args ) . '<br>'; // Total Price. | |
| $remaining_label = get_option( 'bkap_remaining_amt_label', '' ); |
This file contains hidden or 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 | |
| [0] => Array | |
| ( | |
| [id] => 15586 | |
| [title] => Sunday Reopen | |
| [url] => https://localhost/rental/product/sunday-reopen-2/ | |
| [allDay] => | |
| [rrule] => Array | |
| ( |
This file contains hidden or 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
| jQuery( document ).ready(function($) { | |
| const calendarEl = document.getElementById( 'calendar' ); | |
| var cal = new FullCalendar.Calendar(calendarEl, { | |
| noEventsMessage: 'No Events', | |
| timeZone: 'Europe/London', | |
| plugins: [ 'rrule', 'dayGrid','list' ], | |
| header: {"left":"title","center":"","right":"prev,next"}, | |
| defaultView: 'listWeek', | |
| loading: function (isLoading) { | |
| bkapListing.loading( isLoading, false ) |
This file contains hidden or 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 loop_add_to_cart_args_callback( $args, $product ) { | |
| $product_id = $product->get_id(); | |
| $product_min = wc_get_product_min_limit( $product_id ); | |
| if ( $product_min ) { | |
| $args['quantity'] = $product_min; | |
| } |
This file contains hidden or 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 woocommerce_thankyou_change_order_status( $order_id ) { | |
| if ( ! $order_id ) return; | |
| $order = wc_get_order( $order_id ); | |
| if ( $order->get_status() == 'processing' ){ | |
| $order->update_status( 'pending' ); |
This file contains hidden or 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 | |
| /* | |
| * Changing the steps quantity to 2 for all the WooCommerce products | |
| */ | |
| function woocommerce_quantity_input_step_callback( $step, $product ) { | |
| $step = 2; | |
| return $step; | |
| } |