Official custom shipping class doesn’t work anymore (Shipping method api)
-
Hello dear WooCommerce developers.
Before WooCommerce 3+, using this official WooCommerce code Shipping Method API, it was possible to create a custom shipping class in a plugin.
Now this code is not working anymore as expected and outputs an error:
Strict Standards: Declaration of WC_Custom_Shipping_Method::calculate_shipping() should be compatible with WC_Shipping_Method::calculate_shipping($package = Array) in /home/something/www/sites/tie2/wp-content/plugins/custom_shipping_method.php on line 18
In the provided code (plugin) there is a conflict between existing WC_Shipping_Method::calculate_shipping() method and the calculate_shipping() function declared in the provided code…
I hope that someone can help to solve this issue.
Thanks.
- The topic ‘Official custom shipping class doesn’t work anymore (Shipping method api)’ is closed to new replies.