Errors While Debug Is Enabled
-
I’m running simply the Twenty Nineteen Theme, WooCommerce, and this plugin Yith Donations. Whenever I add a donation to the cart I receive the following errors and it completely breaks my page – doesn’t take me to cart or checkout:
PHP Notice: Undefined index: ywcds_amount in wp-content\plugins\yith-donations-for-woocommerce\includes\classes\class.yith-woocommerce-donations.php on line 519 PHP Stack trace: PHP 1. {main}() index.php:0 PHP 2. require() index.php:17 PHP 3. require_once() wp-blog-header.php:13 PHP 4. require_once() wp-load.php:37 PHP 5. require_once() wp-config.php:100 PHP 6. do_action() wp-settings.php:546 PHP 7. WP_Hook->do_action() wp-includes\plugin.php:465 PHP 8. WP_Hook->apply_filters() wp-includes\class-wp-hook.php:310 PHP 9. WC_Form_Handler::add_to_cart_action() wp-includes\class-wp-hook.php:286 PHP 10. WC_Form_Handler::add_to_cart_handler_simple() wp-content\plugins\woocommerce\includes\class-wc-form-handler.php:750 PHP 11. WC_Cart->add_to_cart() wp-content\plugins\woocommerce\includes\class-wc-form-handler.php:778 PHP 12. apply_filters() wp-content\plugins\woocommerce\includes\class-wc-cart.php:1097 PHP 13. WP_Hook->apply_filters() wp-includes\plugin.php:208 PHP 14. YITH_WC_Donations->add_cart_donation_item() wp-includes\class-wp-hook.php:288 PHP Warning: Cannot modify header information - headers already sent by (output started at wp-content\plugins\yith-donations-for-woocommerce\includes\classes\class.yith-woocommerce-donations.php:519) in wp-includes\pluggable.php on line 1251 PHP Stack trace: PHP 1. {main}() index.php:0 PHP 2. require() index.php:17 PHP 3. require_once() wp-blog-header.php:13 PHP 4. require_once() wp-load.php:37 PHP 5. require_once() wp-config.php:100 PHP 6. do_action() wp-settings.php:546 PHP 7. WP_Hook->do_action() wp-includes\plugin.php:465 PHP 8. WP_Hook->apply_filters() wp-includes\class-wp-hook.php:310 PHP 9. WC_Form_Handler::add_to_cart_action() wp-includes\class-wp-hook.php:286 PHP 10. wp_safe_redirect() wp-content\plugins\woocommerce\includes\class-wc-form-handler.php:761 PHP 11. wp_redirect() wp-includes\pluggable.php:1356 PHP 12. header() wp-includes\pluggable.php:1251 PHP Warning: Cannot modify header information - headers already sent by (output started at wp-content\plugins\yith-donations-for-woocommerce\includes\classes\class.yith-woocommerce-donations.php:519) in wp-includes\pluggable.php on line 1254 PHP Stack trace: PHP 1. {main}() index.php:0 PHP 2. require() index.php:17 PHP 3. require_once() wp-blog-header.php:13 PHP 4. require_once() wp-load.php:37 PHP 5. require_once() wp-config.php:100 PHP 6. do_action() wp-settings.php:546 PHP 7. WP_Hook->do_action() wp-includes\plugin.php:465 PHP 8. WP_Hook->apply_filters() wp-includes\class-wp-hook.php:310 PHP 9. WC_Form_Handler::add_to_cart_action() wp-includes\class-wp-hook.php:286 PHP 10. wp_safe_redirect() wp-content\plugins\woocommerce\includes\class-wc-form-handler.php:761 PHP 11. wp_redirect() wp-includes\pluggable.php:1356 PHP 12. header() wp-includes\pluggable.php:1254As far as I can tell it’s trying to add 2 donation products for whatever reason. 1 as 0.00 and another at the price I entered on the product page. As far as I can tell at the moment, the plugin is completely unusable. I keep running into PHP issues and PHP notices.
– – – – –
If I disable debugging entirely ( via WP Config ) then the plugin seems to work as expected. I don’t get the whitescreen but both donation products are still added to cart. I would like to keep debugging on to track these kinds of issues though.
The topic ‘Errors While Debug Is Enabled’ is closed to new replies.