Plugin Directory

Changeset 3417851


Ignore:
Timestamp:
12/12/2025 03:02:59 AM (4 months ago)
Author:
fantasyworld
Message:

update 2.1.11

Location:
ry-wc-city-select/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ry-wc-city-select/trunk/assets-src/ry-city-select.js

    r3412724 r3417851  
    9797                }
    9898            } else {
    99                 disableCity($citybox);
     99                cityToInput($citybox);
    100100            }
    101101        } else {
  • ry-wc-city-select/trunk/assets/ry-city-select.asset.php

    r3412724 r3417851  
    1 <?php return array('dependencies' => array('jquery'), 'version' => '3e9645b9ebe8f14c71e8');
     1<?php return array('dependencies' => array('jquery'), 'version' => '5e63f8915f53f8596131');
  • ry-wc-city-select/trunk/assets/ry-city-select.js

    r3412724 r3417851  
    1 (()=>{"use strict";window.jQuery,jQuery(function(t){if("undefined"==typeof wc_country_select_params||"undefined"==typeof ry_wc_city_select_params)return!1;if(t().selectWoo){const e=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){const e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){const e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},n=function(){t("select.city_select:visible").each(function(){const n=t.extend({placeholder:t(this).attr("data-placeholder")||t(this).attr("placeholder")||"",width:"100%"},e());t(this).on("select2:select",function(){t(this).trigger("focus")}).selectWoo(n)})};n(),t(document.body).on("city_to_select",function(){n()})}function e(e){if(e.is("input"))return void e.prop("disabled",!1);const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t('<input type="text">');o.prop("id",c).prop("name",n).prop("placeholder",i).addClass("input-text"),e.parent().find(".select2-container").remove(),e.replaceWith(o),t("#"+c).closest(".form-row").parent().find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}t(document.body).on("country_to_state_changing",function(e,n,c){const i=c.find("#billing_state, #shipping_state, #calc_shipping_state").val();t(document.body).trigger("state_changing",[n,i,c])}),t(document.body).on("change","select.state_select, #calc_shipping_state",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_country, #shipping_country, #calc_shipping_country").val(),c=t(this).val();t(document.body).trigger("state_changing",[n,c,e])}),t(document.body).on("state_changing",function(n,c,i,o){const s=o.find("#billing_city, #shipping_city, #calc_shipping_city");ry_wc_city_select_params.cities[c]?i?ry_wc_city_select_params.cities[c][i]?function(e,n){const c=e.val();if(e.is("input")){const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t("<select></select>");o.prop("id",c).prop("name",n).data("placeholder",i).addClass("city_select"),e.replaceWith(o),e=t("#"+c)}else e.prop("disabled",!1);e.empty();for(const c in n)if(n.hasOwnProperty(c)){const i=t("<option></option>");let o;n[c]instanceof Array?(o=n[c][0],i.attr("data-postcode",n[c][1])):o=n[c],i.prop("value",o).text(o),e.append(i)}let i=e.find('option[value="'+c+'"]');i.length?i.prop("selected",!0):e.find("option:first").prop("selected",!0),e.trigger("change"),t(document.body).trigger("city_to_select")}(s,ry_wc_city_select_params.cities[c][i]):e(s):function(t){t.val("").trigger("change"),t.prop("disabled",!0)}(s):e(s)}),t(document.body).on("change","select.city_select",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_city, #shipping_city, #calc_shipping_city").find(":selected").data("postcode");void 0!==n?e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val(n):e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}),t(".cart-collaterals").length&&t("#calc_shipping_state").length&&new MutationObserver(function(){t("#calc_shipping_state").trigger("change")}).observe(document.querySelector(".cart-collaterals"),{childList:!0})})})();
     1(()=>{"use strict";window.jQuery,jQuery(function(t){if("undefined"==typeof wc_country_select_params||"undefined"==typeof ry_wc_city_select_params)return!1;if(t().selectWoo){const e=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){const e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){const e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},n=function(){t("select.city_select:visible").each(function(){const n=t.extend({placeholder:t(this).attr("data-placeholder")||t(this).attr("placeholder")||"",width:"100%"},e());t(this).on("select2:select",function(){t(this).trigger("focus")}).selectWoo(n)})};n(),t(document.body).on("city_to_select",function(){n()})}t(document.body).on("country_to_state_changing",function(e,n,c){const i=c.find("#billing_state, #shipping_state, #calc_shipping_state").val();t(document.body).trigger("state_changing",[n,i,c])}),t(document.body).on("change","select.state_select, #calc_shipping_state",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_country, #shipping_country, #calc_shipping_country").val(),c=t(this).val();t(document.body).trigger("state_changing",[n,c,e])}),t(document.body).on("state_changing",function(e,n,c,i){const o=i.find("#billing_city, #shipping_city, #calc_shipping_city");ry_wc_city_select_params.cities[n]&&c&&ry_wc_city_select_params.cities[n][c]?function(e,n){const c=e.val();if(e.is("input")){const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t("<select></select>");o.prop("id",c).prop("name",n).data("placeholder",i).addClass("city_select"),e.replaceWith(o),e=t("#"+c)}else e.prop("disabled",!1);e.empty();for(const c in n)if(n.hasOwnProperty(c)){const i=t("<option></option>");let o;n[c]instanceof Array?(o=n[c][0],i.attr("data-postcode",n[c][1])):o=n[c],i.prop("value",o).text(o),e.append(i)}let i=e.find('option[value="'+c+'"]');i.length?i.prop("selected",!0):e.find("option:first").prop("selected",!0),e.trigger("change"),t(document.body).trigger("city_to_select")}(o,ry_wc_city_select_params.cities[n][c]):function(e){if(e.is("input"))return void e.prop("disabled",!1);const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t('<input type="text">');o.prop("id",c).prop("name",n).prop("placeholder",i).addClass("input-text"),e.parent().find(".select2-container").remove(),e.replaceWith(o),t("#"+c).closest(".form-row").parent().find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}(o)}),t(document.body).on("change","select.city_select",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_city, #shipping_city, #calc_shipping_city").find(":selected").data("postcode");void 0!==n?e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val(n):e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}),t(".cart-collaterals").length&&t("#calc_shipping_state").length&&new MutationObserver(function(){t("#calc_shipping_state").trigger("change")}).observe(document.querySelector(".cart-collaterals"),{childList:!0})})})();
  • ry-wc-city-select/trunk/languages/ry-wc-city-select.pot

    r3412724 r3417851  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: RY City Select for WooCommerce 2.1.10\n"
     5"Project-Id-Version: RY City Select for WooCommerce 2.1.11\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ry-wc-city-select\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-12-06T11:25:16+08:00\n"
     12"POT-Creation-Date: 2025-12-12T10:57:08+08:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
  • ry-wc-city-select/trunk/readme.txt

    r3412724 r3417851  
    33Donate link: https://www.paypal.me/RicherYang
    44Tags: woocommerce, city, select, dropdown
    5 Requires at least: 6.6
     5Requires at least: 6.7
    66Requires PHP: 8.0
    7 Tested up to: 6.8
    8 Stable tag: 2.1.10
     7Tested up to: 6.9
     8Stable tag: 2.1.11
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.txt
     
    9191== Changelog ==
    9292
    93 = 2.1.10- 2025/12/06 =
     93= 2.1.11 - 2025/12/07=
     94* Fixed - When country change maybe set error city info.
     95
     96= 2.1.10 - 2025/12/06 =
    9497* Change - when user change state auto-select first city.
    9598* Change - city required info to WooCommerce (Version 10.3) html tage style.
  • ry-wc-city-select/trunk/ry-wc-city-select.php

    r3412724 r3417851  
    55 * Plugin URI: https://ry-plugin.com/ry-wc-city-select
    66 * Description: Show a dropdown select as the cities input on WooCommerce. Auto set the postcode for selected city.
    7  * Version: 2.1.10
     7 * Version: 2.1.11
    88 * Requires at least: 6.7
    99 * Requires PHP: 8.0
     
    1919function_exists('plugin_dir_url') or exit('No direct script access allowed');
    2020
    21 define('RY_WCS_VERSION', '2.1.10');
     21define('RY_WCS_VERSION', '2.1.11');
    2222define('RY_WCS_PLUGIN_URL', plugin_dir_url(__FILE__));
    2323define('RY_WCS_PLUGIN_DIR', plugin_dir_path(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.