[Support request] Notice: add_to_cart_redirect is deprecated since version 3.0.0! Use woocommerce_

Home Forums Support Notice: add_to_cart_redirect is deprecated since version 3.0.0! Use woocommerce_

This topic contains 7 replies, has 2 voices, and was last updated by  Leo 2 months, 1 week ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1200832


    Notice: add_to_cart_redirect is deprecated since version 3.0.0! Use woocommerce_add_to_cart_redirect instead public_html/wp-includes/functions.php on line 4924

    Notice: WC_Cart::get_checkout_url is deprecated since version 2.5! Use wc_get_checkout_url instead. public_html/wp-includes/functions.php on line 4648

    When i have wp-debug on, i get these errors. Also on phone customers are not able to order through woocommerce store. “Sorry, your session has expired. return to shop” notification has been created.

    Where can i change these? Woocommerce works fine on phone aswell if i change from child theme to main theme, but error still exists?

    When new generatepress will be updated to fix this issue?


    Leo Customer Support

    Hi there,

    Just to make sure, the error only happens when you are using a child theme?



    When parent theme is activated it still gives the error if debug log is on, but woocommerce checkout works ok. When child theme is activated checkout doesn’t work and debug log gives me the same error as it does on parent theme, but only difference here is that child themes checkout doesn’t work.


    Leo Customer Support

    For the add_to_cart_redirect, it doesn’t look like a GP error as GP only deals with the appearance side of things for WooCommerce and does not interfere with the functionality side.

    Do you get the error with all other plugins disabled?

    What if you switch to a twenty series WP theme?

    As for the child theme issue, by default the child theme is empty and just grabs the file from the parent theme. Can you temporarily disable the customs functions in your child theme to test?

    You can also download a blank one here to test as well.



    When switching from child theme to twenty theme everything worked ok. I’m pretty sure the problem lays in child theme functions.

    I’ll try to disable custom functions and get back.

    Could be some plugin aswell, but i don’t think this is the problem since most of the don’t have anything to do with woocommerce.


    Leo Customer Support

    Yup start with your child theme functions first.

    Then try disabling the plugins.

    It’s very unlikely that it’s a GP problem.



    Found the problem. It’s somewhere in child theme functions.php.

    I checked this by deleting everything from child functions.php and copying them on notepad. The problem was gone once everything was deleted, but when i added custom functions.php back problem still existed.

    I’ll try to locate tommorow which part of the php code is causing this.

    Thanks 🙂


    Leo Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.