WC_Abstract_Legacy_Order::get_product_from_item is deprecated since version 4.4.
-
Hello, i have a problem on my checkoutpage.
The problem is
WC_Abstract_Legacy_Order::get_product_from_item is deprecated since version 4.4.0! Use $item->get_product() instead. in?/home/asapchip/public_html/wp-includes/functions.php?on line?6031
Notice: Function id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/elementor/modules/page-templates/templates/canvas.php’), Elementor\Modules\PageTemplates\Module->print_content, call_user_func, Elementor\Modules\PageTemplates\Module->print_callback, the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, Elementor\Frontend->apply_builder_in_content, Elementor\Frontend->get_builder_content, Elementor\Core\Base\Document-bla, bla, bla …….
I found the file Abstract_Legacy_Order
public function get_product_from_item( $item ) { wc_deprecated_function( 'WC_Abstract_Legacy_Order::get_product_from_item', '4.4.0', '$item->get_product()' ); if ( is_callable( array( $item, 'get_product' ) ) ) { $product = $item->get_product(); } else { $product = false; } return apply_filters( 'woocommerce_get_product_from_item', $product, $item, $this );
But how can i fix it!!!
The page I need help with: [log in to see the link]
- The topic ‘WC_Abstract_Legacy_Order::get_product_from_item is deprecated since version 4.4.’ is closed to new replies.