Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › single request to cart page generates 4 divide by zero on the same coupon
- This topic has 21 replies, 2 voices, and was last updated 6 years, 3 months ago by Jonathan Moore.
-
AuthorPosts
-
April 16, 2018 at 6:18 pm #3028Jonathan MooreParticipant
just doing some woocommerce 3.3.5 testing, got this when refreshing cart page
[16-Apr-2018 18:14:53 UTC] wjecf about to divide by zeron on coupon id15204 [16-Apr-2018 18:14:53 UTC] PHP Warning: Division by zero in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Controller.php on line 469 [16-Apr-2018 18:14:53 UTC] PHP Stack trace: [16-Apr-2018 18:14:53 UTC] PHP 1. {main}() /index.php:0 [16-Apr-2018 18:14:53 UTC] PHP 2. require() /index.php:17 [16-Apr-2018 18:14:53 UTC] PHP 3. require_once() /wp-blog-header.php:13 [16-Apr-2018 18:14:53 UTC] PHP 4. require_once() /wp-load.php:37 [16-Apr-2018 18:14:53 UTC] PHP 5. require_once() /wp-config.php:141 [16-Apr-2018 18:14:53 UTC] PHP 6. do_action() /wp-settings.php:471 [16-Apr-2018 18:14:53 UTC] PHP 7. WP_Hook->do_action() /wp-includes/plugin.php:453 [16-Apr-2018 18:14:53 UTC] PHP 8. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:310 [16-Apr-2018 18:14:53 UTC] PHP 9. WC_Cart_Session->get_cart_from_session() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:53 UTC] PHP 10. WC_Cart->calculate_totals() /wp-content/plugins/woocommerce/includes/class-wc-cart-session.php:119 [16-Apr-2018 18:14:53 UTC] PHP 11. WC_Cart_Totals->__construct() /wp-content/plugins/woocommerce/includes/class-wc-cart.php:1229 [16-Apr-2018 18:14:53 UTC] PHP 12. WC_Cart_Totals->calculate() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:131 [16-Apr-2018 18:14:53 UTC] PHP 13. WC_Cart_Totals->calculate_item_totals() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:140 [16-Apr-2018 18:14:53 UTC] PHP 14. WC_Cart_Totals->calculate_discounts() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:614 [16-Apr-2018 18:14:53 UTC] PHP 15. WC_Discounts->apply_coupon() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:720 [16-Apr-2018 18:14:53 UTC] PHP 16. WC_Discounts->is_coupon_valid() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:231 [16-Apr-2018 18:14:53 UTC] PHP 17. apply_filters() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:906 [16-Apr-2018 18:14:53 UTC] PHP 18. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:14:53 UTC] PHP 19. WJECF_Controller->assert_coupon_is_valid() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:56 UTC] wjecf about to divide by zeron on coupon id15204 [16-Apr-2018 18:14:56 UTC] PHP Warning: Division by zero in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Controller.php on line 469 [16-Apr-2018 18:14:56 UTC] PHP Stack trace: [16-Apr-2018 18:14:56 UTC] PHP 1. {main}() /index.php:0 [16-Apr-2018 18:14:56 UTC] PHP 2. require() /index.php:17 [16-Apr-2018 18:14:56 UTC] PHP 3. require_once() /wp-blog-header.php:19 [16-Apr-2018 18:14:56 UTC] PHP 4. include() /wp-includes/template-loader.php:74 [16-Apr-2018 18:14:56 UTC] PHP 5. get_template_part() /wp-content/themes/photoline-inkston/page.php:17 [16-Apr-2018 18:14:56 UTC] PHP 6. locate_template() /wp-includes/general-template.php:155 [16-Apr-2018 18:14:56 UTC] PHP 7. load_template() /wp-includes/template.php:647 [16-Apr-2018 18:14:56 UTC] PHP 8. require() /wp-includes/template.php:690 [16-Apr-2018 18:14:56 UTC] PHP 9. the_content() /wp-content/themes/photoline-inkston/content-page.php:31 [16-Apr-2018 18:14:56 UTC] PHP 10. apply_filters() /wp-includes/post-template.php:240 [16-Apr-2018 18:14:56 UTC] PHP 11. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:14:56 UTC] PHP 12. do_shortcode() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:56 UTC] PHP 13. preg_replace_callback() /wp-includes/shortcodes.php:197 [16-Apr-2018 18:14:56 UTC] PHP 14. do_shortcode_tag() /wp-includes/shortcodes.php:197 [16-Apr-2018 18:14:56 UTC] PHP 15. WC_Shortcodes::cart() /wp-includes/shortcodes.php:319 [16-Apr-2018 18:14:56 UTC] PHP 16. WC_Shortcodes::shortcode_wrapper() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:89 [16-Apr-2018 18:14:56 UTC] PHP 17. WC_Shortcode_Cart::output() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:76 [16-Apr-2018 18:14:56 UTC] PHP 18. do_action() /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php:79 [16-Apr-2018 18:14:56 UTC] PHP 19. WP_Hook->do_action() /wp-includes/plugin.php:453 [16-Apr-2018 18:14:56 UTC] PHP 20. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:310 [16-Apr-2018 18:14:56 UTC] PHP 21. WC_Cart->check_cart_coupons() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:56 UTC] PHP 22. WC_Coupon->is_valid() /wp-content/plugins/woocommerce/includes/class-wc-cart.php:730 [16-Apr-2018 18:14:56 UTC] PHP 23. WC_Discounts->is_coupon_valid() /wp-content/plugins/woocommerce/includes/class-wc-coupon.php:779 [16-Apr-2018 18:14:56 UTC] PHP 24. apply_filters() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:906 [16-Apr-2018 18:14:56 UTC] PHP 25. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:14:56 UTC] PHP 26. WJECF_Controller->assert_coupon_is_valid() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:56 UTC] wjecf about to divide by zeron on coupon id15204 [16-Apr-2018 18:14:56 UTC] PHP Warning: Division by zero in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Controller.php on line 469 [16-Apr-2018 18:14:56 UTC] PHP Stack trace: [16-Apr-2018 18:14:56 UTC] PHP 1. {main}() /index.php:0 [16-Apr-2018 18:14:56 UTC] PHP 2. require() /index.php:17 [16-Apr-2018 18:14:56 UTC] PHP 3. require_once() /wp-blog-header.php:19 [16-Apr-2018 18:14:56 UTC] PHP 4. include() /wp-includes/template-loader.php:74 [16-Apr-2018 18:14:56 UTC] PHP 5. get_template_part() /wp-content/themes/photoline-inkston/page.php:17 [16-Apr-2018 18:14:56 UTC] PHP 6. locate_template() /wp-includes/general-template.php:155 [16-Apr-2018 18:14:56 UTC] PHP 7. load_template() /wp-includes/template.php:647 [16-Apr-2018 18:14:56 UTC] PHP 8. require() /wp-includes/template.php:690 [16-Apr-2018 18:14:56 UTC] PHP 9. the_content() /wp-content/themes/photoline-inkston/content-page.php:31 [16-Apr-2018 18:14:56 UTC] PHP 10. apply_filters() /wp-includes/post-template.php:240 [16-Apr-2018 18:14:56 UTC] PHP 11. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:14:56 UTC] PHP 12. do_shortcode() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:14:56 UTC] PHP 13. preg_replace_callback() /wp-includes/shortcodes.php:197 [16-Apr-2018 18:14:56 UTC] PHP 14. do_shortcode_tag() /wp-includes/shortcodes.php:197 [16-Apr-2018 18:14:56 UTC] PHP 15. WC_Shortcodes::cart() /wp-includes/shortcodes.php:319 [16-Apr-2018 18:14:56 UTC] PHP 16. WC_Shortcodes::shortcode_wrapper() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:89 [16-Apr-2018 18:14:56 UTC] PHP 17. WC_Shortcode_Cart::output() /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php:76 [16-Apr-2018 18:14:56 UTC] PHP 18. WC_Cart->calculate_totals() /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php:82 [16-Apr-2018 18:14:56 UTC] PHP 19. WC_Cart_Totals->__construct() /wp-content/plugins/woocommerce/includes/class-wc-cart.php:1229 [16-Apr-2018 18:14:56 UTC] PHP 20. WC_Cart_Totals->calculate() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:131 [16-Apr-2018 18:14:56 UTC] PHP 21. WC_Cart_Totals->calculate_item_totals() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:140 [16-Apr-2018 18:14:56 UTC] PHP 22. WC_Cart_Totals->calculate_discounts() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:614 [16-Apr-2018 18:14:56 UTC] PHP 23. WC_Discounts->apply_coupon() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:720 [16-Apr-2018 18:14:56 UTC] PHP 24. WC_Discounts->is_coupon_valid() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:231 [16-Apr-2018 18:14:56 UTC] PHP 25. apply_filters() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:906 [16-Apr-2018 18:14:56 UTC] PHP 26. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:14:56 UTC] PHP 27. WJECF_Controller->assert_coupon_is_valid() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:15:01 UTC] wjecf about to divide by zeron on coupon id15204 [16-Apr-2018 18:15:01 UTC] PHP Warning: Division by zero in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Controller.php on line 469 [16-Apr-2018 18:15:01 UTC] PHP Stack trace: [16-Apr-2018 18:15:01 UTC] PHP 1. {main}() /index.php:0 [16-Apr-2018 18:15:01 UTC] PHP 2. require() /index.php:17 [16-Apr-2018 18:15:01 UTC] PHP 3. require_once() /wp-blog-header.php:13 [16-Apr-2018 18:15:01 UTC] PHP 4. require_once() /wp-load.php:37 [16-Apr-2018 18:15:01 UTC] PHP 5. require_once() /wp-config.php:141 [16-Apr-2018 18:15:01 UTC] PHP 6. do_action() /wp-settings.php:471 [16-Apr-2018 18:15:01 UTC] PHP 7. WP_Hook->do_action() /wp-includes/plugin.php:453 [16-Apr-2018 18:15:01 UTC] PHP 8. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:310 [16-Apr-2018 18:15:01 UTC] PHP 9. WC_Cart_Session->get_cart_from_session() /wp-includes/class-wp-hook.php:286 [16-Apr-2018 18:15:01 UTC] PHP 10. WC_Cart->calculate_totals() /wp-content/plugins/woocommerce/includes/class-wc-cart-session.php:119 [16-Apr-2018 18:15:01 UTC] PHP 11. WC_Cart_Totals->__construct() /wp-content/plugins/woocommerce/includes/class-wc-cart.php:1229 [16-Apr-2018 18:15:01 UTC] PHP 12. WC_Cart_Totals->calculate() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:131 [16-Apr-2018 18:15:01 UTC] PHP 13. WC_Cart_Totals->calculate_item_totals() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:140 [16-Apr-2018 18:15:01 UTC] PHP 14. WC_Cart_Totals->calculate_discounts() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:614 [16-Apr-2018 18:15:01 UTC] PHP 15. WC_Discounts->apply_coupon() /wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:720 [16-Apr-2018 18:15:01 UTC] PHP 16. WC_Discounts->is_coupon_valid() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:231 [16-Apr-2018 18:15:01 UTC] PHP 17. apply_filters() /wp-content/plugins/woocommerce/includes/class-wc-discounts.php:906 [16-Apr-2018 18:15:01 UTC] PHP 18. WP_Hook->apply_filters() /wp-includes/plugin.php:203 [16-Apr-2018 18:15:01 UTC] PHP 19. WJECF_Controller->assert_coupon_is_valid() /wp-includes/class-wp-hook.php:286
April 16, 2018 at 7:00 pm #3031Soft79KeymasterWhat are the coupon settings? I suspect minimum spend has a non-numeric value. Or did you make some changes to WJECF_Controller.php? What is the code around line 469?
April 21, 2018 at 9:50 pm #3107Jonathan MooreParticipantthere’s a line difference because I put the logging code in, but it seems a clear divide by zero opportunity….
if ( $wrap_coupon->get_minimum_amount() ) { $multiplier = self::min_value( floor( WC()->cart->subtotal / $wrap_coupon->get_minimum_amount() ), $multiplier ); }
the minimum amount for these coupons does appear to blank in the database
April 21, 2018 at 11:04 pm #3108Soft79KeymasterIf it’s blank or zero
if ( $wrap_coupon->get_minimum_amount() )
would yield false. Does the value contain a space by any chance?April 22, 2018 at 9:22 am #3109Jonathan MooreParticipantYour logic sounds correct.
Nevertheless CHAR_LENGTH(meta_value) is zero length for the value in question using
select CHAR_LENGTH(meta_value) from wp_postmeta
where post_id = 15204
and meta_key = ‘minimum_amount’Illogical as it might seem, I nevertheless resolved in my local environment with:
if ( $wrap_coupon->get_minimum_amount() ) { if ($wrap_coupon->get_minimum_amount()==0){error_log('wjecf suppressing divide by zeron on coupon id' . $wrap_coupon->get_id() );} else { $multiplier = self::min_value( floor( WC()->cart->subtotal / $wrap_coupon->get_minimum_amount() ), $multiplier ); } }
and am getting the log message every time..
April 22, 2018 at 9:37 am #3110Jonathan MooreParticipanton improving the debugging code we see the value returned appears to be 0.00 which is not matching to boolean false but is triggering divide by zero:
[22-Apr-2018 09:30:54 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:30:54 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:30:57 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:09 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:09 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:10 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:18 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:18 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:20 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:21 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:32 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”Another interesting question is why does this code get called 10 times when adding 1 coupon to the cart…
April 22, 2018 at 9:49 am #3111Jonathan MooreParticipantadding call stack for info:
[22-Apr-2018 09:42:02 UTC] wjecf suppressing divide by zeron on coupon id 15209 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:02 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-admin/admin-ajax.php [line] => 22 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) ) [22-Apr-2018 09:42:10 UTC] wjecf suppressing divide by zeron on coupon id 15209 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:10 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-blog-header.php [line] => 13 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) [17] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:11 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:11 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-coupon.php [line] => 779 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1538 [function] => is_valid [class] => WC_Coupon [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php [line] => 267 [function] => apply_coupon [class] => WC_Cart [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-ajax.php [line] => 193 [function] => add_discount [class] => WC_Legacy_Cart [type] => -> ) [7] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => apply_coupon [class] => WC_AJAX [type] => :: ) [8] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [9] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [10] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-ajax.php [line] => 78 [function] => do_action ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_wc_ajax [class] => WC_AJAX [type] => :: ) [12] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [14] => Array ( [file] => wp-includes/template-loader.php [line] => 12 [function] => do_action ) [15] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [16] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:11 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:11 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 284 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [11] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1598 [function] => do_action ) [13] => Array ( [file] => wp-content/plugins/woocommerce/includes/legacy/class-wc-legacy-cart.php [line] => 267 [function] => apply_coupon [class] => WC_Cart [type] => -> ) [14] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-ajax.php [line] => 193 [function] => add_discount [class] => WC_Legacy_Cart [type] => -> ) [15] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => apply_coupon [class] => WC_AJAX [type] => :: ) [16] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [17] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [18] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-ajax.php [line] => 78 [function] => do_action ) [19] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_wc_ajax [class] => WC_AJAX [type] => :: ) [20] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [21] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [22] => Array ( [file] => wp-includes/template-loader.php [line] => 12 [function] => do_action ) [23] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [24] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:14 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:14 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-blog-header.php [line] => 13 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) [17] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:18 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:18 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-coupon.php [line] => 779 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 730 [function] => is_valid [class] => WC_Coupon [type] => -> ) [5] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => check_cart_coupons [class] => WC_Cart [type] => -> ) [6] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [7] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php [line] => 79 [function] => do_action ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 76 [function] => output [class] => WC_Shortcode_Cart [type] => :: ) [10] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 89 [function] => shortcode_wrapper [class] => WC_Shortcodes [type] => :: ) [11] => Array ( [file] => wp-includes/shortcodes.php [line] => 319 [function] => cart [class] => WC_Shortcodes [type] => :: ) [12] => Array ( [function] => do_shortcode_tag ) [13] => Array ( [file] => wp-includes/shortcodes.php [line] => 197 [function] => preg_replace_callback ) [14] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_shortcode ) [15] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [16] => Array ( [file] => wp-includes/post-template.php [line] => 240 [function] => apply_filters ) [17] => Array ( [file] => wp-content/themes/photoline-inkston/content-page.php [line] => 31 [function] => the_content ) [18] => Array ( [file] => wp-includes/template.php [line] => 690 [args] => Array ( [0] => wp-content/themes/photoline-inkston/content-page.php ) [function] => require ) [19] => Array ( [file] => wp-includes/template.php [line] => 647 [function] => load_template ) [20] => Array ( [file] => wp-includes/general-template.php [line] => 155 [function] => locate_template ) [21] => Array ( [file] => wp-content/themes/photoline-inkston/page.php [line] => 17 [function] => get_template_part ) [22] => Array ( [file] => wp-includes/template-loader.php [line] => 74 [args] => Array ( [0] => wp-content/themes/photoline-inkston/page.php ) [function] => include ) [23] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [24] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:18 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:18 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php [line] => 82 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 76 [function] => output [class] => WC_Shortcode_Cart [type] => :: ) [11] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 89 [function] => shortcode_wrapper [class] => WC_Shortcodes [type] => :: ) [12] => Array ( [file] => wp-includes/shortcodes.php [line] => 319 [function] => cart [class] => WC_Shortcodes [type] => :: ) [13] => Array ( [function] => do_shortcode_tag ) [14] => Array ( [file] => wp-includes/shortcodes.php [line] => 197 [function] => preg_replace_callback ) [15] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_shortcode ) [16] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [17] => Array ( [file] => wp-includes/post-template.php [line] => 240 [function] => apply_filters ) [18] => Array ( [file] => wp-content/themes/photoline-inkston/content-page.php [line] => 31 [function] => the_content ) [19] => Array ( [file] => wp-includes/template.php [line] => 690 [args] => Array ( [0] => wp-content/themes/photoline-inkston/content-page.php ) [function] => require ) [20] => Array ( [file] => wp-includes/template.php [line] => 647 [function] => load_template ) [21] => Array ( [file] => wp-includes/general-template.php [line] => 155 [function] => locate_template ) [22] => Array ( [file] => wp-content/themes/photoline-inkston/page.php [line] => 17 [function] => get_template_part ) [23] => Array ( [file] => wp-includes/template-loader.php [line] => 74 [args] => Array ( [0] => wp-content/themes/photoline-inkston/page.php ) [function] => include ) [24] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [25] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:19 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:19 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-blog-header.php [line] => 13 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) [17] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:25 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:25 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-coupon.php [line] => 779 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 730 [function] => is_valid [class] => WC_Coupon [type] => -> ) [5] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => check_cart_coupons [class] => WC_Cart [type] => -> ) [6] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [7] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php [line] => 79 [function] => do_action ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 76 [function] => output [class] => WC_Shortcode_Cart [type] => :: ) [10] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 89 [function] => shortcode_wrapper [class] => WC_Shortcodes [type] => :: ) [11] => Array ( [file] => wp-includes/shortcodes.php [line] => 319 [function] => cart [class] => WC_Shortcodes [type] => :: ) [12] => Array ( [function] => do_shortcode_tag ) [13] => Array ( [file] => wp-includes/shortcodes.php [line] => 197 [function] => preg_replace_callback ) [14] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_shortcode ) [15] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [16] => Array ( [file] => wp-includes/post-template.php [line] => 240 [function] => apply_filters ) [17] => Array ( [file] => wp-content/themes/photoline-inkston/content-page.php [line] => 31 [function] => the_content ) [18] => Array ( [file] => wp-includes/template.php [line] => 690 [args] => Array ( [0] => wp-content/themes/photoline-inkston/content-page.php ) [function] => require ) [19] => Array ( [file] => wp-includes/template.php [line] => 647 [function] => load_template ) [20] => Array ( [file] => wp-includes/general-template.php [line] => 155 [function] => locate_template ) [21] => Array ( [file] => wp-content/themes/photoline-inkston/page.php [line] => 17 [function] => get_template_part ) [22] => Array ( [file] => wp-includes/template-loader.php [line] => 74 [args] => Array ( [0] => wp-content/themes/photoline-inkston/page.php ) [function] => include ) [23] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [24] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:25 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:25 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php [line] => 82 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 76 [function] => output [class] => WC_Shortcode_Cart [type] => :: ) [11] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php [line] => 89 [function] => shortcode_wrapper [class] => WC_Shortcodes [type] => :: ) [12] => Array ( [file] => wp-includes/shortcodes.php [line] => 319 [function] => cart [class] => WC_Shortcodes [type] => :: ) [13] => Array ( [function] => do_shortcode_tag ) [14] => Array ( [file] => wp-includes/shortcodes.php [line] => 197 [function] => preg_replace_callback ) [15] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => do_shortcode ) [16] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [17] => Array ( [file] => wp-includes/post-template.php [line] => 240 [function] => apply_filters ) [18] => Array ( [file] => wp-content/themes/photoline-inkston/content-page.php [line] => 31 [function] => the_content ) [19] => Array ( [file] => wp-includes/template.php [line] => 690 [args] => Array ( [0] => wp-content/themes/photoline-inkston/content-page.php ) [function] => require ) [20] => Array ( [file] => wp-includes/template.php [line] => 647 [function] => load_template ) [21] => Array ( [file] => wp-includes/general-template.php [line] => 155 [function] => locate_template ) [22] => Array ( [file] => wp-content/themes/photoline-inkston/page.php [line] => 17 [function] => get_template_part ) [23] => Array ( [file] => wp-includes/template-loader.php [line] => 74 [args] => Array ( [0] => wp-content/themes/photoline-inkston/page.php ) [function] => include ) [24] => Array ( [file] => wp-blog-header.php [line] => 19 [args] => Array ( [0] => wp-includes/template-loader.php ) [function] => require_once ) [25] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:27 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:27 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-blog-header.php [line] => 13 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) [17] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:42:29 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:42:29 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-blog-header.php [line] => 13 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) [17] => Array ( [file] => index.php [line] => 17 [args] => Array ( [0] => wp-blog-header.php ) [function] => require ) ) [22-Apr-2018 09:44:02 UTC] wjecf suppressing divide by zeron on coupon id 15210 - actual value returned from $wrap_coupon->get_minimum_amount() was: "0.00" callstack follows: [22-Apr-2018 09:44:02 UTC] Array ( [0] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => assert_coupon_is_valid [class] => WJECF_Controller [type] => -> ) [1] => Array ( [file] => wp-includes/plugin.php [line] => 203 [function] => apply_filters [class] => WP_Hook [type] => -> ) [2] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 906 [function] => apply_filters ) [3] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-discounts.php [line] => 231 [function] => is_coupon_valid [class] => WC_Discounts [type] => -> ) [4] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 720 [function] => apply_coupon [class] => WC_Discounts [type] => -> ) [5] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 614 [function] => calculate_discounts [class] => WC_Cart_Totals [type] => -> ) [6] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 140 [function] => calculate_item_totals [class] => WC_Cart_Totals [type] => -> ) [7] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php [line] => 131 [function] => calculate [class] => WC_Cart_Totals [type] => -> ) [8] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart.php [line] => 1229 [function] => __construct [class] => WC_Cart_Totals [type] => -> ) [9] => Array ( [file] => wp-content/plugins/woocommerce/includes/class-wc-cart-session.php [line] => 119 [function] => calculate_totals [class] => WC_Cart [type] => -> ) [10] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 286 [function] => get_cart_from_session [class] => WC_Cart_Session [type] => -> ) [11] => Array ( [file] => wp-includes/class-wp-hook.php [line] => 310 [function] => apply_filters [class] => WP_Hook [type] => -> ) [12] => Array ( [file] => wp-includes/plugin.php [line] => 453 [function] => do_action [class] => WP_Hook [type] => -> ) [13] => Array ( [file] => wp-settings.php [line] => 471 [function] => do_action ) [14] => Array ( [file] => wp-config.php [line] => 141 [args] => Array ( [0] => wp-settings.php ) [function] => require_once ) [15] => Array ( [file] => wp-load.php [line] => 37 [args] => Array ( [0] => wp-config.php ) [function] => require_once ) [16] => Array ( [file] => wp-admin/admin-ajax.php [line] => 22 [args] => Array ( [0] => wp-load.php ) [function] => require_once ) )
April 22, 2018 at 10:03 am #3112Soft79KeymasterLooking at your log it just gets called once per request.
The value is non-zero as I suspected. This actually is a WC issue, because WooCommerce phpdoc states get_minimum_value() returns a float which it doesn’t. To solve the issue just remove the ‘0.00’ value from the coupon.
In the next release I might change the
if ( $wrap_coupon->get_minimum_amount() )
and cast to float.April 22, 2018 at 6:21 pm #3113Jonathan MooreParticipantNote: I can’t “just remove the ‘0.00’ value from the coupon” as the actual minimum value is blank in the database, it is something in the woocommerce api here that is converting the blank to 0.00.
[obviously I could change the code or set a minimum value]April 22, 2018 at 6:36 pm #3114Soft79KeymasterThen replace
if ( $wrap_coupon->get_minimum_amount() )
by:
if ( (float) $wrap_coupon->get_minimum_amount() )
April 22, 2018 at 7:11 pm #3117Soft79KeymasterIt is strange though, in my dev setup (with WC 3.3.5), it *does* yield an empty string when the minimum spend value is omitted, and not 0.00. Do you have WC 3.3.5?
April 22, 2018 at 8:05 pm #3118Jonathan MooreParticipantit was a 3.3.5 test…
And this was all one coupon request generating all that.. I’m also getting double warning notices when adding a coupon which isn’t valid yet is added to the cart but maybe that’s another issue.
April 22, 2018 at 8:15 pm #3119Soft79KeymasterLooking at the timestamps, it were multiple requests.
April 22, 2018 at 8:33 pm #3120Jonathan MooreParticipantyes, the php runs a bit slow under MAMP with xdebug on local machine, it’s one request from user point of view, albeit woocommerce is doing its ajax magic to multiply that a bit
April 22, 2018 at 9:02 pm #3121Soft79KeymasterBut 36 seconds? That doesn’t seem right.
What are you trying to debug at the moment anyway?
-
AuthorPosts
- You must be logged in to reply to this topic.