Fix Deprecated dynamic property errors in php 8.2 (#44896)
The `\WC_Checkout::create_order_line_items` method assigns values to properties of the `WC_Order_Item_Product` class which did not exist. PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_values PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key Fixes #38857 --------- Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
This commit is contained in:
parent
bfa3ffb125
commit
b160cab657
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Make dynamic properties explicit in WC_Order_Item
|
|
@ -16,6 +16,21 @@ defined( 'ABSPATH' ) || exit;
|
|||
* Order item class.
|
||||
*/
|
||||
class WC_Order_Item extends WC_Data implements ArrayAccess {
|
||||
/**
|
||||
* Legacy cart item values.
|
||||
*
|
||||
* @deprecated 4.4.0 For legacy actions.
|
||||
* @var array
|
||||
*/
|
||||
public $legacy_values;
|
||||
|
||||
/**
|
||||
* Legacy cart item keys.
|
||||
*
|
||||
* @deprecated 4.4.0 For legacy actions.
|
||||
* @var string
|
||||
*/
|
||||
public $legacy_cart_item_key;
|
||||
|
||||
/**
|
||||
* Order Data array. This is the core order data exposed in APIs since 3.0.0.
|
||||
|
|
Loading…
Reference in New Issue