Home › Forums › Support › Notice: add_to_cart_redirect is deprecated since version 3.0.0! Use woocommerce_
- This topic has 7 replies, 2 voices, and was last updated 4 years, 1 month ago by Leo.
-
AuthorPosts
-
March 20, 2020 at 9:31 am #1200832Henrik
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?
March 20, 2020 at 10:11 am #1200865LeoStaffCustomer SupportHi there,
Just to make sure, the error only happens when you are using a child theme?
March 20, 2020 at 11:15 am #1200919HenrikWhen 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.
March 20, 2020 at 11:27 am #1200930LeoStaffCustomer SupportFor 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-themeMarch 20, 2020 at 3:06 pm #1201061HenrikWhen 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.
March 20, 2020 at 4:16 pm #1201089LeoStaffCustomer SupportYup start with your child theme functions first.
Then try disabling the plugins.
It’s very unlikely that it’s a GP problem.
March 20, 2020 at 4:34 pm #1201108HenrikFound 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 ๐
March 20, 2020 at 4:36 pm #1201110LeoStaffCustomer SupportGlad to hear ๐
-
AuthorPosts
- You must be logged in to reply to this topic.