From 83791add36aecf592c5eccd5c368a5b0b28a3fb9 Mon Sep 17 00:00:00 2001 From: Ante Laca Date: Fri, 3 Nov 2023 10:39:27 +0100 Subject: [PATCH 1/3] fix: title prefixes --- .../js/form-builder/src/blocks/fields/donor-name/Edit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx index c053e65200..1e8cf11c4f 100644 --- a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx +++ b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx @@ -23,7 +23,7 @@ export default function Edit({ }: BlockEditProps) { const [selectedTitle, setSelectedTitle] = useState(Object.values(honorifics)[0] as string ?? ''); - const [honorificOptions, setHonorificOptions] = useState(Object.keys(honorifics).map((token) => { + const [honorificOptions, setHonorificOptions] = useState(Object.values(honorifics).map((token) => { return { label: titleLabelTransform(token), value: titleValueTransform(token), From 06fda9b1f6e65460a1ab8ad8f02bb6b1d47fcc22 Mon Sep 17 00:00:00 2001 From: Paulo Iankoski Date: Fri, 3 Nov 2023 12:16:40 -0300 Subject: [PATCH 2/3] fix: type map callback function --- .../src/blocks/fields/donor-name/Edit.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx index 1e8cf11c4f..9209f6ea45 100644 --- a/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx +++ b/src/FormBuilder/resources/js/form-builder/src/blocks/fields/donor-name/Edit.tsx @@ -23,13 +23,15 @@ export default function Edit({ }: BlockEditProps) { const [selectedTitle, setSelectedTitle] = useState(Object.values(honorifics)[0] as string ?? ''); - const [honorificOptions, setHonorificOptions] = useState(Object.values(honorifics).map((token) => { - return { - label: titleLabelTransform(token), - value: titleValueTransform(token), - checked: selectedTitle === token, - } as OptionProps; - })); + const [honorificOptions, setHonorificOptions] = useState( + Object.values(honorifics).map((token: string) => { + return { + label: titleLabelTransform(token), + value: titleValueTransform(token), + checked: selectedTitle === token, + } as OptionProps; + }) + ); const setOptions = (options: OptionProps[]) => { setHonorificOptions(options); From e6fc2991a19b7414767c53e90928780220d86d2e Mon Sep 17 00:00:00 2001 From: Angela Blake <35241639+angelablake@users.noreply.github.com> Date: Fri, 3 Nov 2023 14:18:39 -0500 Subject: [PATCH 3/3] chore: prepare for 3.1.1 release --- give.php | 4 ++-- readme.txt | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/give.php b/give.php index ceaa4be3fe..8ea076fbab 100644 --- a/give.php +++ b/give.php @@ -6,7 +6,7 @@ * Description: The most robust, flexible, and intuitive way to accept donations on WordPress. * Author: GiveWP * Author URI: https://givewp.com/ - * Version: 3.1.0 + * Version: 3.1.1 * Requires at least: 6.0 * Requires PHP: 7.2 * Text Domain: give @@ -391,7 +391,7 @@ private function setup_constants() { // Plugin version. if (!defined('GIVE_VERSION')) { - define('GIVE_VERSION', '3.1.0'); + define('GIVE_VERSION', '3.1.1'); } // Plugin Root File. diff --git a/readme.txt b/readme.txt index 8f648a38d0..209b2eb6f3 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: donation, donate, recurring donations, fundraising, crowdfunding Requires at least: 6.0 Tested up to: 6.4 Requires PHP: 7.2 -Stable tag: 3.1.0 +Stable tag: 3.1.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -262,6 +262,9 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri 10. Use almost any payment gateway integration with GiveWP through our add-ons or by creating your own add-on. == Changelog == += 3.1.1: November 3rd, 2023 = +* Fix: Donor title prefixes are now formatted as strings (like Mr or Ms) instead of numbers. + = 3.1.0: October 25th, 2023 = * Feature: Design Mode changes in the Form Builder are now instant and awesome! Instant gratification! * Feature: Donor prefixes can now easily be reordered in the Donor Name block