From 68b703cc9c7db3ddab8d8e5a0e1cb431803e69cb Mon Sep 17 00:00:00 2001 From: "Jorge A. Torres" Date: Fri, 2 Jun 2023 09:21:42 -0500 Subject: [PATCH] Fix dynamic prop declaration warning in cart code --- plugins/woocommerce/includes/class-wc-cart-totals.php | 7 +++++++ .../woocommerce/includes/legacy/class-wc-legacy-cart.php | 1 + 2 files changed, 8 insertions(+) diff --git a/plugins/woocommerce/includes/class-wc-cart-totals.php b/plugins/woocommerce/includes/class-wc-cart-totals.php index 2f54ee12a3f..d8c87bde43f 100644 --- a/plugins/woocommerce/includes/class-wc-cart-totals.php +++ b/plugins/woocommerce/includes/class-wc-cart-totals.php @@ -117,6 +117,13 @@ final class WC_Cart_Totals { 'discounts_total' => 0, ); + /** + * Cache of tax rates for a given tax class. + * + * @var array + */ + protected $item_tax_rates; + /** * Sets up the items provided, and calculate totals. * diff --git a/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php b/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php index 94a65443a38..d27ad35b2fa 100644 --- a/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php +++ b/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php @@ -18,6 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) { /** * Legacy cart class. */ +#[AllowDynamicProperties] abstract class WC_Legacy_Cart { /**