Hello,
I have the following issue: no matter what I do, I get a constant wc_get_cart_url() related error from the Klaviyo WooCommerce module and the error log reads:
PHP message: PHP Fatal error: Uncaught Error: Call to undefined function wc_get_cart_url() in /wp-content/plugins/klaviyo/includes/wck-cart-functions.php:94
Has anybody seen something like this?
Thanks!
Hi
Sorry to hear you’re having trouble with the Klaviyo plugin. Can you please tell me what version of Klaviyo’s plugin you have installed? Additionally, what version of Woocommerce? Are you using Wordpress’ multisite feature?
Best,
Scott
Helo
So, I am running a multisite on WordPress 5.7, WooCommerce 5.1.0. and Klaviyo plugin v. 2.4.0 - but the problem is even before that, honestly speaking - since for ever.
Thanks
Best,
Scott
Hi
Thank you for posting your question to the Klaviyo Community and thank you Scott for looking into this.
Thanks and have a great day.
Sure thing, yes, sorry for not responding earlier.
So, based on Scott’s help, we added a checked whether the wc_get_cart_url() is actually defined (we know it is, yet sometimes it seems it is not recognized) . This stopped the errors, and yet - everything is functioning properly.
The edit is in wck-cart-functions.php, line 88:
if ( is_admin() || ! function_exists( 'wc_get_cart_url' ) ) { return; }
Reply
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.