diff --git a/includes/shortcodes.php b/includes/shortcodes.php index a4fc5e3ac1..4ca730ccb8 100644 --- a/includes/shortcodes.php +++ b/includes/shortcodes.php @@ -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;