I was wondering what happened to my Woocommerce or something after I updated the plugin. Some deprecation error occurs. Kindly see attached image below. How can I solved this thing?
Asked
Active
Viewed 6,034 times
4

LoicTheAztec
- 229,944
- 23
- 356
- 399

John Warren Mondido Tañiza
- 81
- 1
- 14
2 Answers
6
1) You need to replace WC_Cart::get_checkout_url
it with wc_get_checkout_url()
instead, without using WC()->cart
(or WC_Cart::
) as it's not a WC_Cart method anymore.
2) For WC_Cart->fees
, you can replace it with WC_Cart->get_fees()
or WC()->cart->get_fees();

LoicTheAztec
- 229,944
- 23
- 356
- 399
-
Hi @LoicTheAztec, I tried using this as a solution, define( 'WP_DEBUG', false ); How is it? – John Warren Mondido Tañiza Oct 24 '17 at 07:05
-
Well, yes. Thanks. But one more thing, I need to locate those classes that uses these functions. Where can I locate these? – John Warren Mondido Tañiza Oct 24 '17 at 07:10
-
That is the problem because WordPress and Woocommerce is running already in its latest version. I had read some articles that it might because of some logs are not yet removed which triggers something like that. Is it possible? – John Warren Mondido Tañiza Oct 24 '17 at 07:21
-
alright. I'll try to locate what you suggested. Thanks a lot for the help! – John Warren Mondido Tañiza Oct 24 '17 at 07:32
0
In the page of source code https://docs.woocommerce.com/wc-apidocs/source-class-WC_Cart.html#636-645, you can see
/**
* Gets the url to the cart page.
*
* @deprecated 2.5.0 in favor to wc_get_cart_url()
*
* @return string url to page
*/
public function get_cart_url() {
return wc_get_cart_url();
}
Use the wc_get_cart_url().

Den
- 1
- 1