Replace transaction id with order id on thank y ou page

WPPizza – A Restaurant Plugin for WordPress Support General Support Replace transaction id with order id on thank y ou page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #55527
    johanfmp
    Participant

      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

      #55601
      Olly
      Admin & Mod

        something 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;
        }
        
        #55602
        johanfmp
        Participant

          Olly,

          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

          #55616
          Olly
          Admin & Mod

            you 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

            #55617
            johanfmp
            Participant

              I 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.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The topic ‘Replace transaction id with order id on thank y ou page’ is closed to new replies.