Skip to content

Commit

Permalink
version 3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhmwb committed Apr 27, 2023
1 parent b86b2d5 commit babe6d9
Show file tree
Hide file tree
Showing 13 changed files with 446 additions and 383 deletions.
13 changes: 12 additions & 1 deletion admin/class-mwb-bookings-for-woocommerce-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ public function mbfw_admin_general_settings_page( $mbfw_settings_general ) {
'class' => 'mwb_mbfw_is_booking_enable',
'name' => 'mwb_mbfw_is_booking_enable',
),
array(
'title' => __( 'Disable book now button on empty form', 'mwb-bookings-for-woocommerce' ),
'type' => 'radio-switch',
'description' => __( 'Disable book now button if dates are not choosen on calendar .', 'mwb-bookings-for-woocommerce' ),
'id' => 'mwb_mbfw_disable_book_now',
'value' => get_option( 'mwb_mbfw_disable_book_now' ),
'class' => 'mwb_mbfw_disable_book_now',
'name' => 'mwb_mbfw_disable_book_now',
),

);
$mbfw_settings_general =
Expand Down Expand Up @@ -849,7 +858,9 @@ public function mbfw_product_data_tabs_html() {
'description' => __( 'Minimum Number of People Per Booking', 'mwb-bookings-for-woocommerce' ),
'desc_tip' => true,
'style' => 'width:10em;',
'custom_attributes' => array( 'min' => 0 ),
'custom_attributes' => array( 'min' => 0, 'class' => 'hide_if_bfwp_active' ),


)
);
woocommerce_wp_text_input(
Expand Down
Binary file added admin/image/YouTube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/image/YouTube_32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions common/class-mwb-bookings-for-woocommerce-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ public function mbfw_retrieve_booking_total_single_page() {
$unit = $unit_timestamp / 3600;

}
$wps_bfwp_msg = apply_filters( 'wps_mbfw_check_availablity', $product_id, $date_time_from, $date_time_to );
if( 'fail' == $wps_bfwp_msg ) {
echo 'fail';
wp_die();
}
$services_cost = $this->mbfw_extra_service_charge( $product_id, $services_checked, $service_quantity, $people_number, $unit );
$extra_charges = $this->mbfw_extra_charges_calculation( $product_id, $people_number, $unit );
$product_price = get_post_meta( $product_id, '_price', true );
Expand Down
9 changes: 8 additions & 1 deletion common/js/mwb-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ function retrieve_booking_total_ajax( form_data ) {
processData : false,
contentType : false,
success : function( msg ) {
$('.mwb-mbfw-total-area').html(msg);
if( 'fail' == msg ) {
alert( 'It looks like some dates are not available in between the dates choosen by you! , please select available dates!' );
$('#mwb-mbfw-booking-from-time').val('');
$('#mwb-mbfw-booking-to-time').val('');
} else {

$('.mwb-mbfw-total-area').html(msg);
}
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-mwb-bookings-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct() {
$this->version = MWB_BOOKINGS_FOR_WOOCOMMERCE_VERSION;
} else {

$this->version = '3.0.7';
$this->version = '3.0.8';
}

$this->plugin_name = 'bookings-for-woocommerce';
Expand Down
Binary file modified languages/mwb-bookings-for-woocommerce-en_US.mo
Binary file not shown.
Loading

0 comments on commit babe6d9

Please sign in to comment.