Skip to content

Commit

Permalink
v3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhmwb committed Feb 17, 2023
1 parent fb5e13d commit 9450dc6
Show file tree
Hide file tree
Showing 17 changed files with 932 additions and 379 deletions.
63 changes: 45 additions & 18 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Tags: bookings, calendar, appointments, booking calendar, scheduling, availabili
Requires at least: 5.1.0
Tested up to: 6.1.1
WC requires at least: 5.1.0
WC tested up to: 7.2.2
Stable tag: 3.0.5
WC tested up to: 7.3.0
Stable tag: 3.0.6
Requires PHP: 7.2
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -49,23 +49,34 @@ With the Appointment booking WordPress plugin, Admin managers can easily offer c
**4) Booking Listing and Sorting by Tag**
All requested WooCommerce booking plugin-based orders made by the customers are to be listed in the WooCommerce Order Listing table. Admin managers can conveniently sort the booking out of the orders using the Bookings tag available there.

**5) Ease of Structuring Bookings Calendar**
**5) Add your Bookings to Google Calendar**
With the click of a button, you can now instantly add your Booking requests utilizing our plugin-based setting option to your Google Calendar.

Isn’t this a WOW feature? It goes without saying that this enables you to take pleasure in your reservations while also keeping you informed of their status and serving as a virtual reminder of them.

**6) Ease of Structuring Bookings Calendar**
The WooCommerce Calendar Booking view allows merchants to build and analyze how their day or month is progressing. They can also make changes to current bookings or availability according to that.

**6) Offered Services & Additional Costs**
With the Free Online Booking system for WordPress, Admin managers can easily create WooCommerce booking services and additional costs using the backend settings, and also can easily display them over the checkout page as well as over the individual bookable resource page.
**7) Offered Services & Additional Costs**
With the Free Online Booking system for WordPress, Admin managers can easily create WooCommerce booking services and additional costs using the backend settings, and easily display them over the checkout page and over the individual bookable resource page.

**7) Responsive Interface**
**8) Responsive Interface**
WordPress Online Booking provides an online mobile-friendly WooCommerce easy booking interface, i.e. a responsive UI that works on a variety of devices. In short, offering ease of access for their customers for online appointment booking products.

**8) Easy Uptime Schedule Outlining**
**9) Easy Uptime Schedule Outlining**
With the help of the WooCommerce Calendar Booking, retailers can easily create and monitor their monthly bookings. Customers can also use such information to find out the start and end times of your service and easily start booking an appointment for them. Yes, retailers may now quickly specify the start and end times of the service for each day on the booking calendar. Moreover, let your clients have timetables that are simple to learn.

**9) Offer Bookings Availability Settings**
**10) Offer Bookings Availability Settings**
Admin managers may easily specify booking and scheduling for WooCommerce-based availability for the day, as well as the exact deadline for booking an appointment with WooCommerce appointments. They only need to modify the Start and End times in the WooCommerce booking Availability tab of the plugin settings area to do so.

**10) Avoid Unwanted Bookings**
Prior to a day, admin managers can easily determine the maximum amount of appointments that can be made. So that they may provide easy booking management for their items, avoid unnecessary bookings, and easily indicate unavailability with the WordPress booking plugin.
You can also mark your bookings unavailability for a day or for an upcoming event or a holiday in advance using our exclusive one-day unavailability settings.

**11) Dedicated My Bookings Tab**
Yes, our plugin has a special My Bookings Tab for managing your booking requests easily. Your website's My account section contains a link to this tab. You can easily visit there and check the information for all of your upcoming reservations.

**11) Avoid Unwanted Bookings**
Prior to a day, admin managers can easily determine the maximum amount of WooCommerce appointments that can be made. So that they may provide easy booking management for their items, avoid unnecessary bookings, and easily indicate unavailability with the WordPress booking plugin.


Visit [**Bookings for WooCommerce Documentation**](https://docs.wpswings.com/bookings-for-woocommerce/?utm_source=wpswings-bookings-doc&utm_medium=bookings-org-page&utm_campaign=bookings-doc) and learn more about the features and working of the plugin.

Expand All @@ -76,7 +87,7 @@ Visit [**Bookings for WooCommerce Documentation**](https://docs.wpswings.com/boo
* [**WooCommerce Bookings Backend Demo**](https://demo.wpswings.com/bookings-for-woocommerce-pro/get-personal-demo/?utm_source=wpswings-bookings-pro&utm_medium=bookings-org-page&utm_campaign=backend-demo)

== PLUGIN COMPATIBILITIES ==
* WooCommerce Bookings plugin is compatible with [**Return Refund and Exchange for WooCommerce**](https://wordpress.org/plugins/woo-refund-and-exchange-lite/) and [**WooCommerce RMA For Return Refund & Exchange**](https://wpswings.com/product/rma-return-refund-exchange-for-woocommerce-pro/?utm_source=wpswings-bookings-org&utm_medium=bookings-org-page&utm_campaign=rma-pro-plugin). This will help the customers in receiving the overdue reimbursement or refunds easily using the bookings plugin.
* WooCommerce Bookings plugin is compatible with [**Return Refund and Exchange for WooCommerce**](https://wordpress.org/plugins/woo-refund-and-exchange-lite/) and [**WooCommerce RMA For Return Refund & Exchange**](https://wpswings.com/product/rma-return-refund-exchange-for-woocommerce-pro/?utm_source=wpswings-bookings-org&utm_medium=bookings-org-page&utm_campaign=rma-pro-plugin). This will help the customers in receiving the overdue reimbursement or refunds easily using the WooCommerce bookings plugin.

* The Bookings for WooCommerce is compatible with WordPress Multilingual i.e. WPML plugin and Multisite.

Expand All @@ -85,32 +96,34 @@ Visit [**Bookings for WooCommerce Documentation**](https://docs.wpswings.com/boo

* Offers a different Booking List.
* You can create different People Types for your bookings.
* Provide specific status settings for paid Bookings to confirm after days.
* Provide specific status settings for paid WooCommerce Bookings to confirm after days.
* Admin can also reject Bookings after days.
* Can define maximum bookings per hour/day.
* Render setting to show/hide the Additional Booking details.
* Advance Bookings setting options.
* Admins can offer Early Bird Discounts.
* Customizable business type Templates.
* Export your Booking Order Data in a .csv format..
* Layout a distinct Booking Search page.
* Determine upcoming holidays and weeks off unavailability with ease.
* Admin can Manage Booking for registered customers from the backend.
* To change the total Booking cost, offer Global Cost Rules.
* Can offer Booking Reschedule settings.
* Enable the Booking Location feature lets you track your service location with ease..
* Opt for multiple upcoming days to mark unavailable for bookings.
* The Booking Service setup tab has a Start Time and an End Time.
* Admin can easily offer Unavailability for Bookings on Weekdays.
* Email and SMS Reminders before service avail.
* Display Unavailability/Availability using custom color codes.
* Easy Booking Social Share button available integration with Facebook.
* Admin can easily provide Booking Refunds and easy RMA plugin compatibility.
* Provide a specific Booking Policy Section likewise description tab.
* Maximum capacity of Booking for a single day
* Showing Location On Map on Single Product Page
* Date picker calendar will display availability with Green color & unavailability with Red Color at front end of the form.



== TAKE ADVANTAGE OF EXCLUSIVE FEATURES OF WOOCOMMERCE BOOKINGS PLUGIN ==

The Online Reservation Plugin i.e. Bookings for WooCommerce turns your ordinary WooCommerce store into an effective Booking plugin in a WordPress solution provider. Making use of bookings plugin features, you can create an online booking system that caters to all your customer’s requirements with ease.
The Online Reservation Plugin i.e. Bookings for WooCommerce turns your ordinary WooCommerce store into an effective booking plugin in WordPress solution provider. Making use of WooCommerce bookings plugin features, you can create an online appointment booking system that caters to all your customer’s requirements with ease.

> Note: Get [**Bookings for WooCommerce Pro**](https://wpswings.com/product/bookings-for-woocommerce-pro/?utm_source=wpswings-bookings-pro&utm_medium=bookings-org-page&utm_campaign=bookings-pro)

Expand Down Expand Up @@ -156,6 +169,8 @@ Automatic updates should work like a charm; as always though, ensure you backup
9. Product Data (People Type settings tab)
10. Product Data (Service settings tab)
11. Product Data (Availability settings tab)
12. My Booking Tab (My Account Section)
13. Add Booking to Google Calendar (My Account Tab)


== Frequently Asked Questions ==
Expand Down Expand Up @@ -205,6 +220,14 @@ Check out [**WooCommerce Bookings knowledge base**](https://support.wpswings.com

== Changelog ==

= 3.0.6 - Released on 17 February 2023 =
* New: Choose Single Upcoming Days
* New: Add Booking to Google Calendar
* New: Disable Setting For Availability by days setting
* New: My Booking Tab Added
* New: Compatible with the latest WP and WC


= 3.0.5 - Released on 23 December 2022 =
* Fix: Calendar timing issue fixed
* New: Compatible with the latest WP and WC
Expand Down Expand Up @@ -267,6 +290,10 @@ Check out [**WooCommerce Bookings knowledge base**](https://support.wpswings.com
* First version

== Upgrade Notice ==
= 3.0.5 - Released on 23 December 2022 =
* Fix: Calendar timing issue fixed
= 3.0.6 - Released on 17 February 2023 =
* New: Choose Single Upcoming Days
* New: Add Booking to Google Calendar
* New: Disable Setting For Availability by days setting
* New: My Booking Tab Added
* New: Compatible with the latest WP and WC

65 changes: 63 additions & 2 deletions admin/class-mwb-bookings-for-woocommerce-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ public function mbfw_booking_form_settings_page( $mbfw_booking_form_array ) {
*/
public function mbfw_add_availability_settings_page( $mbfw_availability_settings ) {
$mbfw_availability_settings = array(

array(
'title' => __( 'Enable availability setting', 'mwb-bookings-for-woocommerce' ),
'id' => 'mwb_mbfw_enable_availibility_setting',
'name' => 'mwb_mbfw_enable_availibility_setting',
'value' => get_option( 'mwb_mbfw_enable_availibility_setting' ),
'type' => 'radio-switch',
'description' => __( 'Enable this to apply availability setting for your product, Your Product will appear only in available time set up by you.', 'mwb-bookings-for-woocommerce' ),
),

array(
'title' => __( 'Daily Start Time', 'mwb-bookings-for-woocommerce' ),
'id' => 'mwb_mbfw_daily_start_time',
Expand Down Expand Up @@ -886,6 +896,24 @@ public function mbfw_product_data_tabs_html() {
</div>
<div id="mwb_booking_availability_data" class="panel woocommerce_options_panel show_if_mwb_booking">
<?php

$active_plugins = get_option( 'active_plugins' );
if( ! in_array( 'bookings-for-woocommerce-pro/bookings-for-woocommerce-pro.php', $active_plugins ) ) {

woocommerce_wp_text_input(
array(
'label' => __( 'Choose Upcoming Holiday to disable booking on that day', 'mwb-bookings-for-woocommerce' ),
'id' => 'mwb_mbfw_choose_holiday',
'value' => get_post_meta( get_the_ID(), 'mwb_mbfw_choose_holiday', true ),
'description' => __( 'Bookings will be unavailable on that day.', 'mwb-bookings-for-woocommerce' ),
'type' => 'text',
'desc_tip' => true,
'style' => 'width:10em;',
'custom_attributes' => array( 'autocomplete' => 'off' ),
)
);
}

/**
* Filter is for returning something.
*
Expand Down Expand Up @@ -987,8 +1015,10 @@ public function mbfw_save_custom_product_meta_boxes_data( $id, $post ) {
'mwb_mbfw_is_add_extra_services' => array_key_exists( 'mwb_mbfw_is_add_extra_services', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_is_add_extra_services'] ) ) : '',
'mwb_mbfw_maximum_booking_per_unit' => array_key_exists( 'mwb_mbfw_maximum_booking_per_unit', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_maximum_booking_per_unit'] ) ) : '',
'mwb_bfwp_order_statuses_to_cancel' => array_key_exists( 'mwb_bfwp_order_statuses_to_cancel', $_POST ) ? ( is_array( $_POST['mwb_bfwp_order_statuses_to_cancel'] ) ? map_deep( wp_unslash( $_POST['mwb_bfwp_order_statuses_to_cancel'] ), 'sanitize_text_field' ) : sanitize_text_field( wp_unslash( $_POST['mwb_bfwp_order_statuses_to_cancel'] ) ) ) : array(),
'mwb_mbfw_daily_calendar_start_time' => array_key_exists( 'mwb_mbfw_daily_calendar_start_time', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_daily_calendar_start_time'] ) ) : '',
'mwb_mbfw_daily_calendar_end_time' => array_key_exists( 'mwb_mbfw_daily_calendar_end_time', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_daily_calendar_end_time'] ) ) : '',
'mwb_mbfw_daily_calendar_start_time' => array_key_exists( 'mwb_mbfw_daily_calendar_start_time', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_daily_calendar_start_time'] ) ) : '',
'mwb_mbfw_daily_calendar_end_time' => array_key_exists( 'mwb_mbfw_daily_calendar_end_time', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_daily_calendar_end_time'] ) ) : '',
'mwb_mbfw_choose_holiday' => array_key_exists( 'mwb_mbfw_choose_holiday', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['mwb_mbfw_choose_holiday'] ) ) : '',


);

Expand Down Expand Up @@ -1702,4 +1732,35 @@ public function mwb_bfw_footer_custom_taxonomy_edit_page_callback() {
}
}

/**
* Function to set quantity
*
* @param object $cart is object.
* @return void
*/
public function wps_mbfw_change_cart_item_quantities ( $cart ) {
if ( is_admin() && ! defined( 'DOING_AJAX' ) )
return;

if ( did_action( 'woocommerce_before_calculate_totals' ) >= 2 )
return;


foreach( $cart->get_cart() as $cart_item_key => $cart_item ) {
$product_id = $cart_item['data']->get_id();
if( ! empty($product_id ) ) {
$_product = wc_get_product( $product_id );

if( 'mwb_booking' == $_product->get_type() ) {
$max_booking = get_post_meta( $product_id, 'mwb_mbfw_maximum_booking_per_unit', true );

if( ! empty( $max_booking ) && $cart_item['quantity'] > $max_booking ){
$cart->set_quantity( $cart_item_key, $max_booking );
}
}
}

}
}

}
Binary file added admin/image/banner-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed admin/image/banner-image.png
Binary file not shown.
3 changes: 3 additions & 0 deletions admin/js/mwb-admin-global-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ jQuery(document).ready(function($){
}
}
});



});
2 changes: 1 addition & 1 deletion admin/partials/mwb-bookings-for-woocommerce-overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
?>
<div class="mwb-overview__wrapper">
<div class="mwb-overview__banner">
<img src="<?php echo esc_html( MWB_BOOKINGS_FOR_WOOCOMMERCE_DIR_URL ); ?>admin/image/banner-image.png" alt="Overview banner image">
<img src="<?php echo esc_html( MWB_BOOKINGS_FOR_WOOCOMMERCE_DIR_URL ); ?>admin/image/banner-image.jpg" alt="Overview banner image">
</div>
<div class="mwb-overview__content">
<div class="mwb-overview__content-description">
Expand Down
9 changes: 8 additions & 1 deletion common/class-mwb-bookings-for-woocommerce-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ public function mwb_mbfw_show_extra_charges_in_total( $cart_object ) {
*/
$base_price = apply_filters( 'mwb_mbfw_vary_product_base_price', ( ! empty( $base_price ) ? (float) $base_price : 0 ), $custom_cart_data, $cart_object, $cart );
$unit_price = get_post_meta( $cart['product_id'], 'general_price', true );
$unit = (int)($unit_price/$new_price);
if( 0 != $unit_price)
{
$unit = (int)($unit_price/$new_price);
} else{
$unit = 0;
}

/**
* Filter is for returning something.
Expand Down Expand Up @@ -499,6 +504,7 @@ public function mbfw_booking_total_listing_single_page( $charges, $quantity, $pr
*
* @param int $product_id current product id.
* @param int $people_number number of people in the booking.
* @param int $unit is used for pricing.
* @return float
*/
public function mbfw_extra_charges_calculation( $product_id, $people_number, $unit ) {
Expand Down Expand Up @@ -528,6 +534,7 @@ public function mbfw_extra_charges_calculation( $product_id, $people_number, $un
* @param array $services_checked array containing optional services checked by user.
* @param array $service_quantity quantity array containing services and there count.
* @param int $people_number number of people.
* @param int $unit is for pricing.
* @return float
*/
public function mbfw_extra_service_charge( $product_id, $services_checked, $service_quantity, $people_number, $unit ) {
Expand Down
5 changes: 5 additions & 0 deletions common/js/mwb-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
timepicker : false,
minDate : mwb_mbfw_common_obj.minDate,
});
$('#mwb_mbfw_choose_holiday').datepicker({
dateFormat : 'dd-mm-yy',
minDate: mwb_mbfw_common_obj.minDate,

});
$('.mwb_mbfw_time_picker_frontend').datetimepicker({
format : 'H:i',
datepicker : false,
Expand Down
12 changes: 10 additions & 2 deletions 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.5';
$this->version = '3.0.6';
}

$this->plugin_name = 'bookings-for-woocommerce';
Expand Down Expand Up @@ -244,6 +244,8 @@ private function mwb_bookings_for_woocommerce_admin_hooks() {
$this->loader->add_action( 'pre_get_posts', $mbfw_plugin_admin, 'mbfw_vary_query_to_list_only_booking_types' );
$this->loader->add_action( 'woocommerce_hidden_order_itemmeta', $mbfw_plugin_admin, 'mbfw_hide_order_item_meta_data' );
$this->loader->add_filter( 'woocommerce_order_item_display_meta_key', $mbfw_plugin_admin, 'mbfw_change_line_item_meta_key_order_edit_page', 10, 3 );
$this->loader->add_action('woocommerce_before_calculate_totals', $mbfw_plugin_admin, 'wps_mbfw_change_cart_item_quantities', 20, 1 );

}
$this->loader->add_action( 'wp_ajax_mwb_mbfw_get_all_events_date', $mbfw_plugin_admin, 'mwb_mbfw_get_all_events_date' );
}
Expand Down Expand Up @@ -302,7 +304,13 @@ private function mwb_bookings_for_woocommerce_public_hooks() {
$this->loader->add_action( 'mwb_mbfw_add_calender_or_time_selector_for_booking', $mbfw_plugin_public, 'mwb_mbfw_show_date_time_selector_on_single_product_page', 10, 2 );
$this->loader->add_filter( 'woocommerce_quantity_input_args', $mbfw_plugin_public, 'mwb_mbfw_set_max_quantity_to_be_booked_by_individual', 10, 2 );
$this->loader->add_action('mwb_booking_before_add_to_cart_button', $mbfw_plugin_public, 'mwb_mbfw_show_location_on_map', 10, 1 );

$this->loader->add_action( 'init', $mbfw_plugin_public, 'wps_my_bookings_register_endpoint' );
// Add query variable.
$this->loader->add_action( 'query_vars', $mbfw_plugin_public, 'wps_mybookings_endpoint_query_var', 0 );
// Inserting custom My Event tab.
$this->loader->add_action( 'woocommerce_account_menu_items', $mbfw_plugin_public, 'wps_bookings_add_mybookings_tab',1,1 );
// Populate mmbership details tab.
$this->loader->add_action( 'woocommerce_account_wps-mybookings-tab_endpoint', $mbfw_plugin_public, 'wps_mybookings_populate_tab' );
}
}

Expand Down
Binary file modified languages/mwb-bookings-for-woocommerce-en_US.mo
Binary file not shown.
Loading

0 comments on commit 9450dc6

Please sign in to comment.