Error when use this woocommerce_order_item_product
-
Using this hook woocommerce_order_item_product return error
Fatal error: Uncaught Error: Call to undefined method WC_Order_Item_Product::needs_shipping() in /var/www/html/wp-content/themes/synergy/functions.php:193 Stack trace: #0 /var/www/html/wp-includes/class-wp-hook.php(308): recalculate_line_cost_us(Object(WC_Product_Variation), Object(WC_Order_Item_Product)) #1 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(WC_Product_Variation), Array) #2 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-order-item-product.php(338): apply_filters(‘woocommerce_ord…’, Object(WC_Product_Variation), Object(WC_Order_Item_Product)) #3 /var/www/html/wp-content/plugins/multiparcels-shipping-for-woocommerce/includes/class-mp-woocommerce-order-shipping.php(1681): WC_Order_Item_Product->get_product() #4 /var/www/html/wp-content/plugins/multiparcels-shipping-for-woocommerce/includes/class-mp-woocommerce-order-shipping.php(603): MP_Woocommerce_Order_Shipping->load_order(3873) #5 /var/www/html/wp-content/plugins/multiparcels-shipping-for-woocommerce/includes/class-mp-woocommerce.php(768): MP_Woocommerce_Order_Shipping->show_after_shipping_address_info(3873) #6 /var/www/html/wp-includes/class-wp-hook.php(308): MP_Woocommerce->woocommerce_admin_order_data_after_shipping_address(Object(Automattic\WooCommerce\Admin\Overrides\Order)) #7 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #8 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /var/www/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(566): do_action(‘woocommerce_adm…’, Object(Automattic\WooCommerce\Admin\Overrides\Order)) #10 /var/www/html/wp-admin/includes/template.php(1445): WC_Meta_Box_Order_Data::output(Object(WP_Post), Array) #11 /var/www/html/wp-admin/edit-form-advanced.php(688): do_meta_boxes(Object(WP_Screen), ‘normal’, Object(WP_Post)) #12 /var/www/html/wp-admin/post.php(206): require(‘/var/www/html/w…’) #13 {main} thrown in /var/www/html/wp-content/themes/synergy/functions.php on line 193
- The topic ‘Error when use this woocommerce_order_item_product’ is closed to new replies.