Deprecated Error Woocommerce
-
Hi,
The deprecated error – ‘woocommerce_add_order_item_meta is deprecated since version 3.0.0! Use woocommerce_new_order_item instead.’,
I replaced woocommerce_add_order_item_meta with woocommerce_new_order_item.We are using some basic coding to insert order items to the order meta table
– https://prnt.sc/Yac6aH4p35Ys
– https://prnt.sc/RN8h5fo10VrFThis is working in ‘woocommerce_add_order_item_meta’ but not in ‘woocommerce_new_order_item’.
The meta items not inserting into the table.
Since this creates error, how to fix ??? What is the alternative hook to replace in Woocmmerce 6.6 version?Note: This error is showing after the Woo 6.6. upgrade
The other deprecated and fatal error also showing. (listed below) how to fix? anyone?[23-Nov-2022 15:01:26 UTC] ID was called incorrectly. Product properties should not be accessed directly. Backtrace: do_action('wp_ajax_nopriv_loadmoreProducts'), WP_Hook->do_action, WP_Hook->apply_filters, loadmore_ajax_products, wc_get_template_part, load_template, require('/themes/solief/resources/woocommerce/content-product.php'), WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0. [23-Nov-2022 17:16:18 UTC] id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, SkyVerge\WooCommerce\PluginFramework\v5_6_1\SV_WC_Payment_Gateway_Direct->process_payment, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_changed'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Subscriptions_Order::maybe_record_subscription_payment, WC_Subscription->payment_complete_for_order, do_action('woocommerce_subscription_payment_complete'), WP_Hook->do_action, WP_Hook->apply_filters, on_successful_subscription, Api\Donation\Add->__construct, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [23-Nov-2022 17:16:18 UTC] customer_message was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, SkyVerge\WooCommerce\PluginFramework\v5_6_1\SV_WC_Payment_Gateway_Direct->process_payment, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_changed'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Subscriptions_Order::maybe_record_subscription_payment, WC_Subscription->payment_complete_for_order, do_action('woocommerce_subscription_payment_complete'), WP_Hook->do_action, WP_Hook->apply_filters, on_successful_subscription, Api\Donation\Add->__construct, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0. [23-Nov-2022 17:16:21 UTC] order was called incorrectly. Subscription properties should not be accessed directly as WooCommerce 3.0 no longer supports direct property access. Use WC_Subscription::get_parent() instead. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, SkyVerge\WooCommerce\PluginFramework\v5_6_1\SV_WC_Payment_Gateway_Direct->process_payment, WC_Order->payment_complete, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_changed'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Subscriptions_Order::maybe_record_subscription_payment, WC_Subscription->payment_complete_for_order, do_action('woocommerce_subscription_payment_complete'), WP_Hook->do_action, WP_Hook->apply_filters, on_successful_subscription, WC_Subscription->__get, wcs_doing_it_wrong, wc_doing_it_wrong. This message was added in version 2.2.0. [23-Nov-2022 17:16:21 UTC] user_id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, SkyVerge\WooCommerce\PluginFramework\v5_6_1\SV_WC_Payment_Gateway_Direct->process_payment, do_action('wc_payment_gateway_authorize_net_cim_credit_card_payment_processed'), WP_Hook->do_action, WP_Hook->apply_filters, {closure}, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
Thanks.
The page I need help with: [log in to see the link]
- The topic ‘Deprecated Error Woocommerce’ is closed to new replies.