WooCommerce Related Error: “get_options function is deprecated”
-
I am using PHP 8.2. In a fresh installed wordpress site, I installed woocommerce & configured it by its default wizard.
Then I found these error logs:
[02-Apr-2023 13:21:40 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
I guess this is due to using PHP 8.2
-
Hi @silumant ,
Thanks for reaching out!
I understand that you have encountered this notice on a fresh WordPress site with WooCommerce installed and PHP version 8.2, is this correct?
I have bumped my test site’s PHP version up to 8.2 (which runs the latest version of WordPress and WooCommerce) and am unable to reproduce the same notice you are seeing in your logs, on my end.
In order for us to have a better understanding of your sites current setup, would you please share a copy of the following:
- System Status Report: navigate to WooCommerce → Status. Select
Get system report
and thenCopy for support
. - Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.
Once you have these, please share them in your response here.
Cheers!
Thanks for replying @roxannestoltz . My server is a powerful VPS + C-panel + centos 7 (Will upgrade to AlmaLinux later) + lsip. Regarding me, I have some good tech knowledge related to woocommerce. As an entrepreneur, while creating woocommerce website I just follow respective docs/articles/videos & if required ask for support. Also my c-panel is not subordinating any mandatory plugins. I always install WP via softaculous and there are always 2 plugins (Akismet & hello dolly; but deactivated) + default 3 wp theme. So I guess this might be some temporary bugs in my system or in others.
Like you, I also tested again in fresh installation (using PHP 8.1 this time). I installed a theme (ohio premium theme from themeforest) & its required plugins. It required woocommerce & thus I configured it.
And unfortunately, I got similar repeat errors. (For few times only, not more. May be come in future as not tested much. I just configured Woo recently)
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.
[09-Apr-2023 01:16:28 UTC] The Automattic\WooCommerce\Admin\API\Options::get_options function is deprecated since version 3.1.Regarding what you asked for for debugging:
System Report: https://sharetext.me/uplyplsnde
Fatal Error log: There was none except a name test-log.log (& when I click view, nothing happen)What I think: Suspects are PHP 8.1 or 8.2; my server or latest version wordpress or woocommerce or God know??
Due to some frustrated past bad experience in breaking my website & then unable to solve them, I generally tend to worry/overthinking??</img> that these errors means something wrong in my website or it will cause some severe irreversible problem in future.
?So This is My New Real Most Important Question: In future, if not getting repeated errors, then can I just safely ignore such errors without any worry or overthinking like mentioned above? And keep doing my website works like configuring etc, This will save lots of my time.
Regards,
Deb??</img>- This reply was modified 1 year, 7 months ago by Mr. Deb.
Hi @silumant
Thank you for sharing the requested information above.
I understand how frustrating this can be.
For us to investigate this further, can you please try to switch to the default Storefront theme and only WooCommerce plugin is enabled and see if this works?
If so, then this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.
If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.
Let us know how it goes!
Thanks for replay @xue28 .
Initially I thought the main culprit is PHP 8.2; but I am getting it in PHP 8.1. Also you might be right about external theme/plugins causing this issue.
So regarding your debugging suggestions, I will do this later as I have very less time now (Busy in a major project). And following your suggestion is consume some hours of my time. So I will do it in free time & update you here.
In meantime, can you just assure me that I can safely ignore such deprecated warning errors without any worry or overthinking that it will cause some major problem in my website? If I can ignore now And keep doing my website works like configuring etc, This will save lots of my time. Also later I will follow your debugging instructions in my free time.
Hi @silumant
Initially I thought the main culprit is PHP 8.2; but I am getting it in PHP 8.1. Also you might be right about external theme/plugins causing this issue.
So regarding your debugging suggestions, I will do this later as I have very less time now (Busy in a major project). And following your suggestion is consume some hours of my time. So I will do it in free time & update you here.
Sounds like a plan! Let us know how the testing goes after! ??
In meantime, can you just assure me that I can safely ignore such deprecated warning errors without any worry or overthinking that it will cause some major problem in my website? If I can ignore now And keep doing my website works like configuring etc, This will save lots of my time. Also later I will follow your debugging instructions in my free time.
Deprecated functions are those that are no longer recommended for use and may be removed in future updates. It’s important to address this issue to ensure the smooth operation of your WooCommerce store. Since you’ve mentioned that you will address them later, I think this won’t hurt or affect your site majorly for the time being. However, please ensure to address them as soon as possible to avoid critical errors afterwards.
Thanks!
Thanks for reply @xue28
I recently found out that my premium theme is compatible with PHP 8.0 & not with PHP 8.1 or 8.2. Initially I desired to use PHP 8.2 thinking it will give best performance/speed. But now I have to use PHP 8.0.
So I guess this might be causing woocommerce related deprecated?errors. Am I right?
So if my assumption is correct, I have to use PHP 8.0. But before this I have one question.
So my question is:
Is performance (speed is my priority) of PHP 8.0 is almost similar to PHP 8.1 or 8.2. I know that updated PHP are better, but I think in overall performance; they are almost same. Am I right?
P.S:?After clearing about this PHP confusion, almost all my worry/overthinking will be cleared. I can use woocommerce without any worry??. And later upgrade my PHP when my theme became compatible with it.
Hi Deb ,
So I guess this might be causing woocommerce related deprecated?errors.?Am I right?
It is possible that using PHP 8.1 or 8.2 instead of PHP 8.0 might be causing these deprecated errors.
Is?performance?(speed is my priority) of?PHP 8.0?is almost similar to PHP 8.1 or 8.2. I know that updated PHP are better, but I think in overall performance; they are almost same.?Am I right?
PHP 8.0 is a stable and reliable version that offers good performance and speed. Although the newer versions of PHP may have some performance improvements, the difference is not significant enough to impact your website’s overall performance.
Hope this helps!
- System Status Report: navigate to WooCommerce → Status. Select
- The topic ‘WooCommerce Related Error: “get_options function is deprecated”’ is closed to new replies.