WPIntell

Source evidence

Payment gateway not loading on plugin activation

Sequential Order Number for WooCommerce · support · 2025-07-11T12:43:00+00:00

complaintsentiment
highseverity
0.75relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 21 rows with source links

23.8% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

16 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
pbayad1974 resolved
On my checkout page, the razorpay payment gateway is not loading when this plugin is enabled When plugin disabled: https://pasteboard.co/JoiRm2p6eiic.png When enabled: https://pasteboard.co/T1H9W5PIi6b2.png Hi @pbayad1974 , Thanks for reaching out. It appears that the third-party payment gateway plugin is trying to retrieve the order using the order number. Normally, in WooCommerce, the order number and order ID are the same. However, when using the Sequential Order Numbers plugin, the order number is customised and no longer matches the internal WooCommerce order ID. Because the third-party payment gateway plugin expects the order number to be the same as the order ID, it fails to retrieve the correct order object, causing a fatal error when trying to process payment. To make it compatible with the plugin, we recommend that the third-party payment gateway plugin update its implementation in either of the following ways: If they need to work with the order number, they may use the following snippet to retrieve the order object from the sequential number: function getOrder( $order_number ) { $orders = wc_get_orders([ 'limit' => 1, 'meta_key' => '_order_number', 'meta_value' => $order_number, 'meta_compare' => '=' ]); return ! empty( $orders ) ? $orders[0] : false; } Use $order->get_id() instead of $order->get_order_number() throughout the payment flow. This ensures they always retrieve the correct order regardless of any formatting applied. This change needs to be made by the third-party payment gateway plugin developers, as it affects how their system retrieves and handles WooCommerce order data. Please feel free to forward this explanation and code snippet to their support team for implementation.

Comments

1 shown
WebToffee Support 2025-07-14T18:15:00+00:00

Hi @pbayad1974 , Thanks for reaching out. It appears that the third-party payment gateway plugin is trying to retrieve the order using the order number. Normally, in WooCommerce, the order number and order ID are the same. However, when using the Sequential Order Numbers plugin, the order number is customised and no longer matches the internal WooCommerce order ID. Because the third-party payment gateway plugin expects the order number to be the same as the order ID, it fails to retrieve the correct order object, causing a fatal error when trying to process payment. To make it compatible with the plugin, we recommend that the third-party payment gateway plugin update its implementation in either of the following ways: If they need to work with the order number, they may use the following snippet to retrieve the order object from the sequential number: function getOrder( $order_number ) { $orders = wc_get_orders([ 'limit' => 1, 'meta_key' => '_order_number', 'meta_value' => $order_number, 'meta_compare' => '=' ]); return ! empty( $orders ) ? $orders[0] : false; } Use $order->get_id() instead of $order->get_order_number() throughout the payment flow. This ensures they always retrieve the correct order regardless of any formatting applied. This change needs to be made by the third-party payment gateway plugin developers, as it affects how their system retrieves and handles WooCommerce order data. Please feel free to forward this explanation and code snippet to their support team for implementation.