Plugin Directory

Changeset 3425488


Ignore:
Timestamp:
12/22/2025 04:02:18 PM (3 months ago)
Author:
marcshowpass
Message:

4.0.7

Location:
showpass
Files:
54 added
3 edited

Legend:

Unmodified
Added
Removed
  • showpass/trunk/js/showpass-custom.js

    r3394633 r3425488  
    2020            "show-specific-tickets":
    2121                $(element).attr("data-show-specific-tickets") || "",
    22             "lang":
    23                 $(element).attr("data-lang") || "",
     22            lang: $(element).attr("data-lang") || "",
     23            "redirect-url": encodeURIComponent(window.location.href),
    2424        };
    2525    };
     
    111111            var qs = getQueryStrings();
    112112
    113             if (qs.auto) {
     113            if (qs.affirm) {
     114                let params = getParams();
     115                showpass.tickets.checkoutWidget(params);
     116            } else if (qs.auto) {
    114117                var slug = qs.auto;
    115118                let params = {
     
    122125                setTimeout(function () {
    123126                    Cookies.remove("auto");
     127                    params["redirect-url"] = encodeURIComponent(
     128                        window.location.href
     129                    );
    124130                    showpass.tickets.eventPurchaseWidget(slug, params);
    125131                }, 500);
     
    136142                    "keep-shopping": false,
    137143                    tags: $(this).attr("data-tags"),
    138                     is_attraction: $(this).attr("data-is-attraction") === 'true' ? true : false,
     144                    is_attraction:
     145                        $(this).attr("data-is-attraction") === "true"
     146                            ? true
     147                            : false,
    139148                    event_id: $(this).attr("data-event-id"),
     149
    140150                    lang: $(this).attr("data-lang"),
    141151                };
    142152
     153                params["redirect-url"] = encodeURIComponent(
     154                    window.location.href
     155                );
    143156                showpass.tickets.calendarWidget(id, params);
    144157            });
     
    189202                                params = Object.assign(params, tags);
    190203                            }
    191                             if (embeddedCalendarWidget.getAttribute("data-is-attraction")) {
    192                                 const is_attraction = embeddedCalendarWidget.getAttribute("data-is-attraction") === 'true' ? true : false;
     204                            if (
     205                                embeddedCalendarWidget.getAttribute(
     206                                    "data-is-attraction"
     207                                )
     208                            ) {
     209                                const is_attraction =
     210                                    embeddedCalendarWidget.getAttribute(
     211                                        "data-is-attraction"
     212                                    ) === "true"
     213                                        ? true
     214                                        : false;
    193215                                params.is_attraction = is_attraction;
    194216                            }
    195                             if (embeddedCalendarWidget.getAttribute("data-event-id")) {
    196                                 const event_id = embeddedCalendarWidget.getAttribute("data-event-id");
     217                            if (
     218                                embeddedCalendarWidget.getAttribute(
     219                                    "data-event-id"
     220                                )
     221                            ) {
     222                                const event_id =
     223                                    embeddedCalendarWidget.getAttribute(
     224                                        "data-event-id"
     225                                    );
    197226                                params.event_id = event_id;
    198227                            }
     
    207236                                params = Object.assign(params, lang);
    208237                            }
     238                            params["redirect-url"] = encodeURIComponent(
     239                                window.location.href
     240                            );
    209241                            showpass.tickets.calendarWidget(
    210242                                id,
     
    222254                                "theme-dark":
    223255                                    $("#option_theme_dark").val() || "",
    224                                 "lang":
    225                                     embeddedCartWidget.getAttribute("data-lang") || "",
     256                                lang:
     257                                    embeddedCartWidget.getAttribute(
     258                                        "data-lang"
     259                                    ) || "",
    226260                            };
     261                            params["redirect-url"] = encodeURIComponent(
     262                                window.location.href
     263                            );
    227264                            showpass.tickets.checkoutWidget(
    228265                                params,
     
    238275
    239276                                let params = getParams(widget);
    240 
    241277                                if (widgetType === "product") {
    242278                                    showpass.tickets.productPurchaseWidget(
     
    265301                    // Wait for showpass SDK to be available, then initialize widgets
    266302                    function waitForShowpass() {
    267                         if (typeof showpass !== 'undefined' && showpass.tickets) {
     303                        if (
     304                            typeof showpass !== "undefined" &&
     305                            showpass.tickets
     306                        ) {
    268307                            initializeWidgets();
    269308                        } else {
     
    272311                        }
    273312                    }
    274                    
     313
    275314                    waitForShowpass();
    276315                }
     
    527566                                // Look for any Showpass iframes within the added node
    528567                                if (node.getElementsByTagName) {
    529                                     const iframes = node.getElementsByTagName('iframe');
     568                                    const iframes =
     569                                        node.getElementsByTagName("iframe");
    530570                                    for (let iframe of iframes) {
    531                                         if (iframe.src && iframe.src.includes("showpass.com") && !iframe.dataset.decorated) {
     571                                        if (
     572                                            iframe.src &&
     573                                            iframe.src.includes(
     574                                                "showpass.com"
     575                                            ) &&
     576                                            !iframe.dataset.decorated
     577                                        ) {
    532578                                            decorateIframe(iframe);
    533579                                        }
  • showpass/trunk/readme.txt

    r3394633 r3425488  
    33Requires at least: 4.9
    44Tested up to: 6.8.2
    5 Stable tag: 4.0.6
     5Stable tag: 4.0.7
    66Requires PHP: 5.4.45
    77Contributors: marcshowpass, spapril, spzachary, cgarrovillosp
     
    5656== Changelog ==
    5757
     58= 4.0.7 =
     59* Force redirect-url param for Affirm support
     60
    5861= 4.0.6 =
    5962* Add French language support for widgets
  • showpass/trunk/showpass-wordpress-plugin.php

    r3394633 r3425488  
    66 Description: List events, display event details and products. Use the Showpass purchase widget for on site ticket & product purchases all with easy to use shortcodes. See our git repo here for full documentation. https://github.com/showpass/showpass-wordpress-plugin
    77 Author: Showpass / Up In Code Inc.
    8  Version: 4.0.6
     8 Version: 4.0.7
    99 Author URI: https://www.showpass.com
    1010 */
    1111
    12 define('SHOWPASS_PLUGIN_VERSION', '4.0.6');
     12define('SHOWPASS_PLUGIN_VERSION', '4.0.7');
    1313
    1414if (! defined('ABSPATH')) {
Note: See TracChangeset for help on using the changeset viewer.