Support » Plugin: EDD Sale Price » experiencing significant bug in version 1.0.5

  • Hi – I upgraded a site to version 1.0.5 this morning. The site was in the midst of a sale and had a number of products with a sale price. Someone placed an order for a number of products and the price was zero. The payment notification email showed that the payment source was “Test Payment”

    It turned out that every product in the store that was not on sale had been given a sale price of Zero. I downgraded to version 1.0.4 and all of the zero price sale items had gone back to their normal non-sale price.

    We did have one customer who was helping themselves to a second order of “free” products while we were figuring out how someone was getting all of these products for free.

    This is obviously a serious bug. The payment source was Test Payment – was this test code left in the plugin that wasn’t supposed to be in the final release?

    Thank you for your assistance with getting this quickly fixed!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    The plugin does not have any code that changes the payment method, so this is very strange to hear. Are you able to perform another test on a staging site where you update to the latest version and see how it works?

    Which version of EDD / WP are you using?

    Cheers,
    Jeroen

    Thread Starter stvwlf

    (@stvwlf)

    Site uses EDD 2.10.6 WP 5.7.2

    Here is some text from the EDD order notification email:
    ========
    New Sale!
    Hello
    A Downloads purchase has been made.
    Downloads sold:
    {product list here}

    Purchased by: {customer name}
    Amount: $0.00
    Payment Method: Test Payment

    Thank you
    ==========

    We have no payment method called Test Payment

    I checked if this zero price came from a discount code – no, it did not.

    When I looed at the Dashboard > Downloads > All Downloads page, I saw all of the products that were on sale with their regular price crossed out and the sale price next to the regular price. I also saw that every product that was not on sale had it’s regular price crossed out and a sale price of 0.00. And I mean several hundred regular prices items not on sale showed a sale price of 0.00

    When I downgraded the plugin to 1.0.4 the regular priced items displayed as they are supposed to, regular price not crossed out and no sale price.

    I’m not sure what the point would be of trying this on a staging site to see if it happens there. I already saw it happen on the live site after I upgraded. After upgrading 1.0.4 to 1.0.5 earlier this morning, the incorrect sale price of zero appeared on all not-on-sale items. When I downgraded back to 1.0.4, the zero sale price issue was gone and the site is working normally. No one who works on the site changed all of those regularly priced items to on sale for zero. We had orders placed yesterday that charged the correct pricing. Only after the plugin upgrade did this issue arise. Also, we don’t have a payment source of “Test Payment”. We’ve never before seen an order come through with a payment type of “Test Payment”.

    I hope this info is helpful in determining what happened.
    Thank you for responding as quickly as you did!

    Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    I’m unable to replicate this. On a staging site you could check to see why this may be happening. Maybe the sale price has been set to ‘0’ which previously didn’t work but has been fixed in the latest version, which could explain why this is happening for you.
    If thats the case you’d want to remove the sale price to have a empty value if you don’t want it applied / to be free.

    Cheers,
    Jeroen

    Thread Starter stvwlf

    (@stvwlf)

    Hi – thank you for your reply.

    With version 1.0.4 of the plugin active, I searched the WordPress database to locate all records in wp_postmeta that have an entry for edd_sale_price. There are 539, and none have a sale price of zero.

    Then I reactivated version 1.0.5. The Downloads page shows every product that doesn’t have a sale price showing a sale price of zero. I then queried the database for edd_sale_price and the count of rows with sale prices is still the same, 539, and none of the 539 have sale price set to zero. Yet the Downloads page shows every item that doesn’t have a sale price set in the database with a sale price of zero.

    I did some code research last night and found the payment term of “Test Payment” is part of EDD’s code, so it’s clear the plugin is not causing that. The payment term “Test Payment” is disabled in our EDD settings, so I’m not clear how it’s getting assigned to an order. We have only PayPal enabled as a payment setting. Because every item on the customer’s order had a sale price of zero, the order total was zero. Since you can’t pay zero dollars through PayPal, I wonder if the change to payment type from PayPal to Test Payment is a hole in EDD’s code.

    There is no question however that with version 1.0.5 activated, The Dashboard > Download page shows every product that doesn’t have a sale price set in the post_meta table does display a sale price of zero, and customers are able to add these products to their orders and download them without charge, which is not at all our intention. This is why we’ve reverted to version 1.0.4.

    Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    Thank you for the information.

    Are the meta values for the ‘sale_price’ meta empty?
    What version of PHP are you running?

    Can you try and see what happens with the meta data if you re-save a product?

    Thank you,
    Jeroen

    Thread Starter stvwlf

    (@stvwlf)

    Hi

    The ‘sale_price’ meta values for the 539 products with sale prices were not empty, they each contained that product’s correct sale price.

    We have approx 1200 products. The remaining 700 or so products that are not on sale do not have a sale_price postmeta record. All 700 show up on the Dashboard > Downloads page with a sale price of zero, with the regular price crossed out. Again, no sale_price record in post_meta for any of these 700, displaying on the Downloads page with sale price of zero.

    User nipes has now posted they’re experiencing the same issue I’m experiencing here. You asked me to “see what happens with the meta data if you re-save a product”. User nipes reports resaving the records with various entries for sale price, and all of give the same incorrect result.

    I’m happy to provide info as you look into what’s going on, and I appreciate your time. Thank you

    • This reply was modified 5 months, 1 week ago by stvwlf.
    Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    Thank you for the information.

    Which versions of PHP are you guys running?

    @stvwlf does it show the correct sale price for the products that actually have a sale price entered?

    Eager to look into this, not being able to replicate this behaviour severely limits the speed in which this can be investigated.

    Cheers,
    Jeroen

    Thread Starter stvwlf

    (@stvwlf)

    Hi – The site is running PHP 7.4

    “does it show the correct sale price for the products that actually have a sale price entered?” – yes

    Plugin Author Jeroen Sormani

    (@sormano)

    Thank you all for the provided information.

    I believe I’ve found the cause and made a update and would like to ask you guys to help test this out. You can download the latest version of the plugin here; https://github.com/JeroenSormani/EDD-Sale-Price (Code > Download ZIP).

    Let me know your findings.

    Thank you,
    Jeroen

    Thread Starter stvwlf

    (@stvwlf)

    I downloaded and installed the new GitHub version. After a quick review, items that aren’t on sale are now listed at their normal sales price. Thus your new changes seem to have resolved the issue.

    Today is the last day of our big sale, so for safety reasons I’m reverting to 1.0.4. I’ll do further testing tomorrow on the revised version of 1.0.5

    Thank you for getting this fixed.

    Thread Starter stvwlf

    (@stvwlf)

    @agf321

    I first cleared up this issue by downgrading to version 1.0.4 which didn’t have this problem.

    You can download 1.0.4 here
    https://wordpress.org/plugins/edd-sale-price/advanced/
    Scroll to the bottom and click the Previous Versions dropdown.

    The author also posted a Github link a few days ago where he made changes that may resolve the issue in 1.0.5. I installed it for a few minutes and it seemed to work correctly. We were in the middle of a sale so I reverted back to 1.0.4 and haven’t gotten back yet to more detailed testing of the Github version
    https://github.com/JeroenSormani/EDD-Sale-Price (Code > Download ZIP).

    If you try the Github version and conclude it resolves the problem, post back here as I assume the author will update the version on the WordPress plugins site after the changed version has been more thoroughly tested.

    Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    I just replied to your rating as well. I hope you can assist testing the version on GH and I’m hoping/planning to release the update from GH later today.

    Cheers,
    Jeroen

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘experiencing significant bug in version 1.0.5’ is closed to new replies.