• This error appears continuously in the logs.

    
    Notice: WC_Product::get_parent is deprecated1 since version 3.0! Use WC_Product::get_parent_id instead. in /home/vinda/www/pruebas/wp-includes/functions.php on line 4648
    

    I have the following versions:
    Wordpress versión 5.3.2
    Woocommerce Versión 3.9.3
    If I do a search of the string “WC_Product :: get parent” in all the files, I get the following results:

    www\pruebas\wp-content\pluggins\woocommerce\includes\legacy\abstract-wc-legacy-product.php (Line 417)
    This line is te code:

    
    /**
    * Get the parent of the post.
    *
    * @deprecated 3.0.0
    * @return int
    */
    public function get_parent() {
    wc_deprecated_function( ‘WC_Product::get_parent’, ‘3.0’, ‘WC_Product::get_parent_id’ );
    return apply_filters( ‘woocommerce_product_parent’, absint( $this->get_post_data()->post_parent ), $this );
    
    • This topic was modified 4 years, 12 months ago by Yui. Reason: please use CODE button for code formatting
    • This topic was modified 4 years, 12 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not a Requests and Feedback topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Yui

    (@fierevere)

    永子

    make sure you have updated your theme and all woocommerce related plugins

    Thread Starter javierlinares

    (@javierlinares)

    I already have updated all the plugins and themes. But the error persists.

    The error doesn’t have to be with WC_Product::get_parent. It’s a lot more likely to be from a call to something like this $product->get_parent(), so I’d recommend searching for ‘->get_parent’ instead as that should give you an idea of where that’s used. Just be aware that it will occur in a fair few places.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘This error appears continuously in the logs.’ is closed to new replies.