When I simply use this shortcode in a product page : echo do_shortcode(‘[related_products limit=”3″ columns=”3″]’); I get the following error line on my web page: Notice: WC_Product::get_related is deprecated since version 3.0! Use wc_get_related_products instead.
Why ? Or how can I fix this without touching the shortcode itself? Thanks a lot.
The three products that are displayed at the bottom of the page are from the following shortcode: do_shortcode('[related_products limit="3" columns="3"]');
To see and display the possible errors, I use a Query String. In my wp-config.php file, I have integrated this :
I tried WP Staging but I have a problem with it because it doesn’t take into account images that are outside /wp-content/uploads: “We are already working on an update for WP STAGING to support custom folders like this.” https://wp-staging.com/docs/no-images-are-visible-on-staging-site/
So, it blocks and doesn’t want to create a site.
Anyway, I’ll try later with Storefront but I need to make a copy first, change the theme on this one and reapply my child theme. So later on, it’s not very serious either.
In any case, thank you for your support on this issue
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘related_products shortcode error line’ is closed to new replies.