After updating to PHP 8.2 there are a number of warnings coming from Subscriptions Core files:
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_Completed_Renewal_Order::$heading_downloadable is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-completed-renewal-order.php on line 38
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_Completed_Renewal_Order::$subject_downloadable is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-completed-renewal-order.php on line 40
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_Completed_Switch_Order::$heading_downloadable is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-completed-switch-order.php on line 38
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_Completed_Switch_Order::$subject_downloadable is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-completed-switch-order.php on line 39
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_New_Switch_Order::$subscriptions is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-new-switch-order.php on line 95
[13-Oct-2023 02:38:45 UTC] PHP Deprecated: Creation of dynamic property WCS_Email_Completed_Switch_Order::$subscriptions is deprecated in /Users/matt/local/woo/wp-content/plugins/woocommerce-subscriptions-core/includes/emails/class-wcs-email-completed-switch-order.php on line 99
Fixes #325
Description
After updating to PHP 8.2 there are a number of warnings coming from Subscriptions Core files:
The
$heading_downloadable
and$subject_downloadable
parameters were removed in WooCommerce 3.1 (see https://github.com/woocommerce/woocommerce/commit/adc679633bdb627bbebab5c0f537e5dad856ca4e) so I've opted to deprecate and remove these parameters but maintain backward compatibility using__get()
function.How to test this PR
WP_DEBUG
trunk
you will see the above warningssubscriptions-core
Product impact