Title: Version 7+ Deprecated Hook Issues
Last modified: June 24, 2026

---

# Version 7+ Deprecated Hook Issues

 *  [3yq9nfgnvh](https://wordpress.org/support/users/3yq9nfgnvh/)
 * (@3yq9nfgnvh)
 * [1 day, 14 hours ago](https://wordpress.org/support/topic/version-7-deprecated-hook-issues/)
 * I just updated to version 7 and am seeing critical errors when trying to print
   invoices. The issue appears to be the way that you used do_action_deprecated.
   You kept the hook name the same but changed how the arguments are passed. For
   instance, I am using the “wcdn_order_item_before” hook. Here’s what it looks 
   like in the base.php template file.
 * [https://cleanshot.com/share/t55z3Js8](https://cleanshot.com/share/t55z3Js8)
 * The same hook is running twice but with different arguments. The function I used
   previously treated the first argument as an object, not an array. So I switched
   it to treat it as an array. However, it still throws an error because the first
   instance of the hook that runs in do_action_deprecated expects it to be an object.
   The new hook needs to have a completely different name or users will have to 
   write some kind of conditional to detect if the passed variable is an object 
   or an array.
    -  This topic was modified 1 day, 14 hours ago by [3yq9nfgnvh](https://wordpress.org/support/users/3yq9nfgnvh/).
    -  This topic was modified 1 day, 14 hours ago by [3yq9nfgnvh](https://wordpress.org/support/users/3yq9nfgnvh/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [3yq9nfgnvh](https://wordpress.org/support/users/3yq9nfgnvh/)
 * (@3yq9nfgnvh)
 * [1 day, 14 hours ago](https://wordpress.org/support/topic/version-7-deprecated-hook-issues/#post-18947258)
 * In general, the new version is incredibly confusing in regards to the hooks. 
   Some passed variables are objects, some are arrays. Not sure why you changed 
   it, but it was nicer before when all the hook variables were the regular WooCommerce
   objects.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fversion-7-deprecated-hook-issues%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [3yq9nfgnvh](https://wordpress.org/support/users/3yq9nfgnvh/)
 * Last activity: [1 day, 14 hours ago](https://wordpress.org/support/topic/version-7-deprecated-hook-issues/#post-18947258)
 * Status: not resolved