I registered an observer for the
sales_order_save_commit_after event to be notified when a new order comes in. This works fine but the event is triggered two times in a row with the same order.
<sales_order_save_commit_after> <observers> <unique_sales_order_save_commit_after> <type>singleton</type> <class>mymodule/observer</class> <method>export</method> </unique_sales_order_save_commit_after> </observers> </sales_order_save_commit_after>
How can I check if it's the first time or which other event would be better?
I also tried the
sales_order_invoice_pay event (found on SO) but that is not triggered for me.