Skip to content

Commit

Permalink
Prevents fatal error from occurring when calling the `get_total_tax_r…
Browse files Browse the repository at this point in the history
…efunded()` data store function. (#698)

* Fix fatal error when calculationg total tax refunded on a subscription

* add changelog entry
  • Loading branch information
mattallan authored Oct 14, 2024
1 parent e79943d commit b2687e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Fix - Correctly updates a subscription status to `cancelled` during a payment failure call when the current status is `pending-cancel`.
* Fix - Clear the `cancelled_email_sent` meta when a subscription is reactivated to allow the customer to receive future cancellation emails.
* Fix - Prevent deprecation notices after updating to WooCommerce 9.3.
* Fix - Prevent PHP fatal error that occurs when calculating the total tax refunded on a subscription.
* Dev - Only initialise the `WCS_WC_Admin_Manager` class on stores running WC 9.2 or older. This class handled integration with the Woo Navigation feature that was removed in WC 9.3.

= 7.5.0 - 2024-09-12 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function get_total_refunded( $subscription ) {
public function get_total_tax_refunded( $subscription ) {
$total = 0;

foreach ( $subscription->get_related_orders() as $order ) {
foreach ( $subscription->get_related_orders( 'all' ) as $order ) {
$total += parent::get_total_tax_refunded( $order );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function get_total_tax_refunded( $subscription ) {

$total = 0;

foreach ( $subscription->get_related_orders() as $order ) {
foreach ( $subscription->get_related_orders( 'all' ) as $order ) {
$total += parent::get_total_tax_refunded( $order );
}

Expand Down

0 comments on commit b2687e7

Please sign in to comment.