Adds a filter to the IPN Notification order ID #133
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using the
woocommerce_amazon_pa_update_checkout_session_payload
filter to send a custom order number (from the WooCommerce Sequential Order Numbers Pro plugin) to the API when the order is created. This works for sending the order to the Amazon API, and capturing the order works, but it breaks IPN updates because the API sends the sequential order number. I needed a way to filter the$order_id
that is being processed in theWC_Amazon_Payments_Advanced_IPN_Handler::handle_notification_ipn_v2()
method. I could maybe have used thewoocommerce_amazon_pa_ipn_notification_order
filter, but the function throws an exception if the$order_id
is non-numeric -- ours are alphanumeric.Adding this filter allows me to use a function internal to the Sequential Order Numbers plugin to fetch the proper order ID and pass it back to the IPN handler.
Please consider adding this small change so I don't have to manually change it whenever you update!
Thanks!
--et
All Submissions:
Changes proposed in this Pull Request:
Closes # .
How to test the changes in this Pull Request:
Other information:
Changelog entry