Problem with WooCommerce PDF Watermark

[ad_1]

Problem:

[24-Oct-2024 12:44:49 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
[24-Oct-2024 12:44:50 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().

The WooCommerce PDF Watermark plugin uses the deprecated get_product_from_item method, which has been replaced by the $item->get_product() method. The problem occurs in the file /home/znajdz/domains/zabawybeznudy.pl/public_html/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermark.php on line 95.

You use the method:
$product = $order->get_product_from_item($item);

Corect method:
$product = $item->get_product();

Thanks for answer.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer