WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Replace transaction id with order id on thank y ou page
- AuthorPosts
- 21 April, 2021 at 8:03 pm #55527
Olly,
The plugin, extension and gateway work perfectly, great job! (with Kale Pro theme)
After doing a payment with Mollie I noticed that the user gets redirected to a ‘thank you’-page with an overview of the payment, order…
Here it shows the transaction ID but I would like to see here the order ID (just like in the e-mail, …).
Is there an easy way to change this?Kind regards,
Johan
24 April, 2021 at 8:22 pm #55601something along these lines i guess (though unless you are only accepting COD type order , removing transaction id’s may not be a good idea , but up to you of course)
add_filter('wppizza_filter_transaction_details', 'my_custom_transaction_details', 10, 3); function my_custom_transaction_details($tx_keys, $type, $order){ /* get selected (filterable) parameters available keys: [wp_user_id] [order_update] [order_delivered] [notes] [payment_gateway] [payment_status] [user_data] [ip_address] [order_date] [order_id] [payment_due] [pickup_delivery] [payment_type] [payment_method] [transaction_id] [total] */ /* example : adding order id */ $tx_keys[] = 'order_id'; /* example: removing transaction_id (wppizza version <= 3.13.1) */ $_keys = array_flip($tx_keys);//flip key/value $_txid_key = $_keys['transaction_id'];//get key for tx_id unset($tx_keys[$_txid_key]);//remove tx id from array /* example : removing transaction_id as of wppizza 3.13.2+ you will be able to simply do the following instead */ unset($tx_keys['transaction_id']); return $tx_keys; }
24 April, 2021 at 9:10 pm #55602Olly,
Thx, I will give it a try and see what it leads to.
But if I understand it correctly it’s better not to change this because we are using cach and mollie.Thx for the support.
Johan
25 April, 2021 at 1:28 am #55616you can change it if you want, but you’ll probably make it unnecessarily complicated for yourself to find an order in your mollie account if any question regarding payment’s should ever arise
all up to you though
25 April, 2021 at 8:58 am #55617I gave it a try, but you’re right, in certain cases it will become harder to troubeshoot payment issues. So we will be leaving it this way.
- AuthorPosts
- The topic ‘Replace transaction id with order id on thank y ou page’ is closed to new replies.