• Resolved bnik

    (@bnik)


    Hello, I’m facing an issue I’m hoping you could help me with.

    As you know, when woocommerce sends webhook notifications for new orders, it also sends along a key that it generates from that order payload. The payload it uses contains some text annotated with trp-gettext.

    However, the order payload that wordpress sends to my server has that annotation stripped. As a result, my server cannot generate the same authentication key, and thus cannot ensure the order is indeed coming from wordpress.

    Specifically, for my case, the path in the order payload that contains this annotated text is order->shipping_lines->meta_data->key.

    Its value when wordpress generates the key is “#!trpst#trp-gettext data-trpgettextoriginal=1721#!trpen#Items#!trpst#/trp-gettext#!trpen#”, however inside the order payload as it arrives to my server, it’s just “Items”

    Edit: I should also mention I’m using version 2.6.1 and woocommerce 8.0.3

    • This topic was modified 1 year, 5 months ago by bnik.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for reaching us!

    What you can try is to exclude that plugin from being translated by adding its domain name into the Exclude Gettext Strings function from the Settings->TranslatePress->Advanced tab->Exclude functions.

    Try this and let me know if this could solve your problem!

    Kind Regards,

    Thread Starter bnik

    (@bnik)

    Thanks for your reply. Nothing changed unfortunately. I’m not 100% clear on how to use the exclude functions but I tried with “Items” as the Gettext String and “woocommerce” as the Domain. I also tried having the domain blank. But it didn’t work.

    I think that key values in the json object should never be translated anyway. Also the fact that wordpress creates the authentication key with a “wrong” json (with the gettext string) but sends to my server the “correct” json (just saying Items for the key) is also a bit strange.

    Plugin Support Alex

    (@alexcozmoslabs)

    Is this still in issue? If so, please reply to this ticket and remove the resolved tag.

    • This reply was modified 1 year, 5 months ago by Alex.
    Thread Starter bnik

    (@bnik)

    Well, the issue wasn’t resolved. But I have since removed this plugin due to this bug. If you want to fix it or not it’s up to you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TranslatePress seems to be breaking Woocommerce Webhooks’ is closed to new replies.