Replies: 0
I get the following error in my error log related to depreciated WooCommerce functions…
The WC_Product::get_post_data function is deprecated since version 3.0. Replace with get_post.
I searched all the files of my site and found that this function is used in your plugin in lines 404 and 529 of…
E:\Chris\Web Resources\!TPV Plugins\wp-content\plugins\advanced-woo-search-pro\includes\class-aws-search.php:
402 $product = new WC_product( $post_id );
403
404: $post_data = $product->get_post_data();
405
406 $title = $product->get_title();
…
527 $default_img = $this->get_common_settings( ‘default_img’ );
528
529: $post_data = $product->get_post_data();
530 $post_id = $post_data->ID;
So I went ahead and changed it to get_post like the error suggests I do but it broke the plugin. It made it no longer able to populate search results when using the search boxes on my site.
I am using the Pro Version of your plugin Version 1.00.
Thanks,