{"id":18936860,"date":"2026-06-12T18:17:15","date_gmt":"2026-06-12T18:17:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/compatibility-issue-with-sequential-order-no-when-payment-callbacks\/"},"modified":"2026-06-12T18:17:15","modified_gmt":"2026-06-12T18:17:15","slug":"compatibility-issue-with-sequential-order-no-when-payment-callbacks","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/compatibility-issue-with-sequential-order-no-when-payment-callbacks\/","title":{"rendered":"Compatibility issue with Sequential Order N\u00ba when payment callbacks"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello! \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I believe there may be a compatibility issue between the Komoju WooCommerce plugin and Sequential Order Numbers for WooCommerce plugins: <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce-sequential-order-numbers\/\">https:\/\/wordpress.org\/plugins\/woocommerce-sequential-order-numbers\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Environment<\/strong><\/p>\n\n\n\n<ul>\n<li>WordPress: Latest version<\/li>\n\n\n\n<li>WooCommerce: Latest version<\/li>\n\n\n\n<li>Komoju for WooCommerce<\/li>\n\n\n\n<li>Sequential Order Number plugin enabled<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Problem Description<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our store uses a Sequential Order Number plugin, which generates a custom order number stored in the <code>_order_number<\/code> meta field.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a customer is redirected to Komoju, the payment reference sent to Komoju appears to be the sequential order number (for example, <code>105432<\/code>) rather than the internal WooCommerce order ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, when Komoju receives the payment confirmation and processes the callback\/webhook, it appears to attempt to load the WooCommerce order directly using that reference as if it were the internal order ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This causes one of two issues:<\/strong><\/p>\n\n\n\n<ol>\n<li>The order cannot be found.<\/li>\n\n\n\n<li>A different\/older WooCommerce order is updated because its internal ID matches the sequential order number used as the payment reference.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example<\/strong><\/p>\n\n\n\n<ul>\n<li>WooCommerce internal order ID: <code>254781<\/code><\/li>\n\n\n\n<li>Sequential order number (<code>_order_number<\/code>): <code>105432<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Komoju receives reference <code>105432<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the payment is completed, the plugin appears to look for WooCommerce order ID <code>105432<\/code> instead of searching for the order whose <code>_order_number<\/code> equals <code>105432<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a result, the payment status may be applied to the wrong order.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected Behavior<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the payment reference sent to Komoju is the sequential order number, the callback should locate the order by that reference (for example using <code>_order_number<\/code>) and then retrieve the actual WooCommerce order ID before updating the order status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additional Information<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This issue only becomes visible when the sequential order number differs from the WooCommerce internal order ID, which is the normal behavior when using sequential order number plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Could you please verify whether the callback\/webhook logic is using the payment reference directly as the WooCommerce order ID?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you \ud83d\ude00<\/p>\n","protected":false},"template":"","class_list":["post-18936860","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18936860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18936860\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18936860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}