src/whatsprot.class.php
public function sendRemoveAccount($lg = null, $lc = null, $feedback = null)
    {
        $msgId = $this->createIqId();
        if ($feedback != null && strlen($feedback) > 0) {
            if ($lg == null) {
                $lg = '';
            }

            if ($lc == null) {
                $lc = '';
            }

            $child = new ProtocolNode('body',
                [
                    'lg' => $lg,
                    'lc' => $lc,
                ], null, $feedback);
            $childNode = [$child];
        } else {
            $childNode = null;
        }

        $removeNode = new ProtocolNode('remove', null, $childNode, null);
        $node = new ProtocolNode('iq',
            [
                'to'    => Constants::WHATSAPP_SERVER,
                'xmlns' => 'urn:xmpp:whatsapp:account',
                'type'  => 'get',
                'id'    => $msgId,
            ], [$removeNode], null);

        $this->sendNode($node);
        $this->waitForServer($msgId);
    }
public function sendRemoveAccount($lg = null, $lc = null, $feedback = null)
    {
        $msgId = $this->createIqId();
        if ($feedback != null && strlen($feedback) > 0) {
            if ($lg == null) {
                $lg = '';
            }

            if ($lc == null) {
                $lc = '';
            }

            $child = new ProtocolNode('body',
                [
                    'lg' => $lg,
                    'lc' => $lc,
                ], null, $feedback);
            $childNode = [$child];
        } else {
            $childNode = null;
        }

        $removeNode = new ProtocolNode('remove', null, $childNode, null);
        $node = new ProtocolNode('iq',
            [
                'to'    => Constants::WHATSAPP_SERVER,
                'xmlns' => 'urn:xmpp:whatsapp:account',
                'type'  => 'get',
                'id'    => $msgId,
            ], [$removeNode], null);

        $this->sendNode($node);
        $this->waitForServer($msgId);
    }
public function sendRemoveAccount ( $ lg = null , $ lc = null , $ feedback = null ) { $ msgId = $ this -> createIqId ( ) ; if ( $ feedback != null && strlen ( $ feedback ) > 0 ) { if ( $ lg == null ) { $ lg = '' ; } if ( $ lc == null ) { $ lc = '' ; } $ child = new ProtocolNode ( 'body' , [ 'lg' => $ lg , 'lc' => $ lc , ] , null , $ feedback ) ; $ childNode = [ $ child ] ; } else { $ childNode = null ; } $ removeNode = new ProtocolNode ( 'remove' , null , $ childNode , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'to' => Constants :: WHATSAPP_SERVER , 'xmlns' => 'urn:xmpp:whatsapp:account' , 'type' => 'get' , 'id' => $ msgId , ] , [ $ removeNode ] , null ) ; $ this -> sendNode ( $ node ) ; $ this -> waitForServer ( $ msgId ) ; }
Removes an account from WhatsApp.

@param string $lg       Language
@param string $lc       Country
@param string $feedback User Feedback
Removes an account from WhatsApp .