Fatal Error Cannot Redeclare Class Zones
Contents |
class WC_Shipping_Zones in /home/upfrontr/public_ [Resolved] Fatal error: Cannot redeclare class WC_Shipping_Zones in /home/upfrontr/public_ kelly.littleton @kellylittleton 4 months ago Hi, This fatal error cannot redeclare class php killed my website: Fatal error: Cannot redeclare class WC_Shipping_Zones in woocommerce table rate shipping /home/upfrontr/public_html/wp-content/plugins/woocommerce/includes/class-wc-shipping-zones.php on line 17 How can I fix this problem? Thanks very much! Kelly https://wordpress.org/plugins/woocommerce/ Viewing woocommerce login 15 replies - 1 through 15 (of 23 total) 1 2 → Plugin Author Mike Jolley @mikejolley 4 months ago Did you forget to update
Woogang
Table Rate Shipping first? There would have been a warning on the plugin update screen. Rename the table rate shipping plugin via FTP so it's disabled. Then you can get into admin and update it. kelly.littleton @kellylittleton 4 months ago There wasn't a warning to update the Table Rate. The only woothemes warning I saw was to update the plugin. I have since saved the Table Rate Shipping, but that did not repair the problem. Plugin Author Mike Jolley @mikejolley 4 months ago Table Rate Shipping 2.x needs updating to 3.0.0 for compatibility reasons. There is a red warning below the woocommerce update itself. You can download the update from your woothemes account manually if you want to do it that way. ffpete @ffpete 4 months ago I'm having the same issue. All my plugins are up to date. Please advise? Thanks! Plugin Author Mike Jolley @mikejolley 4 months ago ffpete, if you're seeing the same issue, your plugins are not up to date for the same reason as above. ffpete @ffpete 4 months ago Fixed. mytasksitepm @mytasksitepm 4 months ago I got the same error but I do not have the Table Rate Shipping Plugin Installed…help? mytasksitepm @mytasksitepm 4 months ago ok
Table Rate Shipping Plugin Woocommerce 2.6 update conflict with Table Rate Shipping Plugin mallusa @mallusa 3 months, 3 weeks ago I was excited about the 2.6 update until I completed the process and learned that my website is now hosed and unable to take orders. We have to be able to process orders and restore things quickly and really don't want to move to another platform. We already had the Table Rate Shipping plugin active on our site and when we performed the 2.6 update process it brought the site down and displayed the following message instead of the home page "Fatal error: Cannot redeclare class https://wordpress.org/support/topic/fatal-error-cannot-redeclare-class-wc_shipping_zones-in-homeupfrontrpublic_/ WC_Shipping_Zones in /home2/kb7zxn/public_html/mallusa.biz/wp-content/plugins/woocommerce/includes/class-wc-shipping-zones.php on line 17" When I finally isolated the problem to the Table Rate Shipping plugin I immediately disabled it and the site came back up. However, now the problem is that whenever you try to continue from checkout to payment, you are not able to continue and give an error message stating that you must select a shipping method, and no shipping method options are https://wordpress.org/support/topic/woocommerce-26-update-conflict-with-table-rate-shipping-plugin/ even showing or available to select. Further, we have not set up shipping method options and only provide a specific flat rate amount for each product, We would appreciate an immediate solution as it is very costly for us not to have the ability to process orders online and we really don't want to move to a different ecommerce platform. This is the one time that I did not follow our usual backup protocol and am paying for it dearly. Hope you can come up with a better solution than forcing us to pay $99 for a plugin upgrade. Thanks for your help. Webgsite: http://mallusa.biz https://wordpress.org/plugins/woocommerce/ Viewing 15 replies - 1 through 15 (of 23 total) 1 2 → Plugin Contributor Caleb Burks @icaleb 3 months, 3 weeks ago Hi mallusa, Table Rate Shipping needed to be updated before updating WooCommerce to 2.6. This was mentioned in a couple of places, including in this notice: http://cld.wthms.co/E2Az/3HIV4j7m Do you have a backup of the site you can fallback too? If not, you'll just need to install the newest version of Table Rate shipping now and create your Table Rates inside of the new shipping zones. Plugin Author Mike Jolley @mikejolley 3 month
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/708140/php-fatal-error-cannot-redeclare-class Business Learn more about hiring developers or posting ads with us Stack Overflow Questions https://github.com/woothemes/woocommerce/issues/7399 Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Fatal error: Cannot redeclare class up vote 120 down vote favorite 11 Does anyone know what can cause this problem? cannot redeclare PHP Fatal error: Cannot redeclare class php share|improve this question edited Jan 30 '14 at 5:34 rm-vanda 2,46621330 asked Apr 2 '09 at 3:11 SkyWeng 11.7k53112146 11 This can append with APC + autload see stackoverflow.com/questions/4575341/… –gagarine Mar 4 '12 at 17:04 3 Use autoload, or you can also try if(!class_exists('YourClass')){ include 'YourClass.php'; } –Timo Huovinen Sep 18 '12 at 17:28 add a comment| 18 Answers 18 active oldest votes up vote cannot redeclare class 97 down vote accepted It means you've already created a class. For instance: class Foo {} // some code here class Foo {} That second Foo would throw the error. share|improve this answer answered Apr 2 '09 at 3:15 whichdan 1,5961210 52 This answer is not as helpful as AaronLS's. I don't think the questioner would have asked the question if (s)he had written an obvious repetition like this (even in quite a complex situation). The include_once tip helps to clarify an obscure feature of PHP. –DavidHyogo Mar 20 '13 at 2:12 2 This error might also occur if you define the __construct method more than once. –Jack Trowbridge Sep 1 '13 at 21:27 1 AaronLS's answer is perfect.. –Krunal Panchal Feb 19 '14 at 4:13 3 Just use include_once('FooBar.php') to include your class. The name of the function is self-explanatory. –Marco Matarazzi Feb 19 '14 at 13:49 1 AaronLS's answer is much higher rated, and you can find it way down here. –qris Oct 7 '14 at 11:48 | show 2 more comments up vote 265 down vote You have a class of the same name declared more than once. Maybe via multiple includes. When including other files you need to use something like include_once "something.php"; to prevent multiple inclusions. It's very easy f
Sign in Pricing Blog Support Search GitHub This repository Watch 379 Star 2,942 Fork 2,464 woocommerce/woocommerce Code Issues 30 Pull requests 10 Projects 0 Wiki Pulse Graphs New issue Cannot redeclare class WC_Email in 2.3.3 #7399 Closed solepixel opened this Issue Feb 12, 2015 · 14 comments Projects None yet Labels [Status] Needs Author Reply Milestone No milestone Assignees No one assigned 6 participants solepixel commented Feb 12, 2015 When upgrading to 2.3.0 or 2.3.3, I keep getting this error: Fatal error: Cannot redeclare class WC_Email in ~/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php on line 819 Is this happening to anyone else? WooCommerce member claudiosmweb commented Feb 12, 2015 Have you tried to disable all other plugins? claudiosmweb added the Needs Reporter Feedback label Feb 12, 2015 solepixel commented Feb 12, 2015 Not yet. I'll give it a shot, but a ran a check through wp-content folder for "class WC_Email" and didn't come up with any results other than what's in the WooCommerce plugin folder. WooCommerce member claudiosmweb commented Feb 12, 2015 Maybe some plugin included the file twice. Because we are not having this problem and you were the first person report this so far. solepixel commented Feb 12, 2015 Roger. I'll let you know of my findings. WooCommerce member mikejolley commented Feb 13, 2015 I'd expect this to be a plugin including it. mikejolley added a commit that closed this issue Feb 13, 2015 mikejolley 35a3de0 mikejolley closed this in 35a3de0 Feb 13, 2015 Melaa24 commented Feb 25, 2015 I just did the upgrade 4 days ago and am also receiving this error. I have disabled all plugins and the error still persists. I checked my file against the change Mike made and I am using the updated version. Please help. Spreeuw commented Feb 25, 2015 I've had tw
… Closes #7399