wp-e-commerce / WP-e-Commerce

WP eCommerce - The most popular independent eCommerce platform for WordPress
https://wpecommerce.org
GNU General Public License v2.0
215 stars 217 forks source link

Duplicate notes in refund API #2232

Closed mihaijoldis closed 7 years ago

mihaijoldis commented 7 years ago

Using wpsc_purchlogs_update_notes creates a duplicate of an existing note after the second refund request Tested using EC 3.0

First refund for 1$

Feb 5, 2017 @ 00:37 #0  Delete Note
Refunded $1.00 - Refund ID: 2588534294414730K

Did another refund for 1$ and there are now 3 notes

Feb 5, 2017 @ 00:38 #0  Delete Note
Refunded $1.00 - Refund ID: 88E71926YK8057724

Feb 5, 2017 @ 00:37 #1  Delete Note
Refunded $1.00 - Refund ID: 2588534294414730K

Feb 5, 2017 @ 00:37 #2  Delete Note
Refunded $1.00 - Refund ID: 2588534294414730K
jtsternberg commented 7 years ago

@misulicus this was an odd one. Can you test with the https://github.com/wp-e-commerce/WP-e-Commerce/tree/bug/duplicate-purchase-notes branch to see if that fixes this?