Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Fatal error in migration process #43

Closed
zacscott opened this issue Feb 13, 2018 · 1 comment · Fixed by #46
Closed

Fatal error in migration process #43

zacscott opened this issue Feb 13, 2018 · 1 comment · Fixed by #46

Comments

@zacscott
Copy link

During the migration process I am getting a Fatal error;

Fatal error: Call to a member function get_data_store() on boolean in /Users/zscott/httpdocs/zanerobe.local/wp-content/plugins/woocommerce-custom-orders-table-1.0.0-beta.3/includes/class-woocommerce-custom-orders-table-cli.php on line 96

I have tracked the problem down to the call to wc_get_order() in WooCommerce_Custom_Orders_Table_CLI::migrate().

If an there is an error with an order, wc_get_order() will return false, an unchecked condition. In my particular case it is failing because the order has an invalid email address (its an old order so I'm not suprised).

zacscott pushed a commit to zacscott/woocommerce-custom-orders-table that referenced this issue Feb 14, 2018
zacscott pushed a commit to zacscott/woocommerce-custom-orders-table that referenced this issue Feb 14, 2018
@zacscott
Copy link
Author

Pull request for fix - #44

@stevegrunwell stevegrunwell self-assigned this Feb 14, 2018
@stevegrunwell stevegrunwell added this to the Version 1.0.0 milestone Feb 14, 2018
stevegrunwell added a commit that referenced this issue Feb 15, 2018
Based on @zacscott's work in #44, add a test case and a simpler work-around for handling corrupted orders.

Fixes #43, closes #44. Props @zacscott.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants