Skip to content

Commit

Permalink
Fix: resolve give_totals fatal error when using multiple form IDs (#7456
Browse files Browse the repository at this point in the history
)

Co-authored-by: Jon Waldstein <[email protected]>
  • Loading branch information
jonwaldstein and Jon Waldstein authored Jul 23, 2024
1 parent 831ed6d commit f898906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ static function ($id) {

if ( isset( $forms->posts ) ) {
$total = 0;
$query = new DonationQuery();
foreach ( $forms->posts as $post ) {
$query = new DonationQuery();
$form_earning = $query->form($post)->sumAmount();
$form_earning = ! empty( $form_earning ) ? $form_earning : 0;

Expand Down

0 comments on commit f898906

Please sign in to comment.