[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_

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

    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?

    #1200865
    Leo
    Staff
    Customer Support

    Hi there,

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

    #1200919
    Henrik

    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.

    #1200930
    Leo
    Staff
    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.
    https://docs.generatepress.com/article/using-child-theme/#installing-a-child-theme

    #1201061
    Henrik

    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.

    #1201089
    Leo
    Staff
    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.

    #1201108
    Henrik

    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 🙂

    #1201110
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.