Uncaught Error: Class ‘WC_MP_Post_Lv_Pickup_Point_Shipping’ not found
-
Hello,
On Saturday one of our shops started to produce PHP fatal errors, when customers went to cart page or tried to place an order. After inspection, we discovered that the carriers has been automatically updated for your plugin, and carrier “Latvian Post” (with key “post_lv”) had a change in parameter “has_terminals” from 0 to 1. This resulted in error, because script tried to load non-existant Class.
[01-May-2021 11:31:41 UTC] PHP Fatal error: Uncaught Error: Class 'WC_MP_Post_Lv_Pickup_Point_Shipping' not found in \wp-content\plugins\multiparcels-shipping-for-woocommerce\includes\class-mp-woocommerce.php:941
We temporarily fixed the problem by adding this snippet to theme functions.php file:
$carriers = get_option('multiparcels_carriers'); if(!empty($carriers['post_lv']) && !empty($carriers['post_lv']['has_terminals'])) { $carriers['post_lv']['has_terminals'] = ''; update_option('multiparcels_carriers', $carriers); }
and disabled the automatic updates. I’d recommend to provide an option for admins to disable automatic updating for carriers and locations, and allow to do it manually. For example, if locations / carriers would not be updated for a long time, the plugin could throw a notice in wordpress admin section to remind a shop manager that he needs to update the locations / carriers for the plugin. I seriously ask you to consider such a feature in your plugin, because this crash resulted in significant loss in revenue for that particular store in that day.
Regards,
Edgars
- The topic ‘Uncaught Error: Class ‘WC_MP_Post_Lv_Pickup_Point_Shipping’ not found’ is closed to new replies.