Changeset 3325775
- Timestamp:
- 07/10/2025 02:39:09 PM (9 months ago)
- Location:
- showpass
- Files:
-
- 1 added
- 3 edited
-
tags/4.0.3 (added)
-
trunk/js/showpass-custom.js (modified) (14 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/showpass-wordpress-plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
showpass/trunk/js/showpass-custom.js
r3310142 r3325775 1 1 (function ($, window, document) { 2 3 2 const getParams = (element) => { 4 3 return { 5 'theme-primary': $(element).attr('data-color') || $('#option_widget_color').val() || '', 6 'keep-shopping': $(element).attr('data-shopping') || $('#option_keep_shopping').val() || 'true', 7 'theme-dark': $(element).attr('data-theme') || $('#option_theme_dark').val() || '', 8 'show-description': $(element).attr('data-show-description') || $('#option_show_widget_description').val() || 'false', 9 'show-specific-tickets': $(element).attr('data-show-specific-tickets') || '' 10 } 11 } 4 "theme-primary": 5 $(element).attr("data-color") || 6 $("#option_widget_color").val() || 7 "", 8 "keep-shopping": 9 $(element).attr("data-shopping") || 10 $("#option_keep_shopping").val() || 11 "true", 12 "theme-dark": 13 $(element).attr("data-theme") || 14 $("#option_theme_dark").val() || 15 "", 16 "show-description": 17 $(element).attr("data-show-description") || 18 $("#option_show_widget_description").val() || 19 "false", 20 "show-specific-tickets": 21 $(element).attr("data-show-specific-tickets") || "", 22 }; 23 }; 12 24 13 25 /** … … 28 40 } 29 41 30 function init () { 31 $(window).on('load', function () { 32 33 showpass.tickets.addCartCountListener(function(count) { 34 let html = ''; 42 function init() { 43 $(window).on("load", function () { 44 showpass.tickets.addCartCountListener(function (count) { 45 let html = ""; 35 46 if (count > 0) { 36 html = 'Shopping Cart (' + count + ')';37 Cookies.set( 'cart', html);38 $( '.showpass-cart-button span').html(html);47 html = "Shopping Cart (" + count + ")"; 48 Cookies.set("cart", html); 49 $(".showpass-cart-button span").html(html); 39 50 } else { 40 html = 'Shopping Cart';41 Cookies.set( 'cart', html);42 $( '.showpass-cart-button span').html(html);51 html = "Shopping Cart"; 52 Cookies.set("cart", html); 53 $(".showpass-cart-button span").html(html); 43 54 } 44 55 }); … … 47 58 function getQueryStrings() { 48 59 let assoc = {}; 49 let decode = function (s) {60 let decode = function (s) { 50 61 return decodeURIComponent(s.replace(/\+/g, " ")); 51 62 }; 52 63 let queryString = location.search.substring(1); 53 var keyValues = queryString.split( '&');64 var keyValues = queryString.split("&"); 54 65 55 66 for (var i in keyValues) { 56 var key = keyValues[i].split( '=');67 var key = keyValues[i].split("="); 57 68 if (key.length > 1) { 58 69 assoc[decode(key[0])] = decode(key[1]); … … 65 76 // SET AFFILIATE COOKIE 66 77 if (!$.isEmptyObject(qs) && qs.aff) { 67 Cookies.set( 'affiliate', qs.aff, {68 expires: 7 78 Cookies.set("affiliate", qs.aff, { 79 expires: 7, 69 80 }); 70 81 } … … 72 83 // SET AUTO OPEN COOKIE 73 84 if (!$.isEmptyObject(qs) && qs.auto) { 74 Cookies.set( 'auto', qs.auto, {75 expires: 7 85 Cookies.set("auto", qs.auto, { 86 expires: 7, 76 87 }); 77 88 } 78 79 89 }); 80 90 81 $(document).ready(function () {91 $(document).ready(function () { 82 92 function getQueryStrings() { 83 93 var assoc = {}; 84 var decode = function (s) {94 var decode = function (s) { 85 95 return decodeURIComponent(s.replace(/\+/g, " ")); 86 96 }; 87 97 var queryString = location.search.substring(1); 88 var keyValues = queryString.split( '&');98 var keyValues = queryString.split("&"); 89 99 90 100 for (var i in keyValues) { 91 var key = keyValues[i].split( '=');101 var key = keyValues[i].split("="); 92 102 if (key.length > 1) { 93 103 assoc[decode(key[0])] = decode(key[1]); … … 102 112 var slug = qs.auto; 103 113 let params = { 104 'theme-primary': $('#option_widget_color').val(), 105 'keep-shopping': $('#option_keep_shopping').val(), 106 'show-description': $('#option_show_widget_description').val() 114 "theme-primary": $("#option_widget_color").val(), 115 "keep-shopping": $("#option_keep_shopping").val(), 116 "show-description": $( 117 "#option_show_widget_description" 118 ).val(), 107 119 }; 108 setTimeout(function () {109 Cookies.remove( 'auto');120 setTimeout(function () { 121 Cookies.remove("auto"); 110 122 showpass.tickets.eventPurchaseWidget(slug, params); 111 123 }, 500); 112 124 } 113 125 114 $( 'body').on('click', '.open-calendar-widget', function(e) {126 $("body").on("click", ".open-calendar-widget", function (e) { 115 127 e.preventDefault(); 116 128 117 let id = $(this).attr( 'data-org-id');129 let id = $(this).attr("data-org-id"); 118 130 let params = { 119 'theme-primary': $(this).attr('data-color') || $('#option_widget_color').val(), 120 'keep-shopping': false, 121 'tags': $(this).attr('data-tags') 131 "theme-primary": 132 $(this).attr("data-color") || 133 $("#option_widget_color").val(), 134 "keep-shopping": false, 135 tags: $(this).attr("data-tags"), 122 136 }; 123 137 … … 126 140 127 141 function initializeShowpassEmbeddedWidgets() { 128 const embeddedCalendarWidget = document.getElementById('showpass-calendar-widget'); 129 130 const embeddedCartWidget = document.getElementById('showpass-cart-widget'); 131 142 const embeddedCalendarWidget = document.getElementById( 143 "showpass-calendar-widget" 144 ); 145 146 const embeddedCartWidget = document.getElementById( 147 "showpass-cart-widget" 148 ); 149 132 150 // Check for embedded event/product/membership widgets - look for elements with IDs starting with 'showpass-' 133 151 // and containing '-widget-' 134 152 const embeddedPurchaseWidgets = []; 135 document.querySelectorAll('[id^="showpass-"][id*="-widget-"]').forEach(widget => { 136 embeddedPurchaseWidgets.push(widget); 137 }); 138 139 if (embeddedCalendarWidget || embeddedPurchaseWidgets.length > 0 || embeddedCartWidget) { 153 document 154 .querySelectorAll('[id^="showpass-"][id*="-widget-"]') 155 .forEach((widget) => { 156 embeddedPurchaseWidgets.push(widget); 157 }); 158 159 if ( 160 embeddedCalendarWidget || 161 embeddedPurchaseWidgets.length > 0 || 162 embeddedCartWidget 163 ) { 140 164 let script = document.createElement("script"); 141 165 script.type = "text/javascript"; 142 script.src = 'https://showpass.com/static/dist/sdk.js';143 144 let useBeta = $( '#option_use_showpass_beta').val();145 let useDemo = $( '#option_use_showpass_demo').val();166 script.src = "https://showpass.com/static/dist/sdk.js"; 167 168 let useBeta = $("#option_use_showpass_beta").val(); 169 let useDemo = $("#option_use_showpass_demo").val(); 146 170 if (useBeta) { 147 script.src = 'https://beta.showpass.com/static/dist/sdk.js'; 171 script.src = 172 "https://beta.showpass.com/static/dist/sdk.js"; 148 173 } else if (useDemo) { 149 script.src = 'https://demo.showpass.com/static/dist/sdk.js'; 150 } 151 152 script.onload = function() { 174 script.src = 175 "https://demo.showpass.com/static/dist/sdk.js"; 176 } 177 178 script.onload = function () { 153 179 if (embeddedCalendarWidget) { 154 const id = embeddedCalendarWidget.getAttribute('data-org-id'); 180 const id = 181 embeddedCalendarWidget.getAttribute( 182 "data-org-id" 183 ); 155 184 let params = { 156 'theme-primary': $('#option_widget_color').val(), 185 "theme-primary": $( 186 "#option_widget_color" 187 ).val(), 157 188 }; 158 if (embeddedCalendarWidget.getAttribute('data-tags')) { 189 if ( 190 embeddedCalendarWidget.getAttribute("data-tags") 191 ) { 159 192 const tags = { 160 tags: embeddedCalendarWidget.getAttribute('data-tags') 193 tags: embeddedCalendarWidget.getAttribute( 194 "data-tags" 195 ), 161 196 }; 162 197 params = Object.assign(params, tags); 163 198 } 164 showpass.tickets.calendarWidget(id, params, 'showpass-calendar-widget'); 199 showpass.tickets.calendarWidget( 200 id, 201 params, 202 "showpass-calendar-widget" 203 ); 165 204 } 166 205 167 206 if (embeddedCartWidget) { 168 207 let params = { 169 'theme-primary': $('#option_widget_color').val() || '', 170 'keep-shopping': $('#option_keep_shopping').val() || 'true', 171 'theme-dark': $('#option_theme_dark').val() || '', 208 "theme-primary": 209 $("#option_widget_color").val() || "", 210 "keep-shopping": 211 $("#option_keep_shopping").val() || "true", 212 "theme-dark": 213 $("#option_theme_dark").val() || "", 172 214 }; 173 showpass.tickets.checkoutWidget(params, 'showpass-cart-widget'); 215 showpass.tickets.checkoutWidget( 216 params, 217 "showpass-cart-widget" 218 ); 174 219 } 175 220 176 221 if (embeddedPurchaseWidgets.length > 0) { 177 embeddedPurchaseWidgets.forEach(function(widget) { 178 const slug = widget.getAttribute('data-slug'); 179 const widgetType = widget.getAttribute('data-type') || 'event'; // Default to event if not specified 180 222 embeddedPurchaseWidgets.forEach(function (widget) { 223 const slug = widget.getAttribute("data-slug"); 224 const widgetType = 225 widget.getAttribute("data-type") || "event"; // Default to event if not specified 226 181 227 let params = getParams(widget); 182 183 if (widgetType === 'product') { 184 showpass.tickets.productPurchaseWidget(slug, params, widget.id); 185 } else if (widgetType === 'membership') { 186 showpass.tickets.membershipPurchaseWidget(slug, params, widget.id); 228 229 if (widgetType === "product") { 230 showpass.tickets.productPurchaseWidget( 231 slug, 232 params, 233 widget.id 234 ); 235 } else if (widgetType === "membership") { 236 showpass.tickets.membershipPurchaseWidget( 237 slug, 238 params, 239 widget.id 240 ); 187 241 } else { 188 242 // Default to event widget 189 showpass.tickets.eventPurchaseWidget(slug, params, widget.id); 243 showpass.tickets.eventPurchaseWidget( 244 slug, 245 params, 246 widget.id 247 ); 190 248 } 191 249 }); … … 199 257 200 258 const openShowpassWidget = (slug, params, widgetType) => { 201 if (widgetType === 'product') {259 if (widgetType === "product") { 202 260 showpass.tickets.productPurchaseWidget(slug, params); 203 } else if (widgetType === 'membership') {261 } else if (widgetType === "membership") { 204 262 showpass.tickets.membershipPurchaseWidget(slug, params); 205 263 } else { … … 207 265 showpass.tickets.eventPurchaseWidget(slug, params); 208 266 } 209 } 210 211 $( 'body').on('click', '.open-membership-widget', function(e) {267 }; 268 269 $("body").on("click", ".open-membership-widget", function (e) { 212 270 e.preventDefault(); 213 271 214 let id = $(this).attr( 'id');272 let id = $(this).attr("id"); 215 273 let params = getParams(this); 216 274 217 if ($(this).attr( 'data-tracking')) {218 params[ 'tracking-id'] = $(this).attr('data-tracking');275 if ($(this).attr("data-tracking")) { 276 params["tracking-id"] = $(this).attr("data-tracking"); 219 277 } 220 278 221 279 // Overwrite tracking-id if set in URL 222 if (Cookies.get( 'affiliate')) {223 params[ 'tracking-id'] = Cookies.get('affiliate');224 } 225 226 openShowpassWidget(id, params, 'membership');227 }); 228 229 $( 'body').on('click', '.open-ticket-widget', function (e) {280 if (Cookies.get("affiliate")) { 281 params["tracking-id"] = Cookies.get("affiliate"); 282 } 283 284 openShowpassWidget(id, params, "membership"); 285 }); 286 287 $("body").on("click", ".open-ticket-widget", function (e) { 230 288 e.preventDefault(); 231 289 232 let slug = $(this).attr( 'id');290 let slug = $(this).attr("id"); 233 291 let params = getParams(this); 234 292 235 if ($(this).attr( 'data-tracking')) {236 params[ 'tracking-id'] = $(this).attr('data-tracking');293 if ($(this).attr("data-tracking")) { 294 params["tracking-id"] = $(this).attr("data-tracking"); 237 295 } 238 296 239 297 // Overwrite tracking-id if set in URL 240 if (Cookies.get( 'affiliate')) {241 params[ 'tracking-id'] = Cookies.get('affiliate');242 } 243 244 openShowpassWidget(slug, params, 'event');245 }); 246 247 $( 'body').on('click', '.open-product-widget', function(e) {298 if (Cookies.get("affiliate")) { 299 params["tracking-id"] = Cookies.get("affiliate"); 300 } 301 302 openShowpassWidget(slug, params, "event"); 303 }); 304 305 $("body").on("click", ".open-product-widget", function (e) { 248 306 e.preventDefault(); 249 307 250 let id = $(this).attr( 'id');308 let id = $(this).attr("id"); 251 309 let params = getParams(this); 252 310 253 if ($(this).attr( 'data-tracking')) {254 params[ 'tracking-id'] = $(this).attr('data-tracking');311 if ($(this).attr("data-tracking")) { 312 params["tracking-id"] = $(this).attr("data-tracking"); 255 313 } 256 314 257 315 // Overwrite tracking-id if set in URL 258 if (Cookies.get('affiliate')) { 259 params['tracking-id'] = Cookies.get('affiliate'); 260 } 261 262 openShowpassWidget(id, params, 'product'); 263 }); 264 265 $('body').on('click', 'a[href*="showpass.com"].force-showpass-widget', function(e) { 266 e.preventDefault(); 267 268 let slug; 269 const href = $(this).attr('href'); 270 271 if (href.includes('/m/')) { 272 // For membership URLs 273 slug = href.split('/m/')[1]; 274 } else { 275 try { 276 const url = new URL(href); 277 slug = url.pathname.substring(1); // Remove leading slash 278 } catch (e) { 279 slug = href.split('.com/')[1]; 280 } 281 } 282 283 let params = getParams(this); 284 285 if ($(this).attr('data-tracking')) { 286 params['tracking-id'] = $(this).attr('data-tracking'); 287 } 288 289 // Overwrite tracking-id if set in URL 290 if (Cookies.get('affiliate')) { 291 params['tracking-id'] = Cookies.get('affiliate'); 292 } 293 294 let widgetType = 'event'; 295 if (href.includes('/m/')) { 296 widgetType = 'membership'; 297 } 298 299 if ($(this).attr('data-type')) { 300 widgetType = $(this).attr('data-type'); 301 } 302 303 openShowpassWidget(slug, params, widgetType); 304 }); 305 306 $('.showpass-cart-button').on('click', function(e) { 316 if (Cookies.get("affiliate")) { 317 params["tracking-id"] = Cookies.get("affiliate"); 318 } 319 320 openShowpassWidget(id, params, "product"); 321 }); 322 323 $("body").on( 324 "click", 325 'a[href*="showpass.com"].force-showpass-widget', 326 function (e) { 327 e.preventDefault(); 328 329 let slug; 330 const href = $(this).attr("href"); 331 332 if (href.includes("/m/")) { 333 // For membership URLs 334 slug = href.split("/m/")[1]; 335 } else { 336 try { 337 const url = new URL(href); 338 slug = url.pathname.substring(1); // Remove leading slash 339 } catch (e) { 340 slug = href.split(".com/")[1]; 341 } 342 } 343 344 let params = getParams(this); 345 346 if ($(this).attr("data-tracking")) { 347 params["tracking-id"] = $(this).attr("data-tracking"); 348 } 349 350 // Overwrite tracking-id if set in URL 351 if (Cookies.get("affiliate")) { 352 params["tracking-id"] = Cookies.get("affiliate"); 353 } 354 355 let widgetType = "event"; 356 if (href.includes("/m/")) { 357 widgetType = "membership"; 358 } 359 360 if ($(this).attr("data-type")) { 361 widgetType = $(this).attr("data-type"); 362 } 363 364 openShowpassWidget(slug, params, widgetType); 365 } 366 ); 367 368 $(".showpass-cart-button").on("click", function (e) { 307 369 e.preventDefault(); 308 370 let params = getParams(this); … … 310 372 }); 311 373 312 if (Cookies.get( 'cart')) {313 $( '.showpass-cart-button span').html(Cookies.get('cart'));374 if (Cookies.get("cart")) { 375 $(".showpass-cart-button span").html(Cookies.get("cart")); 314 376 } 315 377 316 378 /* 317 * Related events select box widget toggle318 */319 320 $( '.showpass-date-select').on('change', function(e) {379 * Related events select box widget toggle 380 */ 381 382 $(".showpass-date-select").on("change", function (e) { 321 383 var slug = $(this).val(); 322 if (slug != '') {384 if (slug != "") { 323 385 let params = getParams(this); 324 386 325 if (Cookies.get( 'affiliate')) {326 params[ 'tracking-id'] = Cookies.get('affiliate');387 if (Cookies.get("affiliate")) { 388 params["tracking-id"] = Cookies.get("affiliate"); 327 389 } 328 390 … … 330 392 } 331 393 }); 332 333 394 }); 334 395 335 336 396 /** 337 * Shared function to decorate iframe - we default to cookie version because its more reliable338 * @param { object} showpass widget iframe object397 * Shared function to decorate iframe - handles both cookie-based tracking and query parameters 398 * @param {HTMLIFrameElement} iFrame - The iframe element to decorate 339 399 */ 340 400 const decorateIframe = (iFrame) => { 341 // For analytics.js (UA) 342 // We use the linker provided by analytics.js to decorate the iframe src 343 let gobj = window[window.GoogleAnalyticsObject]; 344 if (gobj) { 345 let tracker = gobj.getAll()[0]; 346 let linker = new window.gaplugins.Linker(tracker); 347 iFrame.src = linker.decorate(iFrame.src); 348 } 349 401 if (!iFrame || !iFrame.src) { 402 console.warn("Invalid iframe provided to decorateIframe"); 403 return; 404 } 405 406 // Prevent multiple decorations 407 if (iFrame.dataset.decorated) { 408 return; 409 } 410 411 let url = new URL(iFrame.src); 412 413 // 1. Handle cookie-based tracking (GA and Facebook) 350 414 if (typeof document.cookie === "string" && document.cookie !== "") { 351 // Get the _ga from cookies and parse it to extract client_id and session_id. 352 // This is used as a fallback for GTM implementations. 415 // Parse cookies into an object 353 416 let cookie = {}; 354 417 document.cookie.split(";").forEach(function (el) { … … 358 421 cookie[key] = value; 359 422 }); 423 360 424 // Parse the _ga cookie to extract client_id and session_id. 361 // A _ga cookie will look somethinglike GA1.1.1194072907.1685136322425 // A _ga cookie typically looks like GA1.1.1194072907.1685136322 362 426 const gaCookie = cookie["_ga"]; 363 427 if (gaCookie) { 364 const client_id = gaCookie.substring(6); // using the example above, this will return"1194072907.1685136322"428 const client_id = gaCookie.substring(6); // Example: "1194072907.1685136322" 365 429 const session_id = client_id.split(".")[1]; // ["1194072907", "1685136322"] 366 430 … … 369 433 !isNaN(Number(session_id)) 370 434 ) { 371 let url = new URL(iFrame.src);372 435 url.searchParams.append("parent_client_id", client_id); 373 436 url.searchParams.append( … … 375 438 session_id 376 439 ); 377 iFrame.src = url.toString(); 378 } 379 } 380 } 381 382 // Pass the parent page's referrer to our iFrame. 383 // When the referrer is unavailable (ie. direct visit), the web-app 384 // should not inject and GA4 defaults to the default behaviour. 440 } 441 } 442 443 // Add fbclid from _fbc cookie if present and properly formatted 444 const fbcCookie = cookie["_fbc"]; 445 if (fbcCookie) { 446 const parts = fbcCookie.split("."); 447 // Expecting exactly 4 parts; use the last part as fbclid 448 if (parts.length === 4) { 449 url.searchParams.append("fbclid", parts[3]); 450 } 451 } 452 } 453 454 // 2. Pass the parent page's referrer to our iFrame 385 455 const referrer = document.referrer || ""; 386 456 if (referrer) { 387 let url = new URL(iFrame.src);388 457 url.searchParams.append("parent_document_referrer", referrer); 389 iFrame.src = url.toString(); 390 } 391 } 392 393 /* 394 * Decorate iFrame for GA cross domain tracking 395 * This only works for pop ups, for embedded calendar we need to use a watcher 396 */ 397 const mutationObserver = new MutationObserver(function(mutations) { 398 mutations.forEach(function(mutation) { 399 if (mutation.target.className.includes('showpass-widget-body') && document) { 400 401 let iFrame = document.getElementById('showpass-widget'); 402 403 // if query params already exist, exit 404 let queryParams = new URLSearchParams(iFrame.src); 458 } 459 460 // 3. Add current page query parameters 461 // This is REQUIRED for the checkout widget to work properly with Affirm redirects 462 const currentUrl = new URL(window.location.href); 463 const queryParams = currentUrl.searchParams; 464 465 if (queryParams.toString()) { 466 queryParams.forEach((value, key) => { 467 // Check if parameter already exists in iframe src to avoid duplicates 468 if (!url.searchParams.has(key)) { 469 url.searchParams.append(key, value); 470 } 471 }); 472 } 473 474 // Update iframe src and mark as decorated 475 iFrame.src = url.toString(); 476 iFrame.dataset.decorated = "true"; 477 478 console.log( 479 "Decorated iframe with tracking parameters:", 480 url.toString() 481 ); 482 }; 483 484 /** 485 * Sets up observer to watch for ANY Showpass iframe anywhere in the document 486 * Handles both popup widgets and embedded widgets 487 */ 488 const setupShowpassIframeObserver = () => { 489 const documentObserver = new MutationObserver((mutations) => { 490 mutations.forEach((mutation) => { 491 if (mutation.type === "childList") { 492 mutation.addedNodes.forEach((node) => { 493 if (node.nodeType === Node.ELEMENT_NODE) { 494 // Check if the node itself is a Showpass iframe 495 if ( 496 node.tagName === "IFRAME" && 497 node.src && 498 node.src.includes("showpass.com") && 499 !node.dataset.decorated 500 ) { 501 decorateIframe(node); 502 } 503 504 // Look for any Showpass iframes within the added node 505 if (node.getElementsByTagName) { 506 const iframes = node.getElementsByTagName('iframe'); 507 for (let iframe of iframes) { 508 if (iframe.src && iframe.src.includes("showpass.com") && !iframe.dataset.decorated) { 509 decorateIframe(iframe); 510 } 511 } 512 } 513 } 514 }); 515 } 516 517 // Also watch for src attribute changes on existing iframes 405 518 if ( 406 queryParams.get("parent_client_id") || 407 queryParams.get("parent_session_id") || 408 queryParams.get("parent_document_referrer") 519 mutation.type === "attributes" && 520 mutation.attributeName === "src" 409 521 ) { 410 return; 411 } 412 decorateIframe(iFrame); 413 } 414 }); 415 }); 416 417 mutationObserver.observe(document.documentElement, { attributes: true }); 418 419 let calendarDIV = document.getElementById("showpass-calendar-widget"); 420 if (calendarDIV) { 421 /** Wrap IFrame for embeded calendar */ 422 function wrapIFrame(iFrame) { 423 clearInterval(findIFrameInterval); 424 decorateIframe(iFrame); 425 } 426 const findIFrameInterval = setInterval(findIFrame, 100); 427 function findIFrame() { 428 let iFrame = document.getElementsByClassName("showpass-widget-iframe"); 429 if (iFrame && iFrame[0] && iFrame[0].src) { 430 wrapIFrame(iFrame[0]); 431 } 432 } 522 const target = mutation.target; 523 if ( 524 target.tagName === "IFRAME" && 525 target.src && 526 target.src.includes("showpass.com") && 527 !target.dataset.decorated 528 ) { 529 decorateIframe(target); 530 } 531 } 532 }); 533 }); 534 535 documentObserver.observe(document.body, { 536 childList: true, 537 subtree: true, 538 attributes: true, 539 attributeFilter: ["src"], 540 }); 541 542 return documentObserver; 543 }; 544 545 // Initialize the observer automatically 546 setupShowpassIframeObserver(); 433 547 } 434 } })(jQuery, window, document);548 })(jQuery, window, document); -
showpass/trunk/readme.txt
r3323928 r3325775 3 3 Requires at least: 4.9 4 4 Tested up to: 6.4.3 5 Stable tag: 4.0. 25 Stable tag: 4.0.3 6 6 Requires PHP: 5.4.45 7 7 Contributors: marcshowpass, spapril, spzachary, cgarrovillosp … … 56 56 == Changelog == 57 57 58 = 4.0.3 = 59 * Fix analytics tracking for embedded widgets 60 58 61 = 4.0.2 = 59 62 * Fix file caching -
showpass/trunk/showpass-wordpress-plugin.php
r3323927 r3325775 6 6 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 7 7 Author: Showpass / Up In Code Inc. 8 Version: 4.0. 28 Version: 4.0.3 9 9 Author URI: https://www.showpass.com 10 10 */ 11 11 12 define('SHOWPASS_PLUGIN_VERSION', '4.0. 2');12 define('SHOWPASS_PLUGIN_VERSION', '4.0.3'); 13 13 14 14 if (! defined('ABSPATH')) {
Note: See TracChangeset
for help on using the changeset viewer.