PluginProbe
MultiSafepay plugin for WooCommerce / trunk
MultiSafepay plugin for WooCommerce vtrunk
6.11.1 6.12.0 6.13.0 6.2.0 6.2.1 6.3.0 6.3.1 6.4.0 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.6.0 6.6.1 6.6.2 6.7.0 6.7.1 6.7.2 6.7.3 6.8.0 6.8.1 6.8.2 6.8.3 6.9.0 All 84 releases
multisafepay / src / PaymentMethods / Filters / TransactionOrderId.php

TransactionOrderId.php in MultiSafepay plugin for WooCommerce trunk, at src/PaymentMethods/Filters/TransactionOrderId.php

26 lines 744 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php declare(strict_types=1);
2
3 namespace MultiSafepay\WooCommerce\PaymentMethods\Filters;
4
5 /**
6 * Resolve transaction order id from the callback order number.
7 */
8 class TransactionOrderId {
9
10 /**
11 * @param string $transactionid
12 * @return int
13 */
14 public function multisafepay_transaction_order_id( string $transactionid ): int {
15 if ( function_exists( 'wc_seq_order_number_pro' ) ) {
16 return (int) wc_seq_order_number_pro()->find_order_by_order_number( $transactionid );
17 }
18
19 if ( function_exists( 'wc_sequential_order_numbers' ) ) {
20 return (int) wc_sequential_order_numbers()->find_order_by_order_number( $transactionid );
21 }
22
23 return (int) $transactionid;
24 }
25 }
26