• Resolved Jason

    (@galapogos01)


    Hi guys,

    I have this same problem as https://www.ads-software.com/support/topic/duplicate-records-order-attribution-tracking/

    I have 125 orders with duplicate order_attribution postmeta. For example, in one case I have a single order with 1000 _wc_order_attribution_session_entry entries in the database (order attempts from a fraudster trying fake credit cards against the Braintree credit card gateway). Most of the 125 orders have 2-3 entries with the same key. There have been several thousand total orders since this phenomenon started, so only a small percentage duplicate.

    Why is WooCommerce allowing the creation of double entries for the same order/meta_key? This seems like a bug.

    I don’t have any HPOS settings enabled. This is a large production site so I will not be disabling plugins, we will need another way to trace how WooCommerce is writing the meta multiple times.

    Thanks,
    Jason

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi there @galapogos01 ??

    Thank you for reaching out — we’re happy to help!

    As a next step, could you please go ahead with providing a response to that message, here?

    We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.

    Thread Starter Jason

    (@galapogos01)

    Hey @anastas10s ,

    There are no logs for postmeta as far as I know? I can provide query results from the DB but they just prove the postmeta are being written.

    I think this is going to need a dev to identify which hooks write the _wc_order_attribution* records and then we can work out how it would be getting triggered multiple times for the same order.

    For reference each duplicate seems to have the same session_start_time.

    Thanks, Jason

    Hey, @galapogos01!

    Thanks for the info!

    To confirm, this is not happening with all orders, correct?

    Do you see any similarities between the orders that had this issue?
    It can be similar payment methods (such as credit cards), similar products, customers with similar info, etc

    From what I understand this happened with both Square and Braintree, correct?
    Is it happening with all Square and Braintre orders?

    The reason I’m asking is to try and narrow down the cause to investigate it further ??

    Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
    Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Have a wonderful day!

    Thread Starter Jason

    (@galapogos01)

    Yes, it is happening with some orders but not all. I have not identified any similarities.

    I ran a query and it is affecting both new and repeat customers (_wc_order_attribution_session_count > 1) on Braintree Credit Card, Paypal and Afterpay.

    I do not have the Square gateway. I have Braintree and Afterpay (which uses some Square frontend code).

    There are no fatal errors, and I won’t share site status for a production site publicly – if you can provide a secure way I am happy to share.

    Thanks,
    Jason

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @galapogos01

    The problem you’re experiencing with duplicate _wc_order_attribution_session_entry entries in certain orders is indeed unusual. WooCommerce is designed to prevent such duplication, so it’s important that we investigate this further.

    While I understand that disabling plugins is not an option for your large production site, it is important to note that sometimes, third-party plugins or themes can cause unexpected behaviors.

    However, considering your situation, I would recommend you to create a staging site which is an exact replica of your live site. You can then safely perform tests and debug without affecting your live site.

    Additionally, could you please confirm if this issue started after an update to WooCommerce or any other plugin, or if it started occurring randomly?

    Furthermore, it would be helpful if you could share a list of all active plugins and server environments with us. This information can be crucial in identifying potential conflicts causing this issue.

    You could copy and paste your reply or share it via Mozilla Community Pastebin and send the link here. Feel free to redact all the private information before sending it over.

    In the meantime, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    Thank you for your patience and cooperation. Looking forward to hearing from you!

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @galapogos01

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

    Thread Starter Jason

    (@galapogos01)

    Hey Shameem,

    I have a staging site, but have not seen this issue. Probably due to the few orders being placed.

    This issue is not resolved so please don’t mark it as closed.

    What is a secure way to transmit the Status Report to you?

    Thanks,
    Jason

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @galapogos01

    Since you haven’t observed this issue on your staging site, it’s possible that the issue is specific to certain conditions on your live site. I understand that sharing your site status publicly is not an option, and we respect that.

    To share your System Status Report securely with us, you could use Mozilla Community Pastebin. Make sure to set a longer expiration time and share the link here. Feel free to redact all the private information before sending it over.

    This information will help us understand your site environment better and potentially identify any conflicts causing this issue.

    We appreciate your cooperation and look forward to resolving this issue for you.

    Thread Starter Jason

    (@galapogos01)

    Hi Shameem,

    There are no orders being placed in my staging site. In production we have a hundred per day. The issue can’t be reproduced because there are no customers making purchases on a staging site.

    As for the pastebin, that’s a public site. Please provide a secure way to transmit the Status Report to you?

    Thanks,
    Jason

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @galapogos01,

    Please open a ticket about this from?WooCommerce.com > My profile > Support?and please include a link to this forum thread, so that we can keep track of what’s already been done. You can share the System Status more securely there.

    You may need to create an account before you can access that page.

    We will be able to help you further there.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.