Changeset 2849665
- Timestamp:
- 01/17/2023 09:48:56 AM (3 years ago)
- Location:
- ffl-api/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
admin/class-ffl-api-admin.php (modified) (2 diffs)
-
ffl-api.php (modified) (2 diffs)
-
public/class-ffl-api-public.php (modified) (4 diffs)
-
public/js/ffl-api-public.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ffl-api/trunk/README.txt
r2723338 r2849665 6 6 Tags: FFL, eCommerce checkout, WooCommerce, FFL gun dealers, map api, google maps, gun dealer 7 7 Requires at least: 5.0 8 Tested up to: 6. 08 Tested up to: 6.1.1 9 9 Requires PHP: 7.0 10 10 Stable tag: 1.5 … … 183 183 184 184 == Changelog == 185 v1.5.9 Added FFL info pop-up visibility option 185 186 v1.5.8 FFL map issue solved 186 187 v1.5.7 Special character usage bug solved at Firearm Warning Message -
ffl-api/trunk/admin/class-ffl-api-admin.php
r2250737 r2849665 149 149 register_setting('ffl-api-settings', 'ffl_list_text_option'); 150 150 register_setting('ffl-api-settings', 'ffl_init_map_location'); 151 register_setting('ffl-api-settings', 'ffl_map_show_modal', ['default' => 'yes']); 151 152 } 152 153 … … 184 185 <td><input type="text" style="width: 30%" name="ffl_api_gmaps_option" 185 186 value="<?php echo esc_attr(get_option('ffl_api_gmaps_option')); ?>"/> 187 </td> 188 </tr> 189 190 <tr valign="top"> 191 <th scope="row">Warning Message Modal</th> 192 193 <td> 194 <select name="ffl_map_show_modal"> 195 <?php 196 $selects = Array( 197 'yes' => 'Show', 198 'no' => 'Hide' 199 ); 200 foreach ($selects as $val => $key) { 201 echo '<option value="' . $val . '" '; 202 if (get_option('ffl_map_show_modal') == $val) { 203 echo 'selected="selected" '; 204 } 205 echo '> ' . $key . '</option>'; 206 } 207 ?> 208 </select> 209 <p id="warnHelp" class="form-text text-muted"></p> 186 210 </td> 187 211 </tr> -
ffl-api/trunk/ffl-api.php
r2715899 r2849665 17 17 * Plugin URI: fflapi.com 18 18 * Description: FFL API Woocommerce plugin 19 * Version: 1.5. 819 * Version: 1.5.9 20 20 * WC requires at least: 3.0.0 21 21 * WC tested up to: 4.0 … … 48 48 * Rename this for your plugin and update it as you release new versions. 49 49 */ 50 define('FFL_API_VERSION', '1.5. 8');50 define('FFL_API_VERSION', '1.5.9'); 51 51 52 52 /** -
ffl-api/trunk/public/class-ffl-api-public.php
r2691364 r2849665 126 126 $_parent_product = wc_get_product($_product->get_data()['parent_id']); 127 127 $firearm = $_parent_product->get_meta('_firearm_product'); 128 128 129 } else { 129 130 $firearm = $_product->get_meta('_firearm_product'); … … 149 150 $gKey = esc_attr(get_option('ffl_api_gmaps_option')); 150 151 $wMes = get_option('ffl_api_warning_message') != '' ? get_option('ffl_api_warning_message') : 'You have chosen your address as a shipping address for a firearm product. Unfortunately, we are not able to ship the firearms directly to your address. Please select the closest FFL from the map using your zip code.'; 151 152 $showModal = get_option('ffl_map_show_modal',true); 152 153 $hok = get_option('ffl_init_map_location'); 153 154 echo '<div id="ffl_container"></div>'; … … 159 160 let wMes = `' . $wMes . '` 160 161 let hok = "' . $hok . '" 162 let showModal = "' . $showModal . '" 161 163 162 164 localStorage.removeItem("selectedFFL"); … … 164 166 if(!document.getElementById("ffl-zip-code")) { 165 167 document.addEventListener("DOMContentLoaded", function() { 166 initFFLJs(aKey,gKey,wMes,hok );168 initFFLJs(aKey,gKey,wMes,hok,showModal); 167 169 }); 168 170 } -
ffl-api/trunk/public/js/ffl-api-public.js
r2715899 r2849665 1 function initFFLJs(fKey,gKey,message,hook ) {1 function initFFLJs(fKey,gKey,message,hook,showModal) { 2 2 3 3 if(hook === "woocommerce_before_checkout_billing_form") { … … 26 26 jQuery("#modalFFL").css('display','none'); 27 27 }); 28 29 if(showModal == "no"){ 30 jQuery("#modalFFL").css('display','none'); 31 } 28 32 29 33 jQuery('.woocommerce-shipping-fields__field-wrapper').find('input').val(null);
Note: See TracChangeset
for help on using the changeset viewer.