Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Dec 20, 2023
2 parents e11fe2c + 3e730ab commit e72116d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions give.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.1
* Version: 3.2.2
* Requires at least: 6.0
* Requires PHP: 7.2
* Text Domain: give
Expand Down Expand Up @@ -391,7 +391,7 @@ private function setup_constants()
{
// Plugin version.
if (!defined('GIVE_VERSION')) {
define('GIVE_VERSION', '3.2.1');
define('GIVE_VERSION', '3.2.2');
}

// Plugin Root File.
Expand Down
2 changes: 1 addition & 1 deletion includes/forms/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ function give_get_default_form_shortcode_args() {
'show_content' => '',
'float_labels' => '',
'display_style' => '',
'continue_button_title' => __('Donate now', 'give'),
'continue_button_title' => '',

// This attribute belong to form template functionality.
// You can use this attribute to set modal open button background color.
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.1
Stable tag: 3.2.2
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -262,6 +262,10 @@ 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.2.2: Dec 20th, 2023 =
* Fix: Resolved an error on the donor details page when they have no donations
* Fix: Resolved an issue where the continue button setting was not being reflected on forms using legacy template

= 3.2.1: Dec 13th, 2023 =
* Fix: Resolved an issue that was duplicating the "Donate Now" button on legacy form template
* Fix: Resolved an issue that was preventing display options from being reflected on the form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public function render(array $attributes)

$viewUrl = $this->getViewUrl($donationForm, $embedId);
$formUrl = esc_url(add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms')));

$formUrl = add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms'));


/**
* Note: iframe-resizer uses querySelectorAll so using a data attribute makes the most sense to target.
* It will also generate a dynamic ID - so when we have multiple embeds on a page there will be no conflict.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class BlockAttributes implements Arrayable
public $openFormButton;

/**
* @since 3.2.2 add v3 default for form button.
* @since 3.0.0
*/
public static function fromArray(array $array): BlockAttributes
Expand All @@ -35,7 +36,7 @@ public static function fromArray(array $array): BlockAttributes
$self->formId = !empty($array['formId']) ? (int)$array['formId'] : null;
$self->blockId = !empty($array['blockId']) ? (string)$array['blockId'] : null;
$self->formFormat = !empty($array['formFormat']) ? (string)$array['formFormat'] : null;
$self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : null;
$self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : __('Donate now', 'give');

return $self;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function show(Donor $donor): string
}

/**
* @since 3.2.2 added array fallback when no donations are found
* @since 3.0.0
*
* @param Donor $donor
Expand All @@ -45,7 +46,7 @@ protected function getUniqueDonationFormsForDonor(Donor $donor): array
{
$formIds = array_map(static function (Donation $donation) {
return $donation->formId;
}, $donor->donations);
}, $donor->donations()->getAll() ?? []);

$formIds = array_filter($formIds, static function ($formId) {
return !give(DonationFormRepository::class)->isLegacyForm($formId);
Expand Down

0 comments on commit e72116d

Please sign in to comment.