Plugin Directory

Changeset 3728890


Ignore:
Timestamp:
10/05/2026 12:41:06 PM (3 weeks ago)
Author:
salesigniter
Message:

1.0.14: variable, composite and bundle rentals load their booking calendar again on sites with script debugging off

Location:
sales-igniter-rentals-bookings-lite/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sales-igniter-rentals-bookings-lite/trunk/Assets/public/js/bundle.min.js

    r3728745 r3728890  
    1 var f=Object.defineProperty;var g=(u,n,o)=>n in u?f(u,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):u[n]=o;var l=(u,n,o)=>g(u,typeof n!="symbol"?n+"":n,o);(function(u,n,o,s){class b{constructor(e,i){l(this,"init",()=>{u(this.bundle_data).on("woocommerce-product-bundle-initialized",this.updateInventory),u(this.bundle_data).on("woocommerce-product-bundle-update",this.updateInventory)});l(this,"updateInventory",()=>{if(!(!n.sibooking||!n.sibooking.data||!n.sibooking.data.ajaxurl)){var e=this,i=function(){n.SibookingSelection&&(e.selection||(e.selection=new n.SibookingSelection("bundle",e.source())),e.selection.update())};n.SibookingSelection?i():u(i)}});this.bundle=e,this.bundle_data=i,this.selection=null,this.init()}items(){var e=this.bundle.bundled_items||{};return Object.keys(e).map(function(i){return e[i]})}source(){var e=this,i=this.bundle,c=function(r){var t=i.price_data&&i.price_data.quantities?i.price_data.quantities[r.bundled_item_id]:s;return t===s||t===null?null:parseInt(t,10)||0};return{id:i.bundle_id,parts:function(){var r=[];return e.items().forEach(function(t){var a=c(t);if(a>0){var _=parseInt(t.get_variation_id(),10);r.push({product_id:parseInt(t.get_product_id(),10),variation_id:_>0?_:0,quantity:a,title:t.get_title(!0)||t.get_product_title(!0)})}}),r},pending:function(){var r=[];return e.items().forEach(function(t){var a=c(t);if(a===null){r.push(t.get_title(!0)||t.get_product_title(!0));return}a>0&&t.is_variable_product_type()&&!(parseInt(t.get_variation_id(),10)>0)&&r.push(t.get_title(!0)||t.get_product_title(!0))}),r},$quantity:function(){return i.$bundle_quantity&&i.$bundle_quantity.length?i.$bundle_quantity.first():u(e.bundle_data).find(".bundle_button input.qty").first()}}}}const d=u(".bundle_form .bundle_data");d.length>0&&d.on("woocommerce-product-bundle-initializing",function(p,e){n.siBookingBundle=new b(e,d)})})(jQuery,window,document);
     1(function(r,u,b,d){class c{constructor(n,e){this.bundle=n,this.bundle_data=e,this.selection=null,this.init()}init=()=>{r(this.bundle_data).on("woocommerce-product-bundle-initialized",this.updateInventory),r(this.bundle_data).on("woocommerce-product-bundle-update",this.updateInventory)};items(){var n=this.bundle.bundled_items||{};return Object.keys(n).map(function(e){return n[e]})}source(){var n=this,e=this.bundle,l=function(i){var t=e.price_data&&e.price_data.quantities?e.price_data.quantities[i.bundled_item_id]:d;return t===d||t===null?null:parseInt(t,10)||0};return{id:e.bundle_id,parts:function(){var i=[];return n.items().forEach(function(t){var o=l(t);if(o>0){var s=parseInt(t.get_variation_id(),10);i.push({product_id:parseInt(t.get_product_id(),10),variation_id:s>0?s:0,quantity:o,title:t.get_title(!0)||t.get_product_title(!0)})}}),i},pending:function(){var i=[];return n.items().forEach(function(t){var o=l(t);if(o===null){i.push(t.get_title(!0)||t.get_product_title(!0));return}o>0&&t.is_variable_product_type()&&!(parseInt(t.get_variation_id(),10)>0)&&i.push(t.get_title(!0)||t.get_product_title(!0))}),i},$quantity:function(){return e.$bundle_quantity&&e.$bundle_quantity.length?e.$bundle_quantity.first():r(n.bundle_data).find(".bundle_button input.qty").first()}}}updateInventory=()=>{if(!(!u.sibooking||!u.sibooking.data||!u.sibooking.data.ajaxurl)){var n=this,e=function(){u.SibookingSelection&&(n.selection||(n.selection=new u.SibookingSelection("bundle",n.source())),n.selection.update())};u.SibookingSelection?e():r(e)}}}const a=r(".bundle_form .bundle_data");a.length>0&&a.on("woocommerce-product-bundle-initializing",function(_,n){u.siBookingBundle=new c(n,a)})})(jQuery,window,document);
  • sales-igniter-rentals-bookings-lite/trunk/Assets/public/js/composite.min.js

    r3728745 r3728890  
    1 var p=Object.defineProperty;var l=(o,i,a)=>i in o?p(o,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[i]=a;var u=(o,i,a)=>l(o,typeof i!="symbol"?i+"":i,a);(function(o,i,a,f){class d{constructor(t){u(this,"init",()=>{var t=this.composite.actions;t.add_action("composite_initialized",this.updateInventory,100,this),t.add_action("component_selection_changed",this.updateInventory,100,this),t.add_action("component_quantity_changed",this.updateInventory,100,this),t.add_action("component_selection_details_updated",this.updateInventory,100,this),t.add_action("composite_validation_status_changed",this.updateInventory,100,this)});this.composite=t,this.selection=null,this.init()}source(){var t=this.composite;return{id:t.composite_id,parts:function(){var n=[];return t.get_components().forEach(function(e){var s=parseInt(e.get_selected_product(!1),10),r=parseInt(e.get_selected_quantity(),10);if(!(!(s>0)||!(r>0))){var c=parseInt(e.get_selected_variation(!1),10);n.push({product_id:s,variation_id:c>0?c:0,quantity:r,title:e.get_title()})}}),n},pending:function(){var n=[];return t.get_components().forEach(function(e){var s=parseInt(e.get_selected_product(!1),10),r=s>0;if(!r){e.is_optional()||n.push(e.get_title());return}e.get_selected_product_type()==="variable"&&!(parseInt(e.get_selected_variation(!1),10)>0)&&n.push(e.get_title())}),n},$quantity:function(){var n=t.$composite_form||o(t.$composite_data).closest("form"),e=n.find('.composite_button input[name="quantity"]').first();return e.length?e:n.find('input.qty[name="quantity"]').first()}}}updateInventory(){if(!(!i.sibooking||!i.sibooking.data||!i.sibooking.data.ajaxurl)){var t=this,n=function(){i.SibookingSelection&&(t.selection||(t.selection=new i.SibookingSelection("composite",t.source())),t.selection.update())};i.SibookingSelection?n():o(n)}}}o(a).on("wc-composite-initializing",".composite_data",function(_,t){i.siBookingComposite=new d(t)})})(jQuery,window,document);
     1(function(s,n,c,_){class u{constructor(t){this.composite=t,this.selection=null,this.init()}init=()=>{var t=this.composite.actions;t.add_action("composite_initialized",this.updateInventory,100,this),t.add_action("component_selection_changed",this.updateInventory,100,this),t.add_action("component_quantity_changed",this.updateInventory,100,this),t.add_action("component_selection_details_updated",this.updateInventory,100,this),t.add_action("composite_validation_status_changed",this.updateInventory,100,this)};source(){var t=this.composite;return{id:t.composite_id,parts:function(){var e=[];return t.get_components().forEach(function(i){var o=parseInt(i.get_selected_product(!1),10),a=parseInt(i.get_selected_quantity(),10);if(!(!(o>0)||!(a>0))){var r=parseInt(i.get_selected_variation(!1),10);e.push({product_id:o,variation_id:r>0?r:0,quantity:a,title:i.get_title()})}}),e},pending:function(){var e=[];return t.get_components().forEach(function(i){var o=parseInt(i.get_selected_product(!1),10),a=o>0;if(!a){i.is_optional()||e.push(i.get_title());return}i.get_selected_product_type()==="variable"&&!(parseInt(i.get_selected_variation(!1),10)>0)&&e.push(i.get_title())}),e},$quantity:function(){var e=t.$composite_form||s(t.$composite_data).closest("form"),i=e.find('.composite_button input[name="quantity"]').first();return i.length?i:e.find('input.qty[name="quantity"]').first()}}}updateInventory(){if(!(!n.sibooking||!n.sibooking.data||!n.sibooking.data.ajaxurl)){var t=this,e=function(){n.SibookingSelection&&(t.selection||(t.selection=new n.SibookingSelection("composite",t.source())),t.selection.update())};n.SibookingSelection?e():s(e)}}}s(c).on("wc-composite-initializing",".composite_data",function(d,t){n.siBookingComposite=new u(t)})})(jQuery,window,document);
  • sales-igniter-rentals-bookings-lite/trunk/Assets/public/js/variation.min.js

    r3728745 r3728890  
    1 var b=Object.defineProperty;var p=(e,i,o)=>i in e?b(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o;var f=(e,i,o)=>p(e,typeof i!="symbol"?i+"":i,o);(function(e,i,o,v){var g=i.wp&&i.wp.i18n?i.wp.i18n:{__:function(s){return s},_n:function(s,t,a){return a===1?s:t},sprintf:function(s){return s}},u=g.__;class h{constructor(){f(this,"init",()=>{var t=this;if(this.$gate.length){e(o).on("change",'input.variation_id, input[name="variation_id"]',function(){var r=e(this).closest("form");r.length&&!r.find(t.$gate).length||t.chosen(String(e(this).val()||""))});var a=String(this.$input().val()||"");a&&this.chosen(a)}});f(this,"updateInventory",()=>{var t=this;if(!(!i.sibooking||!i.sibooking.data||!i.sibooking.data.ajaxurl)){var a=String(this.$input().val()||"");if(!a){this.chosen("");return}this.abort(),this.setState("loading");var r={action:"sibooking_calendar",variationid:a},d=function(c){r.nonce=i.sibooking.data.nonce;var l=e.ajax({url:i.sibooking.data.ajaxurl,type:"POST",data:r});t.loading=l,l.done(function(n){if(t.loading===l){if(t.loading=null,!n||!n.success||!n.data){t.failed();return}i.sibooking.data=n.data,t.loadedFor=a,t.applied()}}).fail(function(n){if(!(t.loading!==l||n&&n.statusText==="abort")){if(t.loading=null,c&&i.sibAjax&&i.sibAjax.isNonceFailure(n)){i.sibAjax.renewNonce().then(function(){d(!1)},function(){t.failed()});return}t.failed()}})};d(!0)}});this.$gate=e('.sib-options-gate[data-sib-for="variation"]').first(),this.state=this.$gate.attr("data-sib-gate")||"",this.loading=null,this.loadedFor="",this.init()}$input(){var t=this.$gate.closest("form.variations_form");return(t.length?t:e("form.variations_form").first()).find('input[name="variation_id"], input.variation_id').first()}setState(t){this.state=t,this.$gate.length&&this.$gate.attr("data-sib-gate",t),e(o.body).trigger("sibooking_variation_state",[t])}chosen(t){if(!t||t==="0"){this.abort(),this.loadedFor="",this.forgetQuote(),this.setState("choose");return}this.updateInventory()}abort(){this.loading&&this.loading.abort&&this.loading.abort(),this.loading=null}forgetQuote(){var t=i.SibookingCalendar;t&&(t._priceKey="",typeof t.showCardTotal=="function"&&t.showCardTotal(null),typeof t.hideQuote=="function"&&t.hideQuote())}applied(){this.setState("ready");var t=i.SibookingCalendar;if(!(!t||typeof t.updateDisabledDatesAll!="function")){typeof t.say=="function"&&t.say("");var a=typeof t.startDate=="function"?t.startDate():null,r=typeof t.endDate=="function"?t.endDate():null;if(t.updateDisabledDatesAll(),a&&typeof t.rangeStillFree=="function"&&!t.rangeStillFree(a,r||a)){t.clearStartEndDate(),t.say(u("This option is not available on your dates. Please pick your dates again.","sales-igniter-rentals-bookings-lite"));return}t._priceKey="",t.onCloseEnd()}}failed(){this.setState("error");var t=u("The availability for this option could not be loaded. Please try again.","sales-igniter-rentals-bookings-lite"),a=this.$gate.find(".sib-options-error");this.$gate.length?(a.length||(a=e('<p class="sib-options-error" role="alert"></p>'),this.$gate.find(".sib-options-loading").after(a)),a.text(t)):i.SibookingCalendar&&i.SibookingCalendar.tell&&i.SibookingCalendar.tell(t)}}typeof wc_add_to_cart_variation_params!="undefined"&&e(function(){i.SibookingVariation=new h})})(jQuery,window,document);
     1(function(e,i,l,c){var d=i.wp&&i.wp.i18n?i.wp.i18n:{__:function(r){return r},_n:function(r,t,a){return a===1?r:t},sprintf:function(r){return r}},f=d.__;class g{constructor(){this.$gate=e('.sib-options-gate[data-sib-for="variation"]').first(),this.state=this.$gate.attr("data-sib-gate")||"",this.loading=null,this.loadedFor="",this.init()}$input(){var t=this.$gate.closest("form.variations_form");return(t.length?t:e("form.variations_form").first()).find('input[name="variation_id"], input.variation_id').first()}init=()=>{var t=this;if(this.$gate.length){e(l).on("change",'input.variation_id, input[name="variation_id"]',function(){var o=e(this).closest("form");o.length&&!o.find(t.$gate).length||t.chosen(String(e(this).val()||""))});var a=String(this.$input().val()||"");a&&this.chosen(a)}};setState(t){this.state=t,this.$gate.length&&this.$gate.attr("data-sib-gate",t),e(l.body).trigger("sibooking_variation_state",[t])}chosen(t){if(!t||t==="0"){this.abort(),this.loadedFor="",this.forgetQuote(),this.setState("choose");return}this.updateInventory()}abort(){this.loading&&this.loading.abort&&this.loading.abort(),this.loading=null}forgetQuote(){var t=i.SibookingCalendar;t&&(t._priceKey="",typeof t.showCardTotal=="function"&&t.showCardTotal(null),typeof t.hideQuote=="function"&&t.hideQuote())}updateInventory=()=>{var t=this;if(!(!i.sibooking||!i.sibooking.data||!i.sibooking.data.ajaxurl)){var a=String(this.$input().val()||"");if(!a){this.chosen("");return}this.abort(),this.setState("loading");var o={action:"sibooking_calendar",variationid:a},u=function(h){o.nonce=i.sibooking.data.nonce;var s=e.ajax({url:i.sibooking.data.ajaxurl,type:"POST",data:o});t.loading=s,s.done(function(n){if(t.loading===s){if(t.loading=null,!n||!n.success||!n.data){t.failed();return}i.sibooking.data=n.data,t.loadedFor=a,t.applied()}}).fail(function(n){if(!(t.loading!==s||n&&n.statusText==="abort")){if(t.loading=null,h&&i.sibAjax&&i.sibAjax.isNonceFailure(n)){i.sibAjax.renewNonce().then(function(){u(!1)},function(){t.failed()});return}t.failed()}})};u(!0)}};applied(){this.setState("ready");var t=i.SibookingCalendar;if(!(!t||typeof t.updateDisabledDatesAll!="function")){typeof t.say=="function"&&t.say("");var a=typeof t.startDate=="function"?t.startDate():null,o=typeof t.endDate=="function"?t.endDate():null;if(t.updateDisabledDatesAll(),a&&typeof t.rangeStillFree=="function"&&!t.rangeStillFree(a,o||a)){t.clearStartEndDate(),t.say(f("This option is not available on your dates. Please pick your dates again.","sales-igniter-rentals-bookings-lite"));return}t._priceKey="",t.onCloseEnd()}}failed(){this.setState("error");var t=f("The availability for this option could not be loaded. Please try again.","sales-igniter-rentals-bookings-lite"),a=this.$gate.find(".sib-options-error");this.$gate.length?(a.length||(a=e('<p class="sib-options-error" role="alert"></p>'),this.$gate.find(".sib-options-loading").after(a)),a.text(t)):i.SibookingCalendar&&i.SibookingCalendar.tell&&i.SibookingCalendar.tell(t)}}typeof wc_add_to_cart_variation_params!="undefined"&&e(function(){i.SibookingVariation=new g})})(jQuery,window,document);
  • sales-igniter-rentals-bookings-lite/trunk/bootstrap.php

    r3728745 r3728890  
    2323 */
    2424define( 'SIBOOKING_URL', plugin_dir_url( __FILE__ ) );
    25 define( 'SIBOOKING_VERSION', '1.0.13' );
     25define( 'SIBOOKING_VERSION', '1.0.14' );
    2626/**
    2727 * The add-on contract's version (Sibooking\Api, review ARCH-01). Raised only when a method
  • sales-igniter-rentals-bookings-lite/trunk/composer.json

    r3728745 r3728890  
    99    "spatie/icalendar-generator": "^2.5"
    1010  },
    11   "version": "1.0.13",
     11  "version": "1.0.14",
    1212  "autoload": {
    1313    "psr-4": {
  • sales-igniter-rentals-bookings-lite/trunk/readme.txt

    r3728745 r3728890  
    55Tested up to: 7.1
    66Requires PHP: 8.1
    7 Stable tag: 1.0.13
     7Stable tag: 1.0.14
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    179179== Changelog ==
    180180
    181 = 1.0.13 =
    182 * Unified pricing engine (some rental prices change; Settings > Advanced has a legacy pricing switch), one date picker for grouped rentals, Shop Managers can run rentals, faster product pages, and calendar, cart and order-editor fixes. [Full changelog](https://rentalbookingsoftware.com/docs/changelog/)
     181= 1.0.14 =
     182* Fixed: variable, composite and bundle rentals: the booking calendar loads again on sites with script debugging off (1.0.13). [Full changelog](https://rentalbookingsoftware.com/docs/lite-changelog/)
    183183
    184184== Upgrade Notice ==
    185185
     186= 1.0.14 =
     187Fixes the booking calendar of variable, composite and bundle rentals on sites with script debugging off (1.0.13). Updating from 1.0.12 or older: unified pricing changes some rental prices (Settings > Advanced has a legacy pricing switch).
     188
    186189= 1.0.13 =
    187190Unified pricing: some rental prices change (Settings > Advanced has a legacy pricing switch). Also: grouped products of rentals, Shop Managers can run rentals, faster product pages, a same-day return setting, safer price and availability checks.
  • sales-igniter-rentals-bookings-lite/trunk/sales-igniter-rentals-bookings-lite.php

    r3728745 r3728890  
    1010 * Plugin URI:        https://rentalbookingsoftware.com/free-woocommerce-rental-booking-plugin/
    1111 * Description:       Rent out products by date or by date and time from your WooCommerce store: availability calendar, quantity-based inventory, daily and hourly pricing, store rules and a bookings admin.
    12  * Version:           1.0.13
     12 * Version:           1.0.14
    1313 * Author:            Sales Igniter
    1414 * Author URI:        https://rentalbookingsoftware.com
Note: See TracChangeset for help on using the changeset viewer.