Title: Update website &amp; Woocommerce
Last modified: March 17, 2021

---

# Update website & Woocommerce

 *  Resolved [AliaG](https://wordpress.org/support/users/aliag/)
 * (@aliag)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/)
 * Hi everyone.
 * Yesterday I had some problems with the DNS which now are fixed. However after
   that I started receiving some error messages. I fixed them by upgrading some 
   plugins.
    Now I am receiving this:
 * “Warning: sizeof(): Parameter must be an array or an object that implements Countable
   in /***/store/wp-content/plugins/woocommerce_2.3.11/includes/wc-conditional-functions.
   php on line 278
 * Warning: sizeof(): Parameter must be an array or an object that implements Countable
   in /***/htdocs/store/wp-content/plugins/woocommerce_2.3.11/includes/wc-conditional-
   functions.php on line 278
 *  Warning: sizeof(): Parameter must be an array or an object that implements Countable
   in /***/htdocs/store/wp-content/plugins/woocommerce_2.3.11/includes/wc-conditional-
   functions.php on line 278”
 * And this in the cart page when I add some product to the cart :
    “Warning: A 
   non-numeric value encountered in /***/htdocs/store/wp-content/plugins/woocommerce_2.3.11/
   includes/class-wc-cart.php on line 1078”
 * I am running WordPress 4.9.16, Woocommerce 2.3.11 (yeah, blame on me) and PHP
   7.2
    I suppose it’s time to an upgrade. Now, I’m afraid a complete jump to the
   newest Worpress and Wocommerce versions could be problematic, so what do you 
   sugget me to do? I see the oldest Woocommerce version available here in 3.0, 
   so I could start from that and move upwards when I see everything is fine? Also,
   I’m not sure, should I update worpress before woocommerce?
    -  This topic was modified 5 years, 1 month ago by [AliaG](https://wordpress.org/support/users/aliag/).
    -  This topic was modified 5 years, 1 month ago by [AliaG](https://wordpress.org/support/users/aliag/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fupdate-website-woocommerce%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [mother.of.code](https://wordpress.org/support/users/imazed/)
 * (@imazed)
 * The Mother of Code
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14194826)
 * Hi there!
 * I would recommend setting up a staging site. That’s a copy of your live site,
   so you can test things out without making changes to your actual site. Some hosting
   companies offer a staging site service within their hosting plans. If yours does
   not, there is a great free plugin that will allow you to build a complete staging
   site with a few button clicks: [https://wordpress.org/plugins/wp-staging](https://wordpress.org/plugins/wp-staging).
 * On that staging site, you can apply updates and see how your site responds. If
   there are any issues after doing the updates, you do not have to worry about 
   losing your site’s content. If there are no problems, you can safely update on
   your live site as well.
 * Hope that helps. Have a wonderful day ahead!
 *  Thread Starter [AliaG](https://wordpress.org/support/users/aliag/)
 * (@aliag)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14194889)
 * Thank you [@imazed](https://wordpress.org/support/users/imazed/) for your suggestion.
   
   Even on astagin website, should I update Worpress or Woocommerce before?
 * I just now tried to hide warnings, following [THIS](https://www.greengeeks.com/tutorials/article/disable-wordpress-php-error-messages/),
   but I had the following warning:
 * Warning: Use of undefined constant ‘display_errors’ – assumed ‘‘display_errors’’(
   this will throw an Error in a future version of PHP) in /***/store/wp-config.
   php on line 106
 * Warning: Use of undefined constant ’Off’ – assumed ‘’Off’’ (this will throw an
   Error in a future version of PHP) in /***/store/wp-config.php on line 106
 * Warning: Use of undefined constant ‘error_reporting’ – assumed ‘‘error_reporting’’(
   this will throw an Error in a future version of PHP) in /***/store/wp-config.
   php on line 107
 * Warning: Use of undefined constant ‘WP_DEBUG’ – assumed ‘‘WP_DEBUG’’ (this will
   throw an Error in a future version of PHP) in /***/store/wp-config.php on line
   108
 * Warning: Use of undefined constant ‘WP_DEBUG_DISPLAY’ – assumed ‘‘WP_DEBUG_DISPLAY’’(
   this will throw an Error in a future version of PHP) in /***/store/wp-config.
   php on line 109
 * Warning: Cannot modify header information – headers already sent by (output started
   at /***/store/wp-config.php:106) in /home/mhd-01/www.myoedizioni.it/htdocs/store/
   wp-content/plugins/qtranslate-xt-3.9.3/qtranslate_core.php on line 456
 * Any idea how to contain all this?
 * EDIT:
    I put the DEBUG line as it was originally, means “define(‘WP_DEBUG’, false);”
   now show us only the Woocommerce warnings again.
    -  This reply was modified 5 years, 1 month ago by [AliaG](https://wordpress.org/support/users/aliag/).
    -  This reply was modified 5 years, 1 month ago by [AliaG](https://wordpress.org/support/users/aliag/).
 *  Thread Starter [AliaG](https://wordpress.org/support/users/aliag/)
 * (@aliag)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14195099)
 * Since it may take a while for upgrading process, for the moment I was able to
   fix the problem of the code on line 278 following [THIS](https://stackoverflow.com/questions/59085116/warning-sizeof-parameter-must-be-an-array-or-an-object-that-implements-count)
 *  Thread Starter [AliaG](https://wordpress.org/support/users/aliag/)
 * (@aliag)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14198393)
 * After backing everything up I upgraded to Woocommerce 3.8 and all the problems
   fixed.
 *  [mother.of.code](https://wordpress.org/support/users/imazed/)
 * (@imazed)
 * The Mother of Code
 * [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14222106)
 * Hi there [@aliag](https://wordpress.org/support/users/aliag/) – thanks for letting
   us know! Happy to hear you were able to resolve the issue. Do feel free to open
   another thread if you need anything else!

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

The topic ‘Update website & Woocommerce’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [mother.of.code](https://wordpress.org/support/users/imazed/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/update-website-woocommerce/#post-14222106)
 * Status: resolved