Call to undefined function wc_get_page_id()
-
Hi, we got a PHP Fatal error: Uncaught Error: Call to undefined function in /woodmart/inc/actions.php:457 which seems to be related to WooCommerce. We didn’t have WooCommerce on the website, but adding it fixed the php error. What could have caused it to all of a sudden run and crash the website?
Hello,
Please provide us with your admin access so we can log in and check this on your end.
Thank you in advance.
Well, can’t you explain what would trigger the code instead and why there isn’t a check for woocommerce before using wc_get_page_id?
We can’t explain this since we can’t reproduce it on our end. That is why we need to investigate this on your end.
We updated to the latest core and wpbakery which is causing the issue, this is the third website this has happened to within 24 hours…
Login info in extra info.
Deactivate woocommerce, clear cache and see the page without being logged in and you’ll see the issue. We just found 3 more websites with the issue. We can’t just keep installing woocommerce on pages that don’t need it.
Hello,
You can fix it by applying patch # 669793
. To do this, go to Dashboard -> WoodMart -> Patcher, find the corresponding patch and click on the “Apply” button. Let us know if it works for you.
Kind Regards