woocommerce_get_product_attributes is deprecated as of WC 3.0.5
-
Hi there!
I’ve been testing some WooCommerce upgrades on a site I manage and have been seeing a number of notices regarding the
woocommerce_get_product_attributes
hook showing up in my debug log.The only place I can find reference to this hook, in all of core, WC, my theme, and installed plugins, is in this plugin. Disabling it keeps the notices from happening.
Stack trace below, with full path removed for brevity. Doubt it’ll be helpful since it doesn’t even mention jumping into the plugin code. ??
[30-Apr-2017 15:53:28 UTC] PHP Notice: The "woocommerce_get_product_attributes" hook uses out of date data structures and is <strong>deprecated</strong> since version 3.0.5! Use woocommerce_product_get_attributes instead. in /wp-includes/functions.php on line 3830 [30-Apr-2017 15:53:28 UTC] PHP Stack trace: [30-Apr-2017 15:53:28 UTC] PHP 1. {main}() /index.php:0 [30-Apr-2017 15:53:28 UTC] PHP 2. require() /index.php:17 [30-Apr-2017 15:53:28 UTC] PHP 3. require_once() /wp-blog-header.php:19 [30-Apr-2017 15:53:28 UTC] PHP 4. include() /wp-includes/template-loader.php:74 [30-Apr-2017 15:53:28 UTC] PHP 5. the_content() /wp-content/themes/dcp/page.php:25 [30-Apr-2017 15:53:28 UTC] PHP 6. apply_filters() /wp-includes/post-template.php:240 [30-Apr-2017 15:53:28 UTC] PHP 7. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [30-Apr-2017 15:53:28 UTC] PHP 8. call_user_func_array:{/wp-includes/class-wp-hook.php:298}() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 9. do_shortcode() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 10. preg_replace_callback() /wp-includes/shortcodes.php:223 [30-Apr-2017 15:53:28 UTC] PHP 11. do_shortcode_tag() /wp-includes/shortcodes.php:223 [30-Apr-2017 15:53:28 UTC] PHP 12. call_user_func:{/wp-includes/shortcodes.php:345}() /wp-includes/shortcodes.php:345 [30-Apr-2017 15:53:28 UTC] PHP 13. WC_Shortcodes::checkout() /wp-includes/shortcodes.php:345 [30-Apr-2017 15:53:28 UTC] PHP 14. WC_Shortcodes::shortcode_wrapper() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:145 [30-Apr-2017 15:53:28 UTC] PHP 15. call_user_func:{/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:71}() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:71 [30-Apr-2017 15:53:28 UTC] PHP 16. WC_Shortcode_Checkout::output() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:71 [30-Apr-2017 15:53:28 UTC] PHP 17. WC_Shortcode_Checkout::order_received() /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php:61 [30-Apr-2017 15:53:28 UTC] PHP 18. wc_get_template() /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php:205 [30-Apr-2017 15:53:28 UTC] PHP 19. include() /wp-content/plugins/woocommerce/includes/wc-core-functions.php:204 [30-Apr-2017 15:53:28 UTC] PHP 20. do_action() /wp-content/plugins/woocommerce/templates/checkout/thankyou.php:74 [30-Apr-2017 15:53:28 UTC] PHP 21. WP_Hook->do_action() /wp-includes/plugin.php:453 [30-Apr-2017 15:53:28 UTC] PHP 22. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:323 [30-Apr-2017 15:53:28 UTC] PHP 23. call_user_func_array:{/wp-includes/class-wp-hook.php:298}() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 24. woocommerce_order_details_table() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 25. wc_get_template() /wp-content/plugins/woocommerce/includes/wc-template-functions.php:1827 [30-Apr-2017 15:53:28 UTC] PHP 26. include() /wp-content/plugins/woocommerce/includes/wc-core-functions.php:204 [30-Apr-2017 15:53:28 UTC] PHP 27. wc_get_template() /wp-content/plugins/woocommerce/templates/order/order-details.php:54 [30-Apr-2017 15:53:28 UTC] PHP 28. include() /wp-content/plugins/woocommerce/includes/wc-core-functions.php:204 [30-Apr-2017 15:53:28 UTC] PHP 29. wc_display_item_meta() /wp-content/plugins/woocommerce/templates/order/order-details-item.php:39 [30-Apr-2017 15:53:28 UTC] PHP 30. WC_Order_Item->get_formatted_meta_data() /wp-content/plugins/woocommerce/includes/wc-template-functions.php:2412 [30-Apr-2017 15:53:28 UTC] PHP 31. wc_attribute_label() /wp-content/plugins/woocommerce/includes/class-wc-order-item.php:190 [30-Apr-2017 15:53:28 UTC] PHP 32. WC_Product->get_attributes() /wp-content/plugins/woocommerce/includes/wc-attribute-functions.php:139 [30-Apr-2017 15:53:28 UTC] PHP 33. WC_Data->get_prop() /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:516 [30-Apr-2017 15:53:28 UTC] PHP 34. apply_filters() /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php:631 [30-Apr-2017 15:53:28 UTC] PHP 35. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [30-Apr-2017 15:53:28 UTC] PHP 36. call_user_func_array:{/wp-includes/class-wp-hook.php:298}() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 37. WC_Deprecated_Hooks->maybe_handle_deprecated_hook() /wp-includes/class-wp-hook.php:298 [30-Apr-2017 15:53:28 UTC] PHP 38. WC_Deprecated_Filter_Hooks->handle_deprecated_hook() /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-deprecated-hooks.php:60 [30-Apr-2017 15:53:28 UTC] PHP 39. WC_Deprecated_Hooks->display_notice() /wp-content/plugins/woocommerce/includes/class-wc-deprecated-filter-hooks.php:75 [30-Apr-2017 15:53:28 UTC] PHP 40. wc_deprecated_function() /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-deprecated-hooks.php:81 [30-Apr-2017 15:53:28 UTC] PHP 41. _deprecated_function() /wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php:48 [30-Apr-2017 15:53:28 UTC] PHP 42. trigger_error() /wp-includes/functions.php:3830
Thanks!!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘woocommerce_get_product_attributes is deprecated as of WC 3.0.5’ is closed to new replies.