Changeset 3436729
- Timestamp:
- 01/10/2026 04:41:35 PM (3 months ago)
- Location:
- hungarian-pickup-points-for-woocommerce/trunk
- Files:
-
- 6 edited
-
assets/js/admin.js (modified) (3 diffs)
-
assets/js/admin.min.js (modified) (3 diffs)
-
assets/js/frontend.js (modified) (1 diff)
-
assets/js/frontend.min.js (modified) (1 diff)
-
index.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hungarian-pickup-points-for-woocommerce/trunk/assets/js/admin.js
r3435268 r3436729 639 639 var providers = vp_woo_pont_params.providers; 640 640 providers['postapont'] = 'Postapont'; 641 console.log(providers); 641 642 var billing_country = $('#_billing_country').val(); 642 643 643 var calls = vp_woo_pont_params.files.map(function(file) { 644 console.log(file); 645 646 //Skip for country in case of Kvikk 647 if(file.type.includes('kvikk_') && file.country != billing_country) { 648 return; 649 } 650 651 return $.getJSON( file.url, function( data ) { 652 vp_woo_pont_settings.json_data_points.push({provider: file.type, title: providers[file.type], data: data}); 644 var calls = []; 645 646 Object.keys(vp_woo_pont_params.files).forEach(function(json) { 647 648 //Check for country specific files 649 vp_woo_pont_params.files[json].forEach(function(file){ 650 651 //Skip if the country doesn't match 652 if(billing_country != file.country) { 653 return; //skip this file 654 } 655 656 calls.push($.getJSON(vp_woo_pont_params.db_url+file.file, function (data) { 657 vp_woo_pont_settings.json_data_points.push({provider: json, title: providers[json], data: data}); 658 console.log('loaded json for '+json); 659 })); 660 653 661 }); 662 654 663 }); 655 664 … … 2898 2907 load_replacement_points: function(provider_id) { 2899 2908 vp_woo_pont_settings.json_data_points.forEach(function(data_points){ 2909 console.log('load_replacement_points', provider_id, data_points); 2900 2910 if(data_points.provider == provider_id && !$('.vp-woo-pont-modal-replace-results li#'+provider_id).length) { 2901 2911 var providerLi = $('<li>').attr('id', data_points.provider); … … 3087 3097 vp_woo_pont_settings.load_json_files(function(){ 3088 3098 3099 console.log('JSON files loaded'); 3100 3089 3101 //Load selected values 3090 3102 $selected.trigger('change'); -
hungarian-pickup-points-for-woocommerce/trunk/assets/js/admin.min.js
r3435268 r3436729 640 640 var providers = vp_woo_pont_params.providers; 641 641 providers['postapont'] = 'Postapont'; 642 console.log(providers); 642 643 var billing_country = $('#_billing_country').val(); 643 644 644 var calls = vp_woo_pont_params.files.map(function(file) { 645 console.log(file); 646 647 //Skip for country in case of Kvikk 648 if(file.type.includes('kvikk_') && file.country != billing_country) { 649 return; 650 } 651 652 return $.getJSON( file.url, function( data ) { 653 vp_woo_pont_settings.json_data_points.push({provider: file.type, title: providers[file.type], data: data}); 645 var calls = []; 646 647 Object.keys(vp_woo_pont_params.files).forEach(function(json) { 648 649 //Check for country specific files 650 vp_woo_pont_params.files[json].forEach(function(file){ 651 652 //Skip if the country doesn't match 653 if(billing_country != file.country) { 654 return; //skip this file 655 } 656 657 calls.push($.getJSON(vp_woo_pont_params.db_url+file.file, function (data) { 658 vp_woo_pont_settings.json_data_points.push({provider: json, title: providers[json], data: data}); 659 console.log('loaded json for '+json); 660 })); 661 654 662 }); 663 655 664 }); 656 665 … … 2899 2908 load_replacement_points: function(provider_id) { 2900 2909 vp_woo_pont_settings.json_data_points.forEach(function(data_points){ 2910 console.log('load_replacement_points', provider_id, data_points); 2901 2911 if(data_points.provider == provider_id && !$('.vp-woo-pont-modal-replace-results li#'+provider_id).length) { 2902 2912 var providerLi = $('<li>').attr('id', data_points.provider); … … 3087 3097 if(vp_woo_pont_settings.json_data_points.length === 0) { 3088 3098 vp_woo_pont_settings.load_json_files(function(){ 3099 3100 console.log('JSON files loaded'); 3089 3101 3090 3102 //Load selected values -
hungarian-pickup-points-for-woocommerce/trunk/assets/js/frontend.js
r3435268 r3436729 280 280 vp_woo_pont_frontend.notes = notes; 281 281 282 //Set default country 283 var current_billing_country = vp_woo_pont_frontend_params.default_country || 'HU'; 284 282 285 //Set the billing country 283 var current_billing_country = $('#billing_country').val() || 'HU'; 286 if($('#billing_country').length && $('#billing_country').val()) { 287 current_billing_country = $('#billing_country').val(); 288 } 284 289 285 290 //If we don't have a billing country, try shipping country 286 if( !$('#billing_country').length) {287 current_billing_country = $('#shipping_country').val() || 'HU';291 if($('#shipping_country').length && $('#shipping_country').val()) { 292 current_billing_country = $('#shipping_country').val(); 288 293 } 289 294 290 295 //If still nothing, check in case its a block based checkout 291 if( !$('#billing_country').length) {292 current_billing_country = $('#billing-country').val() || 'HU';296 if($('#billing-country').length && $('#billing-country').val()) { 297 current_billing_country = $('#billing-country').val(); 293 298 } 294 299 -
hungarian-pickup-points-for-woocommerce/trunk/assets/js/frontend.min.js
r3435268 r3436729 281 281 vp_woo_pont_frontend.notes = notes; 282 282 283 //Set default country 284 var current_billing_country = vp_woo_pont_frontend_params.default_country || 'HU'; 285 283 286 //Set the billing country 284 var current_billing_country = $('#billing_country').val() || 'HU'; 287 if($('#billing_country').length && $('#billing_country').val()) { 288 current_billing_country = $('#billing_country').val(); 289 } 285 290 286 291 //If we don't have a billing country, try shipping country 287 if( !$('#billing_country').length) {288 current_billing_country = $('#shipping_country').val() || 'HU';292 if($('#shipping_country').length && $('#shipping_country').val()) { 293 current_billing_country = $('#shipping_country').val(); 289 294 } 290 295 291 296 //If still nothing, check in case its a block based checkout 292 if( !$('#billing_country').length) {293 current_billing_country = $('#billing-country').val() || 'HU';297 if($('#billing-country').length && $('#billing-country').val()) { 298 current_billing_country = $('#billing-country').val(); 294 299 } 295 300 -
hungarian-pickup-points-for-woocommerce/trunk/index.php
r3435761 r3436729 8 8 Text Domain: vp-woo-pont 9 9 Domain Path: /languages/ 10 Version: 4.0. 110 Version: 4.0.2 11 11 WC requires at least: 7.0 12 12 WC tested up to: 10.4.3 … … 69 69 self::$plugin_basename = plugin_basename(__FILE__); 70 70 self::$plugin_path = trailingslashit(dirname(__FILE__)); 71 self::$version = '4.0. 1';71 self::$version = '4.0.2'; 72 72 self::$plugin_url = plugin_dir_url(self::$plugin_basename); 73 73 … … 328 328 $woocommerce_version = defined( 'WC_VERSION' ) ? WC_VERSION : '0.0.0'; 329 329 $dependencies = version_compare( $woocommerce_version, '10.3.0', '>=' ) ? array('jquery', 'wc-backbone-modal', 'wc-jquery-blockui', 'jquery-ui-sortable', 'wc-jquery-tiptip') : array('jquery', 'wc-backbone-modal', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-tiptip'); 330 $download_folders = VP_Woo_Pont_Helpers::get_download_folder(); 330 331 331 332 if( … … 354 355 'settings' => current_user_can( 'manage_woocommerce' ) ? wp_create_nonce( 'vp-woo-pont-settings' ) : null, 355 356 'tracking' => current_user_can( 'manage_woocommerce' ) ? wp_create_nonce( 'vp-woo-pont-tracking' ) : null, 356 ) 357 ), 358 'db_url' => $download_folders['url'] 357 359 ); 358 360 … … 399 401 'features' => VP_Woo_Pont_Helpers::get_enabled_features(), 400 402 'kvikk_map_api_key' => VP_Woo_Pont_Helpers::get_option('kvikk_map_api_key', ''), 403 'default_country' => WC()->customer && WC()->customer->get_billing_country() ? WC()->customer->get_billing_country() : WC()->countries->get_base_country(), 401 404 ); 402 405 -
hungarian-pickup-points-for-woocommerce/trunk/readme.txt
r3435761 r3436729 4 4 Requires at least: 6.0 5 5 Tested up to: 6.9 6 Stable tag: 4.0. 16 Stable tag: 4.0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 56 57 57 == Changelog == 58 59 4.0.2 60 * Kosárban csomagpont választó javítás, ha csak külföldi pontok vannak használva 61 * Kiválasztott pont cseréje javítás adminban 62 * Sameday pont import javítás 58 63 59 64 4.0.1
Note: See TracChangeset
for help on using the changeset viewer.