Product properties should not be accessed directly
-
Hello and thank you for your unique and excellent plugin
I used the product shortcode in the posts of the WordPress website, but I get such an error in the error file, please help me[31-Aug-2024 11:53:50 Asia/Tehran] PHP Notice: Function product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/jannah/single.php’), TIELABS_HELPER::get_template_part, include(‘/themes/jannah/templates/single-post/content.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::products, WC_Shortcode_Products->get_content, WC_Shortcode_Products->product_loop, wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-product.php’), do_action(‘woocommerce_after_shop_loop_item_title’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_loop_price, wc_get_template, include(‘/plugins/woocommerce/templates/loop/price.php’), WC_Product->get_price_html, apply_filters(‘woocommerce_get_price_html’), WP_Hook->apply_filters, lw_hid in /home2/…/domains/…./public_html/wp-includes/functions.php on line 6085
[31-Aug-2024 11:55:06 Asia/Tehran] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
- You must be logged in to reply to this topic.