Support » Plugin: WooCommerce Digital Signature » Please suggest any function for getting order id.

  • Resolved Rushabh Shah

    (@rushabh4486)


    Hello,

    I have document id and invitation id. Anyone, can you please suggest me how can I get order id by document id and invitation id. Please suggest ASAP. I already used below function but I can not get order id.

        $invitation = WP_E_Sig()->invite->getInviteBy('document_id', $docId);
                    if (!$invitation) {
                        return $docContent;
                    }
                    $order_id = get_esig_order_id($invitation->document_id, $invitation->invitation_id);

    Thanks

    • This topic was modified 5 months, 1 week ago by  Rushabh Shah.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support haleyrodriguez

    (@haleyrodriguez)

    Hey Rushabh!

    Thanks for your message! The code that you provided should work properly as long as you are calling it after placing the order, not before.

    If you have any other questions on this, please reach me at curious@approveme.com and I’ll have some more advice for you.

    Thanks, Rushabh! I hope you have an AWESOME weekend!

    🙂
    Haley
    Customer Happiness Engineer
    ApproveMe

    Rushabh Shah

    (@rushabh4486)

    Thanks for the reply.

    But it is not working properly after placing the order. I have used in ‘esignature_content’ filter.

    add_filter("esignature_content","replacecontent",10,2);
    function replacecontent($document_content, $document_id){
        $order_id = esig_woo_logic::get_after_checkout_order_id();
           if (!$order_id) {
              $invitation = WP_E_Sig()->invite->getInviteBy('document_id', $docId);
                if (!$invitation) {
                   return $docContent;
                }
            $order_id = get_esig_order_id($invitation->document_id, $invitation->invitation_id);
           }
           if (!$order_id) {
                    return $docContent;
           }
    }

    Please help.

    Thanks

    Plugin Support haleyrodriguez

    (@haleyrodriguez)

    Hey Rushabh!

    Thanks for your reply! I’d love to work together to figure out why this isn’t working for you. 🙂

    I looked through my system but I can’t seem to find your email address to send you a message. Sorry about that! In order for me to give you a hand, can you send a quick email to curious@appoveme.com?

    Thanks, Rushabh! I’ll look out for your email so we can get this sorted.

    🙂
    Haley
    Customer Happiness Engineer
    ApproveMe

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.