Title: get_options function is deprecated since version 3.1.PHP message
Last modified: June 9, 2022

---

# get_options function is deprecated since version 3.1.PHP message

 *  Resolved [tmatt345](https://wordpress.org/support/users/tmatt345/)
 * (@tmatt345)
 * [4 years ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/)
 * Hi there. I have downloaded and setup WP Optimize on my website. All is working
   well but when I want to edit a product in woocommerce, it lets me do it, but 
   when I want to view the product it kicks me out with this error in my hosting
   error log.
 * Got error ‘PHP message: The Automattic\\WooCommerce\\Admin\\API\\Options::get_options
   function is deprecated since version 3.1.PHP message: The Automattic\\WooCommerce\\
   Admin\\API\\Options::get_options function is deprecated since version 3.1.’
 * Or when I want to change a variation it gives me the above error. When I disable
   WP Optimize I don’t get the above error. I have WordPress version 5.8.3 and woocommerce
   version 6.5.1. How can I fix the issue.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15725096)
 * [@tmatt345](https://wordpress.org/support/users/tmatt345/) The changes have to
   be made in WP-Optimize core files, This will be fixed in next release.
 *  Plugin Contributor [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * (@webulous)
 * [4 years ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15731057)
 * Hi [@tmatt345](https://wordpress.org/support/users/tmatt345/)
 * From your message, I see that it is a PHP message, not error.
    Also, it is a 
   deprecation notice from `WooCommerce` plugin.
 * I understand that it happens only you have WP Optimize activated. By chance, 
   you have turned on debugging settings in WP Optimize? then it can happen
 *  Thread Starter [tmatt345](https://wordpress.org/support/users/tmatt345/)
 * (@tmatt345)
 * [4 years ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15731318)
 * Hi [@webulous](https://wordpress.org/support/users/webulous/)
 * Yes I have debugging switched on. Will switch it off and see if the problem resolves.
 * Many Thanks
 *  Thread Starter [tmatt345](https://wordpress.org/support/users/tmatt345/)
 * (@tmatt345)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15736193)
 * Thanks, now I am getting a different error the whole time while working anywhere
   on the site stating the following
 * “”Error establishing Database Connection
    This either means that the username
   and password information in your wp-config.php file is incorrect or we can’t 
   contact the database server at …. This could mean your host’s database server
   is down. * Are you sure have the correct username and password? * Are you sure
   you have typed the correct hostname? * Are you sure the database server is running?””
 * If I click on return then I can continue working but it is a pain
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15739503)
 * [@tmatt345](https://wordpress.org/support/users/tmatt345/) Please check the credentials
   used for database in wp-config.php file is same as that you have set on your 
   MySQL server.
 * Either case could be your MySQL server must be down, in this case also you see
   such error.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘get_options function is deprecated since version 3.1.PHP message’ is 
closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Harshad](https://wordpress.org/support/users/bornforphp/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/get_options-function-is-deprecated-since-version-3-1-php-message/#post-15739503)
 * Status: resolved