Closed mattallan closed 1 year ago
6572982-zen
A different merchant seeing a similar issue here: 6732938-zd-a8c
Deprecated: Return type of WCS_Array_Property_Post_Meta_Black_Magic::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/legacy/class-wcs-array-property-post-meta-black-magic.php on line 72
Reported internally: p1683089718053349-slack-C7U3Y3VMY
Describe the bug
A merchant running the latest WooCommerce Subscriptions and PHP 8.1 has reported the following logs:
I'm not familiar with the proper way of fixing these but I did notice WooCommerce Core addressed similar issues by adding
#[\ReturnTypeWillChange]
to the line above the function call.For example:
See their commit: https://github.com/woocommerce/woocommerce/commit/963eef02fa3c96762233ed0a93634d1a1eb559a4#diff-c71a0e842a830b116fa6f816a341df210799f54b88c8dd9c02420fffc635e37d