“woocommerce_add_order_item_meta” hook uses out of date data structures
-
plugin produces lots of warnings in the logs eg:
The “woocommerce_add_order_item_meta” hook uses out of date data structures and function is deprecated since version 3.1.2. Replace with woocommerce_new_order_item.
This is from:
add_action( 'woocommerce_add_order_item_meta', array( $this, 'woosb_add_order_item_meta' ), 10, 2 );
which should be modified to hook:
do_action( 'woocommerce_checkout_create_order_line_item', $item, $cart_item_key, $values, $order );
as per:
https://github.com/woocommerce/woocommerce/issues/13579The calls to wc_add_order_item_meta are ok so just the hook and function parameters would need updating.
- The topic ‘“woocommerce_add_order_item_meta” hook uses out of date data structures’ is closed to new replies.