No longer working – Errors & Notices
-
I’m also running into issues with this plugin lately. It doesn’t seem to be returning any rates. Even working with the WP Health Check plugin it’s been difficult to narrow down where the API is running into issue. Additionally, the plugin seems to be throwing notices all over the place in my error logs. Some notable warnings:
PHP Warning: session_start(): Cannot start session when headers already sent in /wp-content/plugins/ups-eu-woocommerce/src/libsystems/api_ups/ups-eu-woo-call-api-ups-configurations.php on line 20
PHP Notice: Undefined variable: check_ap in /wp-content/plugins/ups-eu-woocommerce/src/libsystems/api_ups/ups-eu-woo-call-api-ups-eshopper.php on line 187
PHP Notice: Trying to get property ‘Fault’ of non-object in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1007
PHP Notice: Trying to get property ‘detail’ of non-object in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1007
PHP Notice: Trying to get property ‘Errors’ of non-object in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1007
PHP Notice: Trying to get property ‘ErrorDetail’ of non-object in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1007
PHP Notice: Undefined property: stdClass::$RateTimeInTransit in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1309
PHP Notice: Undefined offset: 0 in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1351
PHP Notice: Trying to get property ‘fallback_rate’ of non-object in /wp-content/plugins/ups-eu-woocommerce/src/models/ups-eu-woo-model-ups-shipping-api.php on line 1351
– – – – – –
Looking at the code base – I would love to see more error handling and better comments. Many of the comments are repetitious and non-descriptive as seen below:
* Name function: ups_eu_woo_custom_checkout_method_option
Finally, you shouldn’t need these lengthy, prefixed methods with you’re using namespaces. Just use a simple and straight-forward naming convention and use the method comments to go into further description if need be.
I would love to see this plugin in a better state than it currently is since it’s UPS official but I agree that it may need refactored.
- The topic ‘No longer working – Errors & Notices’ is closed to new replies.