Changeset 3089681
- Timestamp:
- 05/20/2024 11:07:38 PM (23 months ago)
- Location:
- showpass
- Files:
-
- 1 added
- 5 edited
-
tags/3.8.10 (added)
-
trunk/js/showpass-custom.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/showpass-wordpress-plugin-admin-page.php (modified) (1 diff)
-
trunk/showpass-wordpress-plugin-shortcode.php (modified) (3 diffs)
-
trunk/showpass-wordpress-plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
showpass/trunk/js/showpass-custom.js
r3073484 r3089681 7 7 'theme-dark': $(element).attr('data-theme') || $('#option_theme_dark').val() || '', 8 8 'show-description': $(element).attr('data-show-description') || $('#option_show_widget_description').val() || 'false', 9 'distribution-tracking': $(element).attr('data-distribution-tracking') || $('#option_showpass_distribution_tracking').val() || '',10 9 'show-specific-tickets': $(element).attr('data-show-specific-tickets') || '' 11 10 } … … 175 174 showpass.tickets.eventPurchaseWidget(slug, params); 176 175 } 177 178 /** 179 * Handle the redirect if distribution partner with an external link 180 */ 181 if (params['data-distribution'] !== '') { 182 const checkEvent = async () => { 183 try { 184 let useBeta = $('#option_use_showpass_beta').val(); 185 let apiUrl = 'https://www.showpass.com/api/' 186 if (useBeta) { 187 apiUrl = 'https://beta.showpass.com/api/' 188 } 189 const response = await fetch(apiUrl + 'public/events/' + slug + '/') 190 191 if (response) { 192 const data = await response.json(); 193 if (data) { 194 if (data.id && data.external_link) { 195 window.open(data.external_link, '_blank'); 196 } else { 197 openWidget(); 198 } 199 } 200 return data; 201 } 202 return response; 203 } catch (error) { 204 openWidget(); 205 }; 206 } 207 checkEvent(); 208 } else { 209 openWidget(); 210 } 176 openWidget(); 211 177 } 212 178 213 179 $('body').on('click', 'a[href*="showpass.com"].force-showpass-widget', function (e) { 214 console.log('test');215 180 e.preventDefault(); 216 181 slug = $(this).attr('href').split('.com/')[1]; … … 221 186 params['tracking-id'] = $(this).attr('data-tracking'); 222 187 } 223 224 /**225 * Add query parameters if distribution tracking is enabled226 */227 188 228 189 // Overwrite tracking-id if set in URL … … 243 204 params['tracking-id'] = $(this).attr('data-tracking'); 244 205 } 245 246 /**247 * Add query parameters if distribution tracking is enabled248 */249 206 250 207 // Overwrite tracking-id if set in URL -
showpass/trunk/readme.txt
r3073485 r3089681 2 2 Tags: showpass, events, tickets, sell tickets, event calendar, purchase tickets, custom event pages 3 3 Requires at least: 4.9 4 Tested up to: 6. 3.25 Stable tag: 3.8. 94 Tested up to: 6.4.3 5 Stable tag: 3.8.10 6 6 Requires PHP: 5.4.45 7 7 Contributors: marcshowpass, spapril, spzachary, cgarrovillosp -
showpass/trunk/showpass-wordpress-plugin-admin-page.php
r2951753 r3089681 63 63 <small>CAUTION: This is for testing purposes only.</small><br /><br /> 64 64 65 <h3>Distribution Partners</h3>66 67 <label for="option_showpass_access_token">Access Token</label><br />68 <input type="text" placeholder="" name="option_showpass_access_token"69 value="<?php echo esc_attr( get_option('option_showpass_access_token') ); ?>" /><br />70 <label>Only required for distribution partners.</label><br /><br />71 72 <label for="option_showpass_access_token">Sales Tracking Token</label><br />73 <input type="text" placeholder="" name="option_showpass_distribution_tracking"74 value="<?php echo esc_attr( get_option('option_showpass_distribution_tracking') ); ?>" /><br />75 <label>Only required for distribution partners.</label><br />76 77 65 <?php submit_button(); ?> 78 66 -
showpass/trunk/showpass-wordpress-plugin-shortcode.php
r3073484 r3089681 844 844 } 845 845 846 if (get_option('option_showpass_access_token')) {847 $distribution_partner = 'true';848 } else {849 $distribution_partner = 'false';850 }851 852 846 if (isset($atts['show_specific_tickets'])) { 853 847 $show_specific_tickets = $atts['show_specific_tickets']; … … 1020 1014 wp_enqueue_script('moment-timezone-showpass'); 1021 1015 wp_enqueue_script('js-cookie', plugins_url( '/js/vendor/js.cookie.js', __FILE__ ), array(), '2.2.0', true); 1022 wp_enqueue_script('showpass-custom', plugins_url( '/js/showpass-custom.js', __FILE__ ), array('jquery'), '3.8. 7', true);1016 wp_enqueue_script('showpass-custom', plugins_url( '/js/showpass-custom.js', __FILE__ ), array('jquery'), '3.8.10', true); 1023 1017 } 1024 1018 } … … 1031 1025 echo '<input type="hidden" id="option_theme_dark" value="'.get_option('option_theme_dark').'">'; 1032 1026 echo '<input type="hidden" id="option_widget_color" value="'.get_option('option_widget_color').'">'; 1033 echo '<input type="hidden" id="option_showpass_distribution_tracking" value="'.get_option('option_showpass_distribution_tracking').'">';1034 1027 echo '<input type="hidden" id="option_use_showpass_beta" value="'.get_option('option_use_showpass_beta').'">'; 1035 1028 } -
showpass/trunk/showpass-wordpress-plugin.php
r3073485 r3089681 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: 3.8. 98 Version: 3.8.10 9 9 Author URI: https://www.showpass.com 10 10 */ … … 53 53 register_setting('wpshp-settings-group', 'option_use_showpass_beta'); 54 54 register_setting('wpshp-settings-group', 'option_showpass_access_token'); 55 register_setting('wpshp-settings-group', 'option_showpass_distribution_tracking');56 55 register_setting('wpshp-settings-group', 'option_showpass_default_button_class'); 57 56 }
Note: See TracChangeset
for help on using the changeset viewer.