Plugin Directory

Changeset 3813489


Ignore:
Timestamp:
11/20/2026 10:56:07 AM (4 days ago)
Author:
gogetthemes
Message:

1.0.28 — Fix booking map on the frontend

Restore missing pickyShowPaymentReturnNotice so the floor plan script can initialize.

Location:
pickybooking/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • pickybooking/trunk/CHANGELOG.md

    r3813280 r3813489  
    11# Changelog
     2
     3## 1.0.28
     4
     5Fix frontend map crash from a missing pickyShowPaymentReturnNotice call so the booking canvas initializes.
    26
    37## 1.0.27
  • pickybooking/trunk/frontend/js/picky-frontend.js

    r3813280 r3813489  
    7676    if($el.hasClass('type-4') || $el.hasClass('type-circle')){ return false; }
    7777    return true;
     78  }
     79
     80  /**
     81   * After Stripe/Woo return (?picky_payment=success|cancel|failed), show thank-you or error.
     82   * Must exist before the early call below — missing def crashed the whole frontend bundle.
     83   */
     84  function pickyShowPaymentReturnNotice(){
     85    var params;
     86    try {
     87      params = new URLSearchParams(window.location.search || '');
     88    } catch(e){
     89      return;
     90    }
     91    var payment = (params.get('picky_payment') || '').toLowerCase();
     92    if(!payment){ return; }
     93    var msg = '';
     94    var isSuccess = false;
     95    if(payment === 'success'){
     96      msg = pickyI18n.payment_success ? String(pickyI18n.payment_success) : '';
     97      isSuccess = true;
     98    } else if(payment === 'cancel'){
     99      msg = pickyI18n.payment_cancel ? String(pickyI18n.payment_cancel) : '';
     100    } else {
     101      msg = pickyI18n.payment_failed ? String(pickyI18n.payment_failed) : '';
     102    }
     103    $('.picky-tables-wrap').each(function(){
     104      var wrap = $(this);
     105
     106      if(isSuccess){
     107        wrap.find('.picky-form-booking').hide();
     108        wrap.find('.picky-selection-tray').hide();
     109
     110        var thx = wrap.find('.picky-form-thx');
     111        var titleElem = thx.find('.picky-form-thx-title');
     112        if(titleElem.length){
     113          thx.find('.picky-payment-thx-msg').remove();
     114          titleElem.after('<p class="picky-payment-thx-msg" style="color:#16a34a;margin-top:10px;font-weight:bold;text-align:center;">' + msg + '</p>');
     115        }
     116
     117        if(wrap.hasClass('picky-smart-booking-overlay')){
     118          wrap.attr('aria-hidden', 'false');
     119          if(!wrap.hasClass('picky-tables-wrap-second')){
     120             wrap.find('.picky-form-back').show();
     121          }
     122          pickySetBookingModalOpen(true);
     123        } else if (wrap.find('.picky-smart-booking-overlay').length) {
     124          wrap.find('.picky-smart-booking-overlay').attr('aria-hidden', 'false');
     125          wrap.find('.picky-form-back').show();
     126          pickySetBookingModalOpen(true);
     127        }
     128
     129        thx.fadeIn(150);
     130
     131        window.pickyPaymentRefreshTimeout = setTimeout(function() {
     132          try {
     133            var currentUrl = new URL(window.location.href);
     134            currentUrl.searchParams.delete('picky_payment');
     135            currentUrl.searchParams.delete('picky_booking_id');
     136            window.location.href = currentUrl.toString();
     137          } catch(e) {
     138            window.location.href = window.location.pathname;
     139          }
     140        }, 6000);
     141      } else {
     142        wrap.find('.picky-payment-return-notice').remove();
     143        var notice = $('<div class="picky-payment-return-notice picky-payment-return-error" role="status" aria-live="polite"></div>').text(msg);
     144        wrap.prepend(notice);
     145        notice.hide().fadeIn(150);
     146
     147        var firstNotice = $('.picky-payment-return-notice').first();
     148        if(firstNotice.length && typeof pickySmoothScrollTo === 'function'){
     149          pickySmoothScrollTo(firstNotice, 20);
     150        }
     151      }
     152    });
    78153  }
    79154 
  • pickybooking/trunk/includes/class-info.php

    r3813280 r3813489  
    3131     * @var string
    3232     */
    33     const VERSION = '1.0.27';
     33    const VERSION = '1.0.28';
    3434
    3535    /**
  • pickybooking/trunk/pickybooking.php

    r3813386 r3813489  
    44 * Plugin URI:        https://pickybooking.com/
    55 * Description:       Interactive floor plan booking for WordPress: guests pick a table, seat, or desk on a visual map and reserve online. Pro adds payments, integrations, and more.
    6  * Version:           1.0.27
     6 * Version:           1.0.28
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.4
  • pickybooking/trunk/readme.txt

    r3813386 r3813489  
    66Tested up to: 7.1
    77Requires PHP: 7.4
    8 Stable tag: 1.0.27
     8Stable tag: 1.0.28
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    107107== Changelog ==
    108108
     109= 1.0.28 =
     110* Fix frontend map crash: define missing pickyShowPaymentReturnNotice so the booking canvas can initialize.
     111
    109112= 1.0.27 =
    110113* Add Setup Checklist under Settings, clarify free booking amount calculation vs Pro online payments, match Payments radio tiles to Main, and refresh Pro badges / provider brand icons. Lite Pro areas are upsell stubs only (no working Pro forms).
Note: See TracChangeset for help on using the changeset viewer.