Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing the status of an order causes fatal error #11477

Closed
Robert-Held opened this issue Jul 19, 2016 · 7 comments
Closed

Editing the status of an order causes fatal error #11477

Robert-Held opened this issue Jul 19, 2016 · 7 comments

Comments

@Robert-Held
Copy link

Robert-Held commented Jul 19, 2016

EXPLANATION OF THE ISSUE

Just updated to 2.6.2 (after a long run without any update) and added shipping zones as required. An order was placed successfully.
Now I want to edit that order in detail but when trying to change the order status, a fatal error occurs with this message:

Fatal error: Call to undefined method WC_Shipping_Flat_Rate::get_meta_data() in C:\xampp\htdocs\fslocal\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-order.php on line 491

This error does not occur, however, when I change the status in the order overview.

I can't find any direct link to a modification I made, so I don't know if this is an issue solely on my config. Below you'll find the status report for my local dev system.

Update: This error wasn't bound to editing the status. It occured when a shipping method was present when hitting the Save button.

STEPS TO REPRODUCE THE ISSUE

  1. Go to the edit page of any order.
  2. Change the order status.
  3. Save the order.

SYSTEM STATUS REPORT

[REDACTED]

@mikejolley
Copy link
Member

Definitely look at customisations because if you're adding a custom shipping method for example, it may lack this method.

@mikejolley
Copy link
Member

Closing due to lack of feedback. Please perform basic troubleshooting steps (debug mode, disable plugin and themes) before replying further.

@Robert-Held
Copy link
Author

Got it.
The cause was a conflict with an older version of the WooCommerce German Market plugin. It referred to WC_Shipping_Flat_Rate instead of WC_Shipping_Rate.

thanks

@Stef-S
Copy link

Stef-S commented Jul 21, 2016

Thanks Robert! I currently have the exact same problem.
How did you fix it? Did you simply buy a renewal license of WooCommerce German Market?
Thanks in advance, Stefan.

@Robert-Held
Copy link
Author

Robert-Held commented Jul 28, 2016

Hey Stefan, I hope you managed to cope with this problem in the meantime.
If not, here's what I did:
We currently cannot renew our license so I went to plugins/woocommerce-german-market/inc/WGM_Tax.php, line 223, where you find.
$new_shipping = new WC_Shipping_Flat_Rate( );
Change that to
$new_shipping = new WC_Shipping_Rate( );
WooCommerce' shipping system got a big change. That's why this breaks the old versions of WGM.

@Stef-S
Copy link

Stef-S commented Jul 29, 2016

Hey Robert, thanks so much!!! This really helped a lot! Regards, Stefan

@xvostikk
Copy link

xvostikk commented Jan 1, 2017

Thank you very much! I had the same problem, it helps.

@experapps experapps mentioned this issue Sep 29, 2017
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants