[resolved] Resetting Sale Price gives error on product update (3 posts)

  1. creativeworldstudio
    Posted 5 years ago #

    Hi guys,

    Found a small bug - on WP Admin > Products > Edit Product page. When entering a Sale Price the product updates correctly, however when removing it (or resetting it back to zero) an error is thrown after 'Update' is clicked:

    Warning: number_format() expects parameter 1 to be double, string given in /wp-content/plugins/foxyshop/customposttype.php on line 1009
    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/foxyshop/customposttype.php:1009) in /wp-includes/pluggable.php on line 897

    I've tried putting 0, 0.0 and leaving the field blank but nothing works. (actually I think the field is wiped if a value equal to 0 is left in it)

    The product does still update with the sale price removed despite the error.

    Using WP 3.1.2 & FoxyShop 2.6.1

    PS- great work on 2.6.1 release :)

    Cheers, Leon


  2. sparkweb
    Plugin Author

    Posted 5 years ago #

    Thanks Leon for the bug report. I think I might know what's going on here, but for some reason my server isn't stopping the page execution at this point. Can you try replacing line 1009 of customposttype.php with this:


    to see if that solves it? Thank you!

  3. sparkweb
    Plugin Author

    Posted 5 years ago #

    Leon, I got this figured out and have corrected this in version 2.7.

    2.7 is actually done, but the WordPress plugin repository is down right now. I'll post 2.7 when it comes up.

    Thanks for the error report!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic