InMotion Hosting Support Center

WooCommerce Division by zero


Carol La Rock
Asked:
2016-06-18 9:28 am EST

Hits: 698
I have the error message "Warning: Division by zero in /home/larock5/public_html/blahblah.com/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 250 " showing on my product page. It is on a child theme as disappears when activate the parent. New to this and setting up my first websites, constructing two both with the same child theme, error is only on the one with wordpress version 2.6. First one with w p version 2.5.5 is fine, please can anyone advise how to get rid of this ugly message!

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

scott
Staff
43,761 Points
2016-06-20 9:09 am EST
Hello Carol La Rock,

Thank you for your question on removing the warning message in WooCommerce. If the rest of the page is fine (meaning the prices and everything are correct) and the only thing wrong is the warning message, you can change your settings to suppress it.

This is done in the php.ini file. You will want to set the error reporting to remove the warning messages by adding the following code to the current error reporting setting:
~E_WARNING

So, for instance, if your current setting is:
error_reporting = E_ALL & ~E_NOTICE
Then change it to read as follows:
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING

Kindest Regards,
Scott M

You must login before you can post a comment about this answer.

Hello Scott, thank you for your help, did manage to get round it in the end by deactivating woo commerce and installing an earlier version. Very much appreciate your answer for future reference, Best regards Carol
Carol La Rock
8 Points
2016-06-30 8:06 am EST
Hey Scott, I tried what you recommend to Carol and I'm still the same error. I'm using Genesis Framework, Restored 316 Designs Market Theme, WooCommerce and the WooCommerce Product Archive Customizer.
aroomwithavue
3 Points
2016-07-05 10:36 pm EST
Hello Aroomwithavue,

Sorry for the problem with the error. It appears that Carol La Rock resolved the issue an earlier version. So it appears to be application specific. I recommend speaking with the WooCommerce support team to resolve your issue as they can step through their plugin code to provide a fix for this problem.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
Arn
42,973 Points
Staff
2016-07-06 3:55 pm EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!